gitxelectron 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12750,37 +12750,6 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12750
12750
  const [localProgress, setLocalProgress] = reactExports.useState(
12751
12751
  null
12752
12752
  );
12753
- reactExports.useEffect(() => {
12754
- checkAuth();
12755
- if (window.api.onMassivePushProgress) {
12756
- window.api.onMassivePushProgress((data) => {
12757
- setMassivePushData(data);
12758
- });
12759
- }
12760
- }, []);
12761
- async function checkAuth() {
12762
- const status = await window.api.getAuthStatus();
12763
- if (status.status !== "Verified") {
12764
- startAuth();
12765
- } else {
12766
- setStep(2);
12767
- fetchUserRepos();
12768
- }
12769
- }
12770
- async function startAuth() {
12771
- try {
12772
- const data = await window.api.startDeviceFlow();
12773
- setDeviceFlowData(data);
12774
- await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
12775
- const newStatus = await window.api.getAuthStatus();
12776
- if (newStatus.status === "Verified") {
12777
- setStep(2);
12778
- fetchUserRepos();
12779
- }
12780
- } catch (e) {
12781
- setError(e.message);
12782
- }
12783
- }
12784
12753
  const fetchUserRepos = async () => {
12785
12754
  try {
12786
12755
  const repos = await window.api.getUserRepositories();
@@ -12792,6 +12761,41 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12792
12761
  console.error(e);
12793
12762
  }
12794
12763
  };
12764
+ reactExports.useEffect(() => {
12765
+ let isMounted = true;
12766
+ const verifyAndLoad = async () => {
12767
+ try {
12768
+ const status = await window.api.getAuthStatus();
12769
+ if (!isMounted) return;
12770
+ if (status.status !== "Verified") {
12771
+ const data = await window.api.startDeviceFlow();
12772
+ if (!isMounted) return;
12773
+ setDeviceFlowData(data);
12774
+ await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
12775
+ const newStatus = await window.api.getAuthStatus();
12776
+ if (!isMounted) return;
12777
+ if (newStatus.status === "Verified") {
12778
+ setStep(2);
12779
+ fetchUserRepos();
12780
+ }
12781
+ } else {
12782
+ setStep(2);
12783
+ fetchUserRepos();
12784
+ }
12785
+ } catch (e) {
12786
+ if (isMounted) setError(e.message);
12787
+ }
12788
+ };
12789
+ verifyAndLoad();
12790
+ if (window.api.onMassivePushProgress) {
12791
+ window.api.onMassivePushProgress((data) => {
12792
+ setMassivePushData(data);
12793
+ });
12794
+ }
12795
+ return () => {
12796
+ isMounted = false;
12797
+ };
12798
+ }, []);
12795
12799
  const handleProceed = async () => {
12796
12800
  setIsLoading(true);
12797
12801
  setError("");
@@ -12799,6 +12803,7 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12799
12803
  localStorage.setItem("gitquickpush-last-repo", repoPath);
12800
12804
  setLocalProgress({ percentage: 5, eta: "Initializing Git locally..." });
12801
12805
  await window.api.initRepo(repoPath);
12806
+ await window.api.setRepoPath(repoPath);
12802
12807
  if (action === "new") {
12803
12808
  setLocalProgress({ percentage: 15, eta: "Creating GitHub Repository..." });
12804
12809
  const autoInit = addReadme || !!gitignoreTemplate || !!licenseTemplate;
@@ -12812,9 +12817,10 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12812
12817
  );
12813
12818
  setLocalProgress({ percentage: 35, eta: "Linking Remote..." });
12814
12819
  await window.api.addRemote("origin", newRepo.clone_url);
12820
+ const defaultBranch = newRepo.default_branch || "main";
12815
12821
  if (autoInit) {
12816
12822
  setLocalProgress({ percentage: 45, eta: "Syncing with Remote..." });
12817
- await window.api.resetToRemote("origin", "main");
12823
+ await window.api.resetToRemote("origin", defaultBranch);
12818
12824
  }
12819
12825
  setLocalProgress({ percentage: 55, eta: "Scanning files..." });
12820
12826
  const status = await window.api.getStatus();
@@ -12832,7 +12838,7 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12832
12838
  }
12833
12839
  setLocalProgress({ percentage: 95, eta: "Pushing to GitHub..." });
12834
12840
  const branches = await window.api.getBranches();
12835
- const currentBranch = branches.current || "main";
12841
+ const currentBranch = branches.current || defaultBranch;
12836
12842
  await window.api.pushToRemote("origin", currentBranch);
12837
12843
  setLocalProgress({ percentage: 100, eta: "Complete!" });
12838
12844
  } else if (action === "existing") {
@@ -12842,8 +12848,10 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12842
12848
  setLocalProgress({ percentage: 80, eta: "Fetching remote data..." });
12843
12849
  await window.api.fetchRemote();
12844
12850
  }
12851
+ await window.api.setRepoPath(repoPath);
12845
12852
  setLocalProgress({ percentage: 100, eta: "Complete!" });
12846
12853
  } else if (action === "local") {
12854
+ await window.api.setRepoPath(repoPath);
12847
12855
  localStorage.setItem(`gitquickpush-wizard-dismissed-${repoPath}`, "true");
12848
12856
  }
12849
12857
  onSuccess();
@@ -24826,7 +24834,7 @@ const CollaborationRepoView = ({
24826
24834
  collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-secondary flex-wrap px-1", children: [
24827
24835
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-medium text-secondary/80", children: "Filter summary:" }),
24828
24836
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1 bg-surface border border-border px-2.5 py-1 rounded-lg font-mono text-[11px] text-primary", children: [
24829
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-white" }),
24837
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-emerald-400" }),
24830
24838
  connectedCount,
24831
24839
  " Connected"
24832
24840
  ] }),
@@ -24923,7 +24931,7 @@ const CollaborationRepoView = ({
24923
24931
  children: repo.name
24924
24932
  }
24925
24933
  ),
24926
- repo.private ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-amber-500/10 text-amber-400 border border-amber-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Private" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-emerald-500/10 text-white border border-emerald-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Public" }),
24934
+ repo.private ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-amber-500/10 text-amber-400 border border-amber-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Private" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-emerald-500/10 text-emerald-400 border border-emerald-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Public" }),
24927
24935
  isCurrentActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[9px] bg-brand text-white px-2 py-0.5 rounded-full font-bold uppercase tracking-wider flex-shrink-0 shadow-xs", children: "Active" })
24928
24936
  ] }),
24929
24937
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-1 text-xs text-secondary min-w-0 flex-wrap", children: [
@@ -24967,7 +24975,7 @@ const CollaborationRepoView = ({
24967
24975
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: savedPath ? isMissing ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
24968
24976
  "div",
24969
24977
  {
24970
- className: "inline-flex items-center gap-1.5 text-xs text-danger font-mono bg-danger text-white border border-border px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
24978
+ className: "inline-flex items-center gap-1.5 text-xs text-danger font-mono bg-danger/10 border border-danger/30 px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
24971
24979
  title: `Folder was deleted or moved: ${savedPath}`,
24972
24980
  children: [
24973
24981
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-danger animate-pulse flex-shrink-0" }),
@@ -24977,10 +24985,10 @@ const CollaborationRepoView = ({
24977
24985
  ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
24978
24986
  "div",
24979
24987
  {
24980
- className: "inline-flex items-center gap-1.5 text-xs text-white font-mono bg-success text-white border border-border px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
24988
+ className: "inline-flex items-center gap-1.5 text-xs text-emerald-400 font-mono bg-emerald-500/10 border border-emerald-500/25 px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
24981
24989
  title: savedPath,
24982
24990
  children: [
24983
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-white flex-shrink-0" }),
24991
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 flex-shrink-0" }),
24984
24992
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: savedPath.split("\\").pop() || savedPath })
24985
24993
  ]
24986
24994
  }
@@ -25059,7 +25067,7 @@ const CollaborationRepoView = ({
25059
25067
  e.stopPropagation();
25060
25068
  onRepoCardClick(repo);
25061
25069
  },
25062
- className: `px-3.5 py-1.5 text-xs font-semibold rounded-xl transition-all shadow-xs flex items-center gap-1.5 ${savedPath ? isMissing ? "bg-danger hover:bg-danger text-white text-danger border border-danger/40" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20"}`,
25070
+ className: `px-3.5 py-1.5 text-xs font-semibold rounded-xl transition-all shadow-xs flex items-center gap-1.5 ${savedPath ? isMissing ? "bg-danger hover:bg-danger/80 text-white border border-danger/40" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20"}`,
25063
25071
  children: [
25064
25072
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: savedPath ? isMissing ? "Re-Clone" : "Open Repo" : "Clone" }),
25065
25073
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isMissing ? "☁️" : savedPath ? "→" : "☁️" })
@@ -25880,7 +25888,7 @@ function App() {
25880
25888
  });
25881
25889
  reactExports.useEffect(() => {
25882
25890
  const handleKeyDown = (e) => {
25883
- if (e.ctrlKey && e.key === "Delete") {
25891
+ if ((e.ctrlKey || e.metaKey) && (e.key === "Delete" || e.key === "Backspace")) {
25884
25892
  setLiteMode((prev) => !prev);
25885
25893
  }
25886
25894
  };
@@ -26054,6 +26062,11 @@ function App() {
26054
26062
  const refreshLockRef = reactExports.useRef(false);
26055
26063
  reactExports.useEffect(() => {
26056
26064
  }, [gitProgress]);
26065
+ reactExports.useEffect(() => {
26066
+ const activeTheme = showSettings ? draftTheme : theme;
26067
+ document.documentElement.setAttribute("data-theme", activeTheme);
26068
+ document.body.setAttribute("data-theme", activeTheme);
26069
+ }, [theme, draftTheme, showSettings]);
26057
26070
  const [showWelcomeWizard, setShowWelcomeWizard] = reactExports.useState(false);
26058
26071
  const [newPin, setNewPin] = reactExports.useState("");
26059
26072
  const [pinChangeSuccess, setPinChangeSuccess] = reactExports.useState(false);
@@ -26206,6 +26219,11 @@ function App() {
26206
26219
  window.api.getCliRepo().then((cliRepoPath) => {
26207
26220
  if (cliRepoPath) {
26208
26221
  loadRepo(cliRepoPath);
26222
+ } else {
26223
+ const last = localStorage.getItem("gitelectron-last-repo");
26224
+ if (last) {
26225
+ loadRepo(last);
26226
+ }
26209
26227
  }
26210
26228
  });
26211
26229
  }, []);
@@ -26304,7 +26322,9 @@ function App() {
26304
26322
  };
26305
26323
  const handleThemeChange = (newTheme) => {
26306
26324
  setTheme(newTheme);
26325
+ setDraftTheme(newTheme);
26307
26326
  document.documentElement.setAttribute("data-theme", newTheme);
26327
+ document.body.setAttribute("data-theme", newTheme);
26308
26328
  localStorage.setItem("gitelectron-theme", newTheme);
26309
26329
  };
26310
26330
  const handleAiApprove = async () => {
@@ -26344,10 +26364,13 @@ function App() {
26344
26364
  localStorage.setItem("gitelectron-last-repo", targetPath);
26345
26365
  setRepoPath(targetPath);
26346
26366
  const result = await window.api.setRepoPath(targetPath);
26367
+ const finalPath = result?.path || targetPath;
26347
26368
  const isValidRepo = result ? result.isRepo : false;
26369
+ setRepoPath(finalPath);
26348
26370
  setIsRepo(isValidRepo);
26349
26371
  if (isValidRepo) {
26350
- window.api.toggleAutoSync(targetPath, true);
26372
+ localStorage.setItem("gitelectron-last-repo", finalPath);
26373
+ window.api.toggleAutoSync(finalPath, true);
26351
26374
  await refreshRepoState();
26352
26375
  }
26353
26376
  setChangesTab("changes");
@@ -27082,7 +27105,9 @@ Are you SURE you want to link "${repoName}" to this folder?`
27082
27105
  showToast("Settings saved successfully", "success");
27083
27106
  };
27084
27107
  const cancelSettings = () => {
27108
+ setDraftTheme(theme);
27085
27109
  document.documentElement.setAttribute("data-theme", theme);
27110
+ document.body.setAttribute("data-theme", theme);
27086
27111
  setShowSettings(false);
27087
27112
  };
27088
27113
  const handleExecuteForcePush = async () => {
@@ -27251,7 +27276,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
27251
27276
  ] }),
27252
27277
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27253
27278
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "AI Proposed Fix" }),
27254
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-brand text-white border border-brand/20 p-3 rounded text-sm text-brand", children: autoSyncErrorPayload.proposedFix })
27279
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-brand/10 border border-brand/20 p-3 rounded text-sm text-brand", children: autoSyncErrorPayload.proposedFix })
27255
27280
  ] }),
27256
27281
  autoSyncErrorPayload.files && autoSyncErrorPayload.files.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
27257
27282
  /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "Affected Files" }),
@@ -28558,7 +28583,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
28558
28583
  }
28559
28584
  ),
28560
28585
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 pr-8 min-w-0", children: [
28561
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-brand text-white border border-brand/20 flex items-center justify-center text-brand flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28586
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-brand/10 border border-brand/20 flex items-center justify-center text-brand flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28562
28587
  "path",
28563
28588
  {
28564
28589
  strokeLinecap: "round",
@@ -29355,7 +29380,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29355
29380
  }
29356
29381
  ),
29357
29382
  t("collaborationRepo"),
29358
- collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto bg-brand text-white text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
29383
+ collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto bg-brand/20 text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
29359
29384
  ]
29360
29385
  }
29361
29386
  ),
@@ -29428,7 +29453,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29428
29453
  )
29429
29454
  ] })
29430
29455
  ] }),
29431
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 p-6 flex flex-col overflow-y-auto custom-scrollbar min-h-0 relative z-10", children: isRepo && status && branches ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col min-h-0 gap-4 mb-6 relative z-20", children: [
29456
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 p-6 flex flex-col overflow-y-auto custom-scrollbar min-h-0 relative z-10", children: isRepo && status ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col min-h-0 gap-4 mb-6 relative z-20", children: [
29432
29457
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap justify-between items-center bg-surface backdrop-blur-md border border-border p-3 rounded-xl transition-colors duration-300 gap-4 relative z-50", children: [
29433
29458
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-4 text-sm", children: [
29434
29459
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 relative", children: [
@@ -29603,7 +29628,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29603
29628
  "button",
29604
29629
  {
29605
29630
  onClick: handleToggleAutoSync,
29606
- className: `px-2 py-1.5 rounded transition-colors flex items-center justify-center border font-medium ${autoSyncEnabled ? "bg-green-500/20 text-green-400 border-green-500/30" : "hover:bg-brand text-white text-brand border-brand/30"}`,
29631
+ className: `px-2 py-1.5 rounded transition-colors flex items-center justify-center border font-medium ${autoSyncEnabled ? "bg-green-500/20 text-green-400 border-green-500/30" : "hover:bg-brand/20 text-brand border-brand/30"}`,
29607
29632
  title: autoSyncEnabled ? "Disable Auto-Push" : "Enable Auto-Push",
29608
29633
  children: [
29609
29634
  "⚡ ",
@@ -29797,7 +29822,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29797
29822
  "button",
29798
29823
  {
29799
29824
  onClick: () => window.api.openExternal(remoteUrl),
29800
- className: "p-1.5 hover:bg-brand text-white text-brand rounded transition-colors flex items-center justify-center border border-brand/30",
29825
+ className: "p-1.5 hover:bg-brand/20 text-brand rounded transition-colors flex items-center justify-center border border-brand/30",
29801
29826
  title: "View Repository on GitHub",
29802
29827
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.205 11.387.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.298 24 12c0-6.627-5.373-12-12-12z" }) })
29803
29828
  }
@@ -29823,7 +29848,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29823
29848
  "button",
29824
29849
  {
29825
29850
  onClick: () => setShowContributorsModal(true),
29826
- className: "px-2 py-1.5 hover:bg-brand text-white text-brand rounded transition-colors flex items-center justify-center border border-brand/30 font-medium",
29851
+ className: "px-2 py-1.5 hover:bg-brand/20 text-brand rounded transition-colors flex items-center justify-center border border-brand/30 font-medium",
29827
29852
  title: "Manage Collaborators",
29828
29853
  children: [
29829
29854
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -29976,7 +30001,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
29976
30001
  children: "Deleted"
29977
30002
  }
29978
30003
  ),
29979
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto text-xs font-bold text-brand bg-brand text-white border border-brand/20 px-3 py-1 rounded-full", children: "Collaboration Repo" })
30004
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto text-xs font-bold text-brand bg-brand/20 border border-brand/30 px-3 py-1 rounded-full", children: "Collaboration Repo" })
29980
30005
  ] }),
29981
30006
  /* @__PURE__ */ jsxRuntimeExports.jsx(
29982
30007
  CollaborationRepoView,
@@ -30043,7 +30068,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
30043
30068
  className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 whitespace-nowrap flex-shrink-0 ${changesTab === "collaboration-repo" ? "text-primary border-brand bg-surface border-b-2" : "text-secondary border-transparent hover:text-primary"}`,
30044
30069
  children: [
30045
30070
  "Collaboration Repo",
30046
- collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-brand text-white text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
30071
+ collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-brand/20 text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
30047
30072
  ]
30048
30073
  }
30049
30074
  ),
@@ -30053,7 +30078,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
30053
30078
  {
30054
30079
  onClick: handleUploadFiles,
30055
30080
  disabled: !repoPath || isUploading,
30056
- className: "text-xs bg-brand text-white hover:bg-brand text-white text-brand border border-brand/30 px-2.5 py-1 rounded-md transition-all flex items-center gap-1.5 font-medium shadow-sm disabled:opacity-50 whitespace-nowrap flex-shrink-0",
30081
+ className: "text-xs bg-brand text-white hover:bg-brand/90 border border-brand/30 px-2.5 py-1 rounded-md transition-all flex items-center gap-1.5 font-medium shadow-sm disabled:opacity-50 whitespace-nowrap flex-shrink-0",
30057
30082
  title: "Upload files directly into this repository",
30058
30083
  children: [
30059
30084
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -30404,7 +30429,7 @@ Are you SURE you want to link "${repoName}" to this folder?`
30404
30429
  ]
30405
30430
  }
30406
30431
  ),
30407
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-brand bg-brand text-white border border-brand/20 px-3 py-1 rounded-full", children: "Collaboration Hub" }) })
30432
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-brand bg-brand/20 border border-brand/30 px-3 py-1 rounded-full", children: "Collaboration Hub" }) })
30408
30433
  ] }),
30409
30434
  /* @__PURE__ */ jsxRuntimeExports.jsx(
30410
30435
  CollaborationRepoView,
@@ -30676,42 +30701,141 @@ Are you SURE you want to link "${repoName}" to this folder?`
30676
30701
  repoPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
30677
30702
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xl mb-2 text-primary font-semibold", children: "Folder Loaded" }),
30678
30703
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-mono text-accent bg-accent/10 px-3 py-1 rounded-md mb-6 border border-accent/20", children: repoPath }),
30679
- errorMsg ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-danger bg-danger/10 border border-danger/30 p-4 rounded-md text-sm text-center max-w-md", children: [
30680
- /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Error:" }),
30681
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
30682
- errorMsg
30683
- ] }) : !isRepo ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm", children: 'Click "Initialize Git in Folder" in the sidebar.' }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex items-center gap-2 text-sm", children: [
30684
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
30685
- "svg",
30686
- {
30687
- className: "w-4 h-4 animate-spin text-secondary",
30688
- fill: "none",
30689
- viewBox: "0 0 24 24",
30690
- children: [
30691
- /* @__PURE__ */ jsxRuntimeExports.jsx(
30692
- "circle",
30693
- {
30694
- className: "opacity-25",
30695
- cx: "12",
30696
- cy: "12",
30697
- r: "10",
30698
- stroke: "currentColor",
30699
- strokeWidth: "4"
30700
- }
30701
- ),
30702
- /* @__PURE__ */ jsxRuntimeExports.jsx(
30703
- "path",
30704
- {
30705
- className: "opacity-75",
30706
- fill: "currentColor",
30707
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
30704
+ errorMsg ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-danger bg-danger/10 border border-danger/30 p-5 rounded-xl text-sm text-center max-w-md shadow-lg flex flex-col items-center gap-3", children: [
30705
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
30706
+ /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Error:" }),
30707
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 text-xs opacity-90", children: errorMsg })
30708
+ ] }),
30709
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
30710
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30711
+ "button",
30712
+ {
30713
+ onClick: () => refreshRepoState(),
30714
+ className: "px-4 py-1.5 bg-brand hover:bg-brand-hover text-white text-xs font-semibold rounded-lg transition-all cursor-pointer",
30715
+ children: "Retry"
30716
+ }
30717
+ ),
30718
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30719
+ "button",
30720
+ {
30721
+ onClick: () => setShowSetupWizard(true),
30722
+ className: "px-4 py-1.5 bg-surface-hover hover:bg-surface text-secondary hover:text-primary text-xs font-semibold rounded-lg border border-border transition-all cursor-pointer",
30723
+ children: "Setup Repository"
30724
+ }
30725
+ )
30726
+ ] })
30727
+ ] }) : !isRepo ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-3 max-w-md text-center p-6 bg-surface/50 rounded-2xl border border-border/40 backdrop-blur-sm", children: [
30728
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-secondary", children: "This folder is loaded, but Git is not initialized in it yet." }),
30729
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-2", children: [
30730
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
30731
+ "button",
30732
+ {
30733
+ onClick: () => setShowSetupWizard(true),
30734
+ className: "px-5 py-2.5 bg-brand hover:bg-brand-hover text-white font-semibold rounded-xl text-xs transition-all shadow-md hover:shadow-brand/20 cursor-pointer flex items-center gap-2",
30735
+ children: [
30736
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30737
+ "svg",
30738
+ {
30739
+ className: "w-4 h-4",
30740
+ fill: "none",
30741
+ stroke: "currentColor",
30742
+ viewBox: "0 0 24 24",
30743
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
30744
+ "path",
30745
+ {
30746
+ strokeLinecap: "round",
30747
+ strokeLinejoin: "round",
30748
+ strokeWidth: "2",
30749
+ d: "M12 4v16m8-8H4"
30750
+ }
30751
+ )
30752
+ }
30753
+ ),
30754
+ "Initialize Git Repository"
30755
+ ]
30756
+ }
30757
+ ),
30758
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
30759
+ "button",
30760
+ {
30761
+ onClick: async () => {
30762
+ if (!repoPath) return;
30763
+ const res = await window.api.setRepoPath(repoPath);
30764
+ if (res) {
30765
+ setRepoPath(res.path);
30766
+ setIsRepo(res.isRepo);
30767
+ if (res.isRepo) {
30768
+ await refreshRepoState();
30769
+ }
30708
30770
  }
30709
- )
30710
- ]
30771
+ },
30772
+ className: "px-4 py-2.5 bg-surface hover:bg-surface-hover text-secondary hover:text-primary font-semibold rounded-xl text-xs border border-border transition-all cursor-pointer flex items-center gap-1.5",
30773
+ children: [
30774
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30775
+ "svg",
30776
+ {
30777
+ className: "w-3.5 h-3.5",
30778
+ fill: "none",
30779
+ stroke: "currentColor",
30780
+ viewBox: "0 0 24 24",
30781
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
30782
+ "path",
30783
+ {
30784
+ strokeLinecap: "round",
30785
+ strokeLinejoin: "round",
30786
+ strokeWidth: "2",
30787
+ d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
30788
+ }
30789
+ )
30790
+ }
30791
+ ),
30792
+ "Check Again"
30793
+ ]
30794
+ }
30795
+ )
30796
+ ] })
30797
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
30798
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex items-center gap-2 text-sm text-secondary", children: [
30799
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
30800
+ "svg",
30801
+ {
30802
+ className: "w-4 h-4 animate-spin text-brand",
30803
+ fill: "none",
30804
+ viewBox: "0 0 24 24",
30805
+ children: [
30806
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30807
+ "circle",
30808
+ {
30809
+ className: "opacity-25",
30810
+ cx: "12",
30811
+ cy: "12",
30812
+ r: "10",
30813
+ stroke: "currentColor",
30814
+ strokeWidth: "4"
30815
+ }
30816
+ ),
30817
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30818
+ "path",
30819
+ {
30820
+ className: "opacity-75",
30821
+ fill: "currentColor",
30822
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
30823
+ }
30824
+ )
30825
+ ]
30826
+ }
30827
+ ),
30828
+ " ",
30829
+ "Analyzing Git Repository..."
30830
+ ] }),
30831
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
30832
+ "button",
30833
+ {
30834
+ onClick: () => refreshRepoState(),
30835
+ className: "text-xs text-secondary hover:text-primary underline mt-2 cursor-pointer",
30836
+ children: "Force Refresh"
30711
30837
  }
30712
- ),
30713
- " ",
30714
- "Analyzing..."
30838
+ )
30715
30839
  ] })
30716
30840
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center flex flex-col items-center", children: [
30717
30841
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-3xl font-bold text-primary mb-2 tracking-tight", children: "GIT ELECTRON" }),