gitxelectron 1.3.7 → 1.3.8

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.
@@ -13059,7 +13059,24 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
13059
13059
  ]
13060
13060
  }
13061
13061
  ),
13062
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) }) })
13062
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13063
+ "svg",
13064
+ {
13065
+ className: "w-4 h-4",
13066
+ fill: "none",
13067
+ stroke: "currentColor",
13068
+ viewBox: "0 0 24 24",
13069
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13070
+ "path",
13071
+ {
13072
+ strokeLinecap: "round",
13073
+ strokeLinejoin: "round",
13074
+ strokeWidth: "2",
13075
+ d: "M19 9l-7 7-7-7"
13076
+ }
13077
+ )
13078
+ }
13079
+ ) })
13063
13080
  ] })
13064
13081
  ] }),
13065
13082
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
@@ -13080,7 +13097,24 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
13080
13097
  ]
13081
13098
  }
13082
13099
  ),
13083
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) }) })
13100
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13101
+ "svg",
13102
+ {
13103
+ className: "w-4 h-4",
13104
+ fill: "none",
13105
+ stroke: "currentColor",
13106
+ viewBox: "0 0 24 24",
13107
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13108
+ "path",
13109
+ {
13110
+ strokeLinecap: "round",
13111
+ strokeLinejoin: "round",
13112
+ strokeWidth: "2",
13113
+ d: "M19 9l-7 7-7-7"
13114
+ }
13115
+ )
13116
+ }
13117
+ ) })
13084
13118
  ] })
13085
13119
  ] })
13086
13120
  ] })
@@ -13098,7 +13132,24 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
13098
13132
  children: userRepos.map((r) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: r.clone_url, className: "bg-canvas text-primary", children: r.full_name }, r.id))
13099
13133
  }
13100
13134
  ),
13101
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) }) })
13135
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-secondary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13136
+ "svg",
13137
+ {
13138
+ className: "w-4 h-4",
13139
+ fill: "none",
13140
+ stroke: "currentColor",
13141
+ viewBox: "0 0 24 24",
13142
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
13143
+ "path",
13144
+ {
13145
+ strokeLinecap: "round",
13146
+ strokeLinejoin: "round",
13147
+ strokeWidth: "2",
13148
+ d: "M19 9l-7 7-7-7"
13149
+ }
13150
+ )
13151
+ }
13152
+ ) })
13102
13153
  ] })
13103
13154
  ] }),
13104
13155
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex gap-3 pt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -23009,12 +23060,18 @@ function IconBase(props) {
23009
23060
  function FiX(props) {
23010
23061
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "line", "attr": { "x1": "18", "y1": "6", "x2": "6", "y2": "18" }, "child": [] }, { "tag": "line", "attr": { "x1": "6", "y1": "6", "x2": "18", "y2": "18" }, "child": [] }] })(props);
23011
23062
  }
23063
+ function FiTerminal(props) {
23064
+ return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "polyline", "attr": { "points": "4 17 10 11 4 5" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "19", "x2": "20", "y2": "19" }, "child": [] }] })(props);
23065
+ }
23012
23066
  function FiShield(props) {
23013
23067
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }, "child": [] }] })(props);
23014
23068
  }
23015
23069
  function FiSearch(props) {
23016
23070
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "11", "cy": "11", "r": "8" }, "child": [] }, { "tag": "line", "attr": { "x1": "21", "y1": "21", "x2": "16.65", "y2": "16.65" }, "child": [] }] })(props);
23017
23071
  }
23072
+ function FiRefreshCw(props) {
23073
+ return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "polyline", "attr": { "points": "23 4 23 10 17 10" }, "child": [] }, { "tag": "polyline", "attr": { "points": "1 20 1 14 7 14" }, "child": [] }, { "tag": "path", "attr": { "d": "M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" }, "child": [] }] })(props);
23074
+ }
23018
23075
  function FiGithub(props) {
23019
23076
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" }, "child": [] }] })(props);
23020
23077
  }
@@ -23027,6 +23084,12 @@ function FiFolder(props) {
23027
23084
  function FiFile(props) {
23028
23085
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z" }, "child": [] }, { "tag": "polyline", "attr": { "points": "13 2 13 9 20 9" }, "child": [] }] })(props);
23029
23086
  }
23087
+ function FiExternalLink(props) {
23088
+ return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }, "child": [] }, { "tag": "polyline", "attr": { "points": "15 3 21 3 21 9" }, "child": [] }, { "tag": "line", "attr": { "x1": "10", "y1": "14", "x2": "21", "y2": "3" }, "child": [] }] })(props);
23089
+ }
23090
+ function FiCopy(props) {
23091
+ return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "rect", "attr": { "x": "9", "y": "9", "width": "13", "height": "13", "rx": "2", "ry": "2" }, "child": [] }, { "tag": "path", "attr": { "d": "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, "child": [] }] })(props);
23092
+ }
23030
23093
  function FiCode(props) {
23031
23094
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "polyline", "attr": { "points": "16 18 22 12 16 6" }, "child": [] }, { "tag": "polyline", "attr": { "points": "8 6 2 12 8 18" }, "child": [] }] })(props);
23032
23095
  }
@@ -23048,6 +23111,9 @@ function FiArrowLeft(props) {
23048
23111
  function FiAlertTriangle(props) {
23049
23112
  return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "path", "attr": { "d": "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "9", "x2": "12", "y2": "13" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "17", "x2": "12.01", "y2": "17" }, "child": [] }] })(props);
23050
23113
  }
23114
+ function FiAlertCircle(props) {
23115
+ return GenIcon({ "attr": { "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "strokeWidth": "2", "strokeLinecap": "round", "strokeLinejoin": "round" }, "child": [{ "tag": "circle", "attr": { "cx": "12", "cy": "12", "r": "10" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "8", "x2": "12", "y2": "12" }, "child": [] }, { "tag": "line", "attr": { "x1": "12", "y1": "16", "x2": "12.01", "y2": "16" }, "child": [] }] })(props);
23116
+ }
23051
23117
  function UniversalPushWizard({ isOpen, onClose, onAutoHealTrigger }) {
23052
23118
  const [step, setStep] = reactExports.useState("START");
23053
23119
  const [errorMsg, setErrorMsg] = reactExports.useState("");
@@ -23836,198 +23902,342 @@ function WelcomeWizard({ onComplete }) {
23836
23902
  const [pinInput, setPinInput] = reactExports.useState("");
23837
23903
  const [isFinishing, setIsFinishing] = reactExports.useState(false);
23838
23904
  const [authError, setAuthError] = reactExports.useState("");
23905
+ const [isCopied, setIsCopied] = reactExports.useState(false);
23906
+ const copyCodeToClipboard = reactExports.useCallback(async (codeToCopy) => {
23907
+ const code = codeToCopy || deviceFlowData?.user_code;
23908
+ if (!code) return;
23909
+ try {
23910
+ await navigator.clipboard.writeText(code);
23911
+ setIsCopied(true);
23912
+ setTimeout(() => setIsCopied(false), 2500);
23913
+ } catch (err) {
23914
+ console.warn("Failed to copy to clipboard", err);
23915
+ }
23916
+ }, [deviceFlowData]);
23839
23917
  const startAuth = async () => {
23840
23918
  try {
23841
23919
  setAuthStatus("waiting");
23920
+ setAuthError("");
23842
23921
  const data = await window.api.startDeviceFlow();
23843
23922
  setDeviceFlowData(data);
23844
- if (data.verification_uri_complete) {
23845
- await window.api.openExternal(data.verification_uri_complete);
23846
- } else {
23847
- await window.api.openExternal(data.verification_uri);
23923
+ if (data?.user_code) {
23924
+ copyCodeToClipboard(data.user_code);
23848
23925
  }
23849
- await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
23926
+ await window.api.pollDeviceFlow(data.device_code, (data.interval || 5) * 1e3);
23850
23927
  setAuthStatus("success");
23851
23928
  setTimeout(() => {
23852
23929
  setStep(3);
23853
- }, 1500);
23930
+ }, 1200);
23854
23931
  } catch (e) {
23855
23932
  setAuthStatus("error");
23856
- setAuthError(e.message);
23933
+ setAuthError(e.message || "Authentication timed out or failed.");
23857
23934
  }
23858
23935
  };
23859
- const handleNumpadPress = (key) => {
23860
- if (pinInput.length < 3) {
23861
- const next = pinInput + key;
23862
- setPinInput(next);
23863
- if (next.length === 3) {
23864
- localStorage.setItem("gitelectron-pin", next);
23865
- setTimeout(() => {
23866
- setStep(4);
23867
- }, 500);
23936
+ const handleNumpadPress = reactExports.useCallback((key) => {
23937
+ setPinInput((prev) => {
23938
+ if (prev.length < 3) {
23939
+ const next = prev + key;
23940
+ if (next.length === 3) {
23941
+ localStorage.setItem("gitelectron-pin", next);
23942
+ setTimeout(() => {
23943
+ setStep(4);
23944
+ }, 450);
23945
+ }
23946
+ return next;
23868
23947
  }
23869
- }
23870
- };
23871
- const handleNumpadDelete = () => {
23948
+ return prev;
23949
+ });
23950
+ }, []);
23951
+ const handleNumpadDelete = reactExports.useCallback(() => {
23872
23952
  setPinInput((prev) => prev.slice(0, -1));
23873
- };
23953
+ }, []);
23954
+ const handleNumpadClear = reactExports.useCallback(() => {
23955
+ setPinInput("");
23956
+ }, []);
23957
+ reactExports.useEffect(() => {
23958
+ if (step !== 3) return;
23959
+ const handleKeyDown = (e) => {
23960
+ const targetTag = e.target?.tagName;
23961
+ if (targetTag === "INPUT" || targetTag === "TEXTAREA") return;
23962
+ if (e.key >= "0" && e.key <= "9" || e.key === "*" || e.key === "#") {
23963
+ e.preventDefault();
23964
+ handleNumpadPress(e.key);
23965
+ } else if (e.key === "Backspace") {
23966
+ e.preventDefault();
23967
+ handleNumpadDelete();
23968
+ } else if (e.key === "Escape" || e.key === "Delete") {
23969
+ e.preventDefault();
23970
+ handleNumpadClear();
23971
+ }
23972
+ };
23973
+ window.addEventListener("keydown", handleKeyDown);
23974
+ return () => window.removeEventListener("keydown", handleKeyDown);
23975
+ }, [step, handleNumpadPress, handleNumpadDelete, handleNumpadClear]);
23874
23976
  const finishSetup = () => {
23875
23977
  setIsFinishing(true);
23876
23978
  localStorage.setItem("gitelectron-welcomed", "true");
23877
23979
  setTimeout(() => {
23878
23980
  onComplete();
23879
- }, 1e3);
23981
+ }, 600);
23880
23982
  };
23881
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[999] bg-gray-900 text-white font-sans flex items-center justify-center overflow-hidden animate-fade-in p-4 sm:p-6", children: [
23882
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-0 opacity-20 pointer-events-none", children: [
23883
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-20%] left-[-10%] w-[50%] h-[50%] bg-blue-600 rounded-full blur-[120px] mix-blend-screen animate-pulse" }),
23884
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-[-20%] right-[-10%] w-[60%] h-[60%] bg-purple-600 rounded-full blur-[150px] mix-blend-screen animate-pulse animation-delay-2000" })
23983
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[999] bg-gray-950/90 backdrop-blur-md text-white font-sans flex items-center justify-center p-3 sm:p-5 md:p-6 overflow-hidden animate-fade-in select-none", children: [
23984
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-0 opacity-25 pointer-events-none overflow-hidden", children: [
23985
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute -top-32 -left-32 w-96 h-96 sm:w-[480px] sm:h-[480px] bg-blue-600 rounded-full blur-[140px] mix-blend-screen animate-pulse" }),
23986
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute -bottom-32 -right-32 w-96 h-96 sm:w-[500px] sm:h-[500px] bg-purple-600 rounded-full blur-[160px] mix-blend-screen animate-pulse animation-delay-2000" })
23885
23987
  ] }),
23886
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-full max-w-2xl max-h-[90vh] bg-surface rounded-2xl shadow-2xl overflow-hidden flex flex-col", children: [
23887
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex h-1.5 w-full bg-surface-hover shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23988
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-full max-w-xl sm:max-w-2xl max-h-[94vh] bg-surface/95 backdrop-blur-2xl rounded-2xl sm:rounded-3xl border border-white/10 shadow-[0_25px_60px_-15px_rgba(0,0,0,0.7)] overflow-hidden flex flex-col", children: [
23989
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 bg-surface/60 border-b border-border/40 px-5 sm:px-7 py-3 flex items-center justify-between", children: [
23990
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: step > 1 && step < 4 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
23991
+ "button",
23992
+ {
23993
+ type: "button",
23994
+ onClick: () => setStep((s) => s - 1),
23995
+ className: "px-2.5 py-1 text-gray-400 hover:text-white hover:bg-white/10 rounded-lg transition-colors flex items-center gap-1.5 text-xs font-medium cursor-pointer",
23996
+ title: "Go to previous step",
23997
+ children: [
23998
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiArrowLeft, { className: "text-sm" }),
23999
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Back" })
24000
+ ]
24001
+ }
24002
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs font-semibold text-gray-400", children: [
24003
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-blue-500 animate-pulse" }),
24004
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Quick Setup" })
24005
+ ] }) }),
24006
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2.5", children: [
24007
+ [1, 2, 3, 4].map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx(
24008
+ "div",
24009
+ {
24010
+ className: `transition-all duration-300 rounded-full ${s === step ? "w-7 h-1.5 bg-gradient-to-r from-blue-500 to-purple-500" : s < step ? "w-1.5 h-1.5 bg-blue-500" : "w-1.5 h-1.5 bg-gray-700"}`
24011
+ },
24012
+ s
24013
+ )),
24014
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs font-medium text-gray-400 ml-2", children: [
24015
+ "Step ",
24016
+ step,
24017
+ " of 4"
24018
+ ] })
24019
+ ] })
24020
+ ] }),
24021
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-1 w-full bg-surface-hover/80 shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23888
24022
  "div",
23889
24023
  {
23890
- className: "h-full bg-gradient-to-r from-blue-500 to-purple-500 transition-all duration-700 ease-out",
23891
- style: { width: `${(step - 1) / 3 * 100}%` }
24024
+ className: "h-full bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 transition-all duration-500 ease-out",
24025
+ style: { width: `${step / 4 * 100}%` }
23892
24026
  }
23893
24027
  ) }),
23894
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 sm:p-10 flex-grow flex flex-col min-h-[400px] sm:min-h-[450px] overflow-y-auto", children: [
23895
- step === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-grow text-center animate-fade-in py-4", children: [
23896
- /* @__PURE__ */ jsxRuntimeExports.jsx(
23897
- "img",
23898
- {
23899
- src: logo,
23900
- alt: "Logo",
23901
- className: "w-20 h-20 sm:w-24 sm:h-24 mb-6 drop-shadow-[0_0_15px_rgba(59,130,246,0.5)]"
23902
- }
23903
- ),
23904
- /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-3xl sm:text-4xl font-bold mb-2 bg-gradient-to-r from-white to-gray-400 bg-clip-text text-transparent", children: "Welcome to GitElectron" }),
23905
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg sm:text-xl text-gray-400 mb-8 sm:mb-10 font-light px-4", children: "I just write code. GitElectron takes care of Git." }),
23906
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6 w-full mb-8 sm:mb-12 text-left px-2 sm:px-0", children: [
23907
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface-hover/50 p-5 sm:p-6 rounded-xl border border-border flex flex-col justify-center transition-transform hover:scale-[1.02] hover:bg-surface-hover/80", children: [
23908
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-semibold text-blue-400 mb-2 text-base sm:text-lg", children: "Invisible Auto-Sync" }),
23909
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs sm:text-sm text-gray-400 leading-relaxed", children: "Silently watches your files and pushes to GitHub automatically." })
23910
- ] }),
23911
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface-hover/50 p-5 sm:p-6 rounded-xl border border-border flex flex-col justify-center transition-transform hover:scale-[1.02] hover:bg-surface-hover/80", children: [
23912
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-semibold text-purple-400 mb-2 text-base sm:text-lg", children: "Universal CLI" }),
23913
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs sm:text-sm text-gray-400 leading-relaxed", children: [
24028
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-5 sm:p-7 md:p-8 flex-1 overflow-y-auto custom-scrollbar flex flex-col items-center", children: [
24029
+ step === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 my-auto flex flex-col items-center justify-center text-center animate-fade-in w-full max-w-lg mx-auto py-2", children: [
24030
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 relative mb-5 sm:mb-6", children: [
24031
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-blue-500/30 rounded-full blur-2xl animate-pulse" }),
24032
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24033
+ "img",
24034
+ {
24035
+ src: logo,
24036
+ alt: "GitElectron Logo",
24037
+ className: "w-18 h-18 sm:w-22 sm:h-22 relative z-10 drop-shadow-[0_0_25px_rgba(59,130,246,0.6)] object-contain"
24038
+ }
24039
+ )
24040
+ ] }),
24041
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "shrink-0 text-3xl sm:text-4xl font-extrabold mb-2.5 tracking-tight bg-gradient-to-r from-white via-gray-100 to-gray-300 bg-clip-text text-transparent", children: "Welcome to GitElectron" }),
24042
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "shrink-0 text-sm sm:text-base text-gray-300 mb-6 sm:mb-8 font-light max-w-md px-2 leading-relaxed", children: "I just write code. GitElectron takes care of Git." }),
24043
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 grid grid-cols-1 sm:grid-cols-2 gap-3.5 sm:gap-4.5 w-full mb-6 sm:mb-8 text-left", children: [
24044
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface-hover/40 backdrop-blur-md p-4 sm:p-5 rounded-2xl border border-white/10 flex flex-col justify-between transition-all duration-300 hover:border-blue-500/40 hover:bg-surface-hover/70 shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24045
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 rounded-lg bg-blue-500/10 border border-blue-500/20 flex items-center justify-center text-blue-400 mb-2.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiRefreshCw, { className: "text-base" }) }),
24046
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-bold text-white text-sm sm:text-base mb-1", children: "Invisible Auto-Sync" }),
24047
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-300 leading-relaxed font-normal", children: "Silently watches your files and pushes to GitHub automatically in the background." })
24048
+ ] }) }),
24049
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface-hover/40 backdrop-blur-md p-4 sm:p-5 rounded-2xl border border-white/10 flex flex-col justify-between transition-all duration-300 hover:border-purple-500/40 hover:bg-surface-hover/70 shadow-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24050
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 rounded-lg bg-purple-500/10 border border-purple-500/20 flex items-center justify-center text-purple-400 mb-2.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiTerminal, { className: "text-base" }) }),
24051
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-bold text-white text-sm sm:text-base mb-1", children: "Universal CLI" }),
24052
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-300 leading-relaxed font-normal", children: [
23914
24053
  "Run",
23915
24054
  " ",
23916
- /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "bg-canvas px-1 py-0.5 rounded text-purple-300", children: "gitelectron open" }),
24055
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "bg-black/50 px-1.5 py-0.5 rounded text-purple-300 font-mono text-xs border border-purple-500/20", children: "gitelectron open" }),
23917
24056
  " ",
23918
24057
  "from any terminal to launch instantly."
23919
24058
  ] })
23920
- ] })
24059
+ ] }) })
23921
24060
  ] }),
23922
24061
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
23923
24062
  "button",
23924
24063
  {
24064
+ type: "button",
23925
24065
  onClick: () => setStep(2),
23926
- className: "group relative px-6 sm:px-8 py-3 bg-blue-600 hover:bg-blue-500 text-white rounded-full font-bold transition-all shadow-[0_0_20px_rgba(37,99,235,0.4)] hover:shadow-[0_0_30px_rgba(37,99,235,0.6)] flex items-center gap-2 mt-auto",
24066
+ className: "shrink-0 group relative px-8 sm:px-10 py-3 sm:py-3.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white rounded-full font-bold text-sm sm:text-base transition-all duration-300 shadow-[0_0_25px_rgba(37,99,235,0.4)] hover:shadow-[0_0_35px_rgba(37,99,235,0.6)] hover:scale-[1.02] active:scale-[0.98] flex items-center gap-2 cursor-pointer",
23927
24067
  children: [
23928
- "Get Started",
23929
- /* @__PURE__ */ jsxRuntimeExports.jsx(FiChevronRight, { className: "group-hover:translate-x-1 transition-transform" })
24068
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Get Started" }),
24069
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiChevronRight, { className: "text-lg group-hover:translate-x-1 transition-transform" })
23930
24070
  ]
23931
24071
  }
23932
24072
  )
23933
24073
  ] }),
23934
- step === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-grow animate-fade-in py-4", children: [
23935
- /* @__PURE__ */ jsxRuntimeExports.jsx(FiGithub, { className: "text-5xl sm:text-6xl text-gray-300 mb-6" }),
23936
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-2xl sm:text-3xl font-bold mb-3", children: "Connect GitHub" }),
23937
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm sm:text-base text-gray-400 mb-8 text-center max-w-md px-4", children: "Securely link your GitHub account using OAuth. Your credentials are encrypted locally by your OS keychain." }),
23938
- authStatus === "pending" && /* @__PURE__ */ jsxRuntimeExports.jsxs(
24074
+ step === 2 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 my-auto flex flex-col items-center justify-center text-center animate-fade-in w-full max-w-lg mx-auto py-2", children: [
24075
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 relative mb-4 sm:mb-5", children: [
24076
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-white/10 rounded-full blur-xl" }),
24077
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiGithub, { className: "text-5xl sm:text-6xl text-white relative z-10 drop-shadow-[0_0_15px_rgba(255,255,255,0.2)]" })
24078
+ ] }),
24079
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "shrink-0 text-2xl sm:text-3xl font-extrabold mb-2 text-white", children: "Connect GitHub" }),
24080
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "shrink-0 text-xs sm:text-sm text-gray-300 mb-6 sm:mb-8 max-w-md px-2 leading-relaxed", children: "Securely link your GitHub account using OAuth. Your credentials are encrypted locally by your OS keychain." }),
24081
+ authStatus === "pending" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 flex flex-col items-center gap-4 w-full max-w-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
23939
24082
  "button",
23940
24083
  {
24084
+ type: "button",
23941
24085
  onClick: startAuth,
23942
- className: "px-6 sm:px-8 py-3 bg-surface-hover hover:bg-border text-white rounded-full font-bold transition-colors border border-border flex items-center gap-3",
24086
+ className: "w-full py-3.5 px-6 bg-white hover:bg-gray-100 text-gray-950 rounded-xl font-bold text-sm sm:text-base transition-all shadow-[0_0_25px_rgba(255,255,255,0.25)] hover:shadow-[0_0_35px_rgba(255,255,255,0.4)] hover:scale-[1.02] active:scale-[0.98] flex items-center justify-center gap-3 cursor-pointer",
23943
24087
  children: [
23944
24088
  /* @__PURE__ */ jsxRuntimeExports.jsx(FiGithub, { className: "text-xl" }),
23945
- "Authenticate Now"
24089
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Authenticate with GitHub" })
23946
24090
  ]
23947
24091
  }
23948
- ),
23949
- authStatus === "waiting" && deviceFlowData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/80 p-5 sm:p-6 rounded-xl border border-border text-center w-full max-w-sm", children: [
23950
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-400 mb-2", children: "Your Device Code:" }),
23951
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-3xl sm:text-4xl font-mono tracking-widest text-blue-400 font-bold mb-4 bg-canvas py-3 rounded-lg border border-border break-all px-2", children: deviceFlowData.user_code }),
23952
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs sm:text-sm text-gray-500 mb-4 px-2", children: [
23953
- "Your browser should open automatically. If not, go to",
23954
- /* @__PURE__ */ jsxRuntimeExports.jsx(
23955
- "a",
24092
+ ) }),
24093
+ authStatus === "waiting" && deviceFlowData && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 w-full max-w-md bg-surface-hover/40 backdrop-blur-md p-5 sm:p-6 rounded-2xl border border-white/10 shadow-2xl flex flex-col items-center gap-4", children: [
24094
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 flex items-center justify-between w-full px-1", children: [
24095
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-semibold uppercase tracking-wider text-gray-400", children: "Your One-Time Device Code:" }),
24096
+ isCopied && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs font-bold text-emerald-400 flex items-center gap-1 animate-fade-in", children: [
24097
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheck, { className: "text-xs" }),
24098
+ " Auto-copied!"
24099
+ ] })
24100
+ ] }),
24101
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 w-full bg-black/70 rounded-2xl border border-blue-500/40 p-3.5 sm:p-4 flex items-center justify-between gap-3 shadow-[0_0_25px_rgba(59,130,246,0.15)]", children: [
24102
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-2xl sm:text-3xl tracking-widest text-blue-400 font-extrabold select-all pl-2", children: deviceFlowData.user_code }),
24103
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24104
+ "button",
23956
24105
  {
23957
- href: deviceFlowData.verification_uri,
23958
- target: "_blank",
23959
- rel: "noreferrer",
23960
- className: "text-blue-400 ml-1 hover:underline break-all block mt-1",
23961
- children: deviceFlowData.verification_uri
24106
+ type: "button",
24107
+ onClick: () => copyCodeToClipboard(),
24108
+ className: `px-3 py-2 rounded-xl font-bold text-xs flex items-center gap-1.5 transition-all cursor-pointer ${isCopied ? "bg-emerald-500/20 text-emerald-300 border border-emerald-500/40" : "bg-blue-500/20 hover:bg-blue-500/30 text-blue-300 hover:text-white border border-blue-500/40 active:scale-95"}`,
24109
+ title: "Copy code to clipboard",
24110
+ children: [
24111
+ isCopied ? /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheck, { className: "text-sm" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FiCopy, { className: "text-sm" }),
24112
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isCopied ? "Copied" : "Copy Code" })
24113
+ ]
23962
24114
  }
23963
24115
  )
23964
24116
  ] }),
23965
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }) })
24117
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 w-full flex flex-col gap-2 text-center", children: [
24118
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24119
+ "button",
24120
+ {
24121
+ type: "button",
24122
+ onClick: () => window.api.openExternal(
24123
+ deviceFlowData.verification_uri_complete || deviceFlowData.verification_uri
24124
+ ),
24125
+ className: "w-full py-2.5 px-4 bg-blue-600 hover:bg-blue-500 text-white rounded-xl text-xs sm:text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-[0_0_15px_rgba(37,99,235,0.3)] cursor-pointer",
24126
+ children: [
24127
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Open GitHub Device Verification" }),
24128
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiExternalLink, { className: "text-sm" })
24129
+ ]
24130
+ }
24131
+ ),
24132
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] text-gray-400", children: "Browser tab already opened automatically. If closed, click button above." })
24133
+ ] }),
24134
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 flex items-center gap-2 text-xs text-gray-300 bg-black/40 px-3.5 py-1.5 rounded-full border border-white/10", children: [
24135
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-3 h-3 border-2 border-blue-500 border-t-transparent rounded-full animate-spin" }),
24136
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Waiting for browser approval..." })
24137
+ ] })
23966
24138
  ] }),
23967
- authStatus === "success" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center text-green-400", children: [
23968
- /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: "text-5xl mb-3" }),
23969
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-bold text-lg text-center", children: "Successfully Authenticated!" })
24139
+ authStatus === "success" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 flex flex-col items-center text-emerald-400 animate-fade-in py-5", children: [
24140
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative mb-3", children: [
24141
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: "text-5xl sm:text-6xl text-emerald-400" }),
24142
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-emerald-500 rounded-full blur-xl opacity-40" })
24143
+ ] }),
24144
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-white mb-1", children: "Successfully Authenticated!" }),
24145
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-300", children: "GitHub account connected. Proceeding to security setup..." })
23970
24146
  ] }),
23971
- authStatus === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
23972
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-red-400 font-bold mb-2", children: "Authentication Failed" }),
23973
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-500 mb-4 px-4", children: authError }),
24147
+ authStatus === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 w-full max-w-sm bg-red-950/40 border border-red-500/30 p-5 rounded-2xl text-center flex flex-col gap-3", children: [
24148
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiAlertCircle, { className: "text-2xl text-red-400 mx-auto" }),
24149
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24150
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-sm font-bold text-red-300 mb-0.5", children: "Authentication Failed" }),
24151
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-300", children: authError })
24152
+ ] }),
23974
24153
  /* @__PURE__ */ jsxRuntimeExports.jsx(
23975
24154
  "button",
23976
24155
  {
24156
+ type: "button",
23977
24157
  onClick: () => setAuthStatus("pending"),
23978
- className: "text-blue-400 hover:underline",
24158
+ className: "w-full py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-lg text-xs font-bold transition-all cursor-pointer",
23979
24159
  children: "Try Again"
23980
24160
  }
23981
24161
  )
23982
24162
  ] })
23983
24163
  ] }),
23984
- step === 3 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center flex-grow animate-fade-in py-4", children: [
23985
- /* @__PURE__ */ jsxRuntimeExports.jsx(FiShield, { className: "text-4xl sm:text-5xl text-purple-400 mb-4" }),
23986
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-2xl sm:text-3xl font-bold mb-2 text-center", children: "Set Lockscreen PIN" }),
23987
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm sm:text-base text-gray-400 mb-6 sm:mb-8 text-center max-w-sm px-4", children: "GitElectron locks itself when idle to protect your code. Enter a 3-digit PIN." }),
23988
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex gap-4 justify-center mb-6 sm:mb-8", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
23989
- "div",
23990
- {
23991
- className: `w-3 h-3 sm:w-4 sm:h-4 rounded-full transition-all duration-300 ${i < pinInput.length ? "bg-purple-500 scale-110 shadow-[0_0_10px_rgba(168,85,247,0.8)]" : "bg-border"}`
23992
- },
23993
- i
23994
- )) }),
23995
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-3 gap-3 sm:gap-4 w-56 sm:w-64", children: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"].map((key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
24164
+ step === 3 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 my-auto flex flex-col items-center justify-center text-center animate-fade-in w-full max-w-sm mx-auto py-1", children: [
24165
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 relative mb-2", children: [
24166
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-purple-500/20 rounded-full blur-xl" }),
24167
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiShield, { className: "text-4xl text-purple-400 relative z-10" })
24168
+ ] }),
24169
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "shrink-0 text-xl sm:text-2xl font-extrabold mb-1 text-white", children: "Set Lockscreen PIN" }),
24170
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "shrink-0 text-xs text-gray-400 max-w-xs px-2 mb-2 leading-relaxed", children: "GitElectron locks itself when idle to protect your workspace." }),
24171
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 text-[11px] font-bold uppercase tracking-wider text-purple-300 mb-3", children: "Enter a 3-digit PIN" }),
24172
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 flex gap-4 sm:gap-5 justify-center items-center mb-4", children: [0, 1, 2].map((i) => {
24173
+ const isFilled = i < pinInput.length;
24174
+ const isCurrent = i === pinInput.length;
24175
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24176
+ "div",
24177
+ {
24178
+ className: `shrink-0 transition-all duration-300 rounded-full flex items-center justify-center ${isFilled ? "w-4 h-4 sm:w-4.5 sm:h-4.5 bg-gradient-to-r from-purple-500 to-indigo-500 scale-125 shadow-[0_0_12px_rgba(168,85,247,0.9)]" : isCurrent ? "w-3.5 h-3.5 sm:w-4 sm:h-4 border-2 border-purple-400 bg-purple-400/20 scale-110" : "w-3 h-3 sm:w-3.5 sm:h-3.5 bg-gray-800 border border-gray-600"}`
24179
+ },
24180
+ i
24181
+ );
24182
+ }) }),
24183
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 w-56 sm:w-64 grid grid-cols-3 gap-2.5 sm:gap-3", children: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#"].map((key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
23996
24184
  "button",
23997
24185
  {
24186
+ type: "button",
23998
24187
  onClick: () => handleNumpadPress(key),
23999
- className: "w-full aspect-square flex items-center justify-center text-xl sm:text-2xl font-bold rounded-xl bg-surface-hover/80 hover:bg-surface border border-border transition-colors",
24188
+ className: "shrink-0 aspect-square flex items-center justify-center text-lg sm:text-xl font-bold rounded-2xl bg-surface-hover/80 hover:bg-surface-hover/50 active:scale-95 text-white border border-white/10 hover:border-purple-500/40 transition-all shadow-sm cursor-pointer select-none",
24000
24189
  children: key
24001
24190
  },
24002
24191
  key
24003
24192
  )) }),
24004
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-56 sm:w-64 mt-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24193
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shrink-0 w-56 sm:w-64 mt-2.5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24005
24194
  "button",
24006
24195
  {
24196
+ type: "button",
24007
24197
  onClick: handleNumpadDelete,
24008
24198
  disabled: pinInput.length === 0,
24009
- className: "w-full py-2 sm:py-3 flex items-center justify-center text-lg sm:text-xl font-bold rounded-xl bg-surface-hover/80 hover:bg-surface border border-border transition-colors text-gray-400 disabled:opacity-30 disabled:hover:bg-surface-hover/80",
24199
+ className: "shrink-0 w-full py-2 sm:py-2.5 flex items-center justify-center text-xs sm:text-sm font-bold rounded-xl bg-surface-hover/60 hover:bg-surface-hover active:scale-98 text-gray-300 hover:text-white border border-white/10 transition-all disabled:opacity-20 disabled:pointer-events-none cursor-pointer tracking-wider",
24010
24200
  children: "DEL"
24011
24201
  }
24012
- ) })
24202
+ ) }),
24203
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "shrink-0 text-[11px] text-gray-400 mt-3 font-medium", children: "Keyboard supported (0-9, *, #, Backspace)" })
24013
24204
  ] }),
24014
24205
  step === 4 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
24015
24206
  "div",
24016
24207
  {
24017
- className: `flex flex-col items-center justify-center flex-grow text-center transition-opacity duration-500 ${isFinishing ? "opacity-0 scale-95" : "opacity-100 animate-fade-in"} py-4`,
24208
+ className: `shrink-0 my-auto flex flex-col items-center justify-center text-center transition-all duration-500 w-full max-w-lg mx-auto py-2 ${isFinishing ? "opacity-0 scale-95" : "opacity-100 animate-fade-in"}`,
24018
24209
  children: [
24019
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative mb-6", children: [
24020
- /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: "text-6xl sm:text-7xl text-blue-500 relative z-10" }),
24021
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-blue-500 rounded-full blur-[20px] opacity-50 z-0" })
24210
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 relative mb-5 sm:mb-6", children: [
24211
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-blue-500/30 rounded-full blur-2xl animate-pulse" }),
24212
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute -inset-2 bg-gradient-to-r from-blue-500 to-purple-500 rounded-full blur-lg opacity-40 animate-pulse" }),
24213
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-18 h-18 sm:w-22 sm:h-22 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white shadow-2xl relative z-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheckCircle, { className: "text-3xl sm:text-4xl text-white" }) })
24022
24214
  ] }),
24023
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-3xl sm:text-4xl font-bold mb-3", children: "You're All Set!" }),
24024
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-lg sm:text-xl text-gray-400 mb-8 sm:mb-10 max-w-md px-4", children: "Your environment is secured and connected. You can now drag and drop any folder to start Auto-Syncing." }),
24025
- /* @__PURE__ */ jsxRuntimeExports.jsx(
24215
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "shrink-0 text-2xl sm:text-3xl md:text-4xl font-extrabold mb-2.5 text-white tracking-tight", children: "You're All Set!" }),
24216
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "shrink-0 text-xs sm:text-sm md:text-base text-gray-300 mb-6 sm:mb-8 max-w-md px-2 leading-relaxed", children: "Your environment is secured and connected. You can now drag and drop any folder to start Auto-Syncing immediately." }),
24217
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "shrink-0 flex flex-wrap items-center justify-center gap-2.5 sm:gap-3 mb-6 sm:mb-8 max-w-md", children: [
24218
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-white/5 border border-white/10 text-xs text-gray-300", children: [
24219
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheck, { className: "text-emerald-400" }),
24220
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Auto-Push Engine Primed" })
24221
+ ] }),
24222
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-white/5 border border-white/10 text-xs text-gray-300", children: [
24223
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheck, { className: "text-emerald-400" }),
24224
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "OS Keychain Secured" })
24225
+ ] }),
24226
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-white/5 border border-white/10 text-xs text-gray-300", children: [
24227
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiCheck, { className: "text-emerald-400" }),
24228
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Universal CLI Ready" })
24229
+ ] })
24230
+ ] }),
24231
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24026
24232
  "button",
24027
24233
  {
24234
+ type: "button",
24028
24235
  onClick: finishSetup,
24029
- className: "px-8 sm:px-10 py-3 sm:py-4 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-500 hover:to-purple-500 text-white rounded-full font-bold text-base sm:text-lg transition-all shadow-[0_0_20px_rgba(139,92,246,0.4)] hover:shadow-[0_0_30px_rgba(139,92,246,0.6)] hover:scale-105",
24030
- children: "Launch GitElectron"
24236
+ className: "shrink-0 group relative px-8 sm:px-12 py-3.5 sm:py-4 bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 hover:from-blue-500 hover:via-indigo-500 hover:to-purple-500 text-white rounded-full font-extrabold text-sm sm:text-base md:text-lg transition-all duration-300 shadow-[0_0_35px_rgba(99,102,241,0.5)] hover:shadow-[0_0_50px_rgba(99,102,241,0.7)] hover:scale-105 active:scale-95 flex items-center gap-2.5 cursor-pointer",
24237
+ children: [
24238
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Launch GitElectron" }),
24239
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FiChevronRight, { className: "text-xl group-hover:translate-x-1.5 transition-transform" })
24240
+ ]
24031
24241
  }
24032
24242
  )
24033
24243
  ]
@@ -24866,83 +25076,176 @@ const AuthCodePrinter = ({ code }) => {
24866
25076
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter" }) })
24867
25077
  ] }) });
24868
25078
  };
25079
+ const ROW_HEIGHT = 30;
25080
+ const CONTAINER_HEIGHT = 280;
25081
+ const OVERSCAN = 10;
24869
25082
  const CommitReceiptPrinter = ({
24870
25083
  commit,
24871
25084
  onClose
24872
25085
  }) => {
24873
- const [isPrinted, setIsPrinted] = reactExports.useState(false);
25086
+ const [isPrinted, setIsPrinted] = reactExports.useState(true);
25087
+ const [searchQuery, setSearchQuery] = reactExports.useState("");
25088
+ const [scrollTop, setScrollTop] = reactExports.useState(0);
25089
+ const scrollRef = reactExports.useRef(null);
25090
+ const allFiles = reactExports.useMemo(() => {
25091
+ return commit?.diff?.files || [];
25092
+ }, [commit]);
25093
+ const filteredFiles = reactExports.useMemo(() => {
25094
+ if (!searchQuery.trim()) return allFiles;
25095
+ const q = searchQuery.toLowerCase().trim();
25096
+ return allFiles.filter((f) => f.file?.toLowerCase().includes(q));
25097
+ }, [allFiles, searchQuery]);
25098
+ const handleScroll = reactExports.useCallback((e) => {
25099
+ setScrollTop(e.currentTarget.scrollTop);
25100
+ }, []);
25101
+ const totalCount = filteredFiles.length;
25102
+ const totalVirtualHeight = totalCount * ROW_HEIGHT;
25103
+ const startIndex = Math.max(0, Math.floor(scrollTop / ROW_HEIGHT) - OVERSCAN);
25104
+ const endIndex = Math.min(
25105
+ totalCount,
25106
+ Math.ceil((scrollTop + CONTAINER_HEIGHT) / ROW_HEIGHT) + OVERSCAN
25107
+ );
25108
+ const visibleFiles = filteredFiles.slice(startIndex, endIndex);
25109
+ const offsetY = startIndex * ROW_HEIGHT;
25110
+ const handleSearchChange = (val) => {
25111
+ setSearchQuery(val);
25112
+ setScrollTop(0);
25113
+ if (scrollRef.current) {
25114
+ scrollRef.current.scrollTop = 0;
25115
+ }
25116
+ };
24874
25117
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `commit-printer-wrapper ${isPrinted ? "is-printed" : ""}`, children: [
24875
25118
  onClose && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "printer-close-btn", onClick: onClose, title: "Close Printer", children: "✕" }),
24876
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer" }),
24877
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "printer-display", children: [
24878
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children: " Click to print changes" }),
24879
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "letter-wrapper", children: [
24880
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "P" }),
24881
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "r" }),
24882
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24883
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24884
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "t" }),
24885
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24886
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24887
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "g" }),
24888
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24889
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24890
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." })
24891
- ] })
25119
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "printer-machine-head", children: [
25120
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer" }),
25121
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer-display", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children: searchQuery ? `${filteredFiles.length} found` : `${allFiles.length} files` }) }),
25122
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
25123
+ "button",
25124
+ {
25125
+ className: "print-button",
25126
+ onClick: () => setIsPrinted(!isPrinted),
25127
+ title: isPrinted ? "Toggle Receipt" : "Print Receipt",
25128
+ children: "🖨"
25129
+ }
25130
+ )
24892
25131
  ] }),
24893
- /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "print-button", onClick: () => setIsPrinted(true), children: "🖨" }),
25132
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer-slot-shadow" }),
24894
25133
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt", children: [
24895
25134
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-header", children: [
24896
- "Commit Changes ",
24897
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24898
- "Hash: ",
24899
- commit.hash.substring(0, 7),
24900
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "logo text-gray-800 opacity-80", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { height: "40", viewBox: "0 0 16 16", width: "40", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" }) }) })
25135
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25136
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-title", children: "COMMIT RECEIPT" }),
25137
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-hash", children: [
25138
+ "#",
25139
+ commit.hash ? commit.hash.substring(0, 7) : "0000000"
25140
+ ] })
25141
+ ] }),
25142
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "logo text-gray-800 opacity-80", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { height: "34", viewBox: "0 0 16 16", width: "34", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" }) }) })
24901
25143
  ] }),
24902
25144
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-subheader", children: [
24903
- "Author: ",
24904
- commit.author_name,
24905
- " ",
24906
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24907
- new Date(commit.date).toLocaleString()
24908
- ] }),
24909
- /* @__PURE__ */ jsxRuntimeExports.jsx("table", { className: "receipt-table", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
24910
- /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24911
- /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "File" }),
24912
- /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Ins" }),
24913
- /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Del" })
25145
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25146
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-semibold", children: "Author:" }),
25147
+ " ",
25148
+ commit.author_name || "Git User"
24914
25149
  ] }),
24915
- commit.diff?.files?.map((f, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24916
- /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "truncate max-w-[120px]", title: f.file, children: f.file.split("/").pop() }),
24917
- /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24918
- "+",
24919
- f.insertions
24920
- ] }),
24921
- /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24922
- "-",
24923
- f.deletions
24924
- ] })
24925
- ] }, idx)),
25150
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: new Date(commit.date).toLocaleString() })
25151
+ ] }),
25152
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-search-bar", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25153
+ "input",
25154
+ {
25155
+ type: "text",
25156
+ placeholder: `Search all ${allFiles.length.toLocaleString()} files...`,
25157
+ value: searchQuery,
25158
+ onChange: (e) => handleSearchChange(e.target.value),
25159
+ className: "receipt-search-input"
25160
+ }
25161
+ ) }),
25162
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-table-header", children: [
25163
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "58%" }, children: "FILE" }),
25164
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "21%", textAlign: "right" }, children: "INS" }),
25165
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "21%", textAlign: "right" }, children: "DEL" })
25166
+ ] }),
25167
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
25168
+ "div",
25169
+ {
25170
+ ref: scrollRef,
25171
+ className: "receipt-table-scroll custom-scrollbar",
25172
+ onScroll: handleScroll,
25173
+ style: { height: `${CONTAINER_HEIGHT}px` },
25174
+ children: filteredFiles.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-empty-state", children: "No matching files found." }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
25175
+ "div",
25176
+ {
25177
+ style: { height: `${totalVirtualHeight}px`, position: "relative", width: "100%" },
25178
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
25179
+ "div",
25180
+ {
25181
+ style: {
25182
+ position: "absolute",
25183
+ top: 0,
25184
+ left: 0,
25185
+ right: 0,
25186
+ transform: `translateY(${offsetY}px)`,
25187
+ willChange: "transform"
25188
+ },
25189
+ children: visibleFiles.map((f, idx) => {
25190
+ const actualIdx = startIndex + idx;
25191
+ const parts = f.file.split("/");
25192
+ const fileName = parts.pop() || f.file;
25193
+ const dirName = parts.length > 0 ? parts.join("/") + "/" : "";
25194
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
25195
+ "div",
25196
+ {
25197
+ className: "receipt-virtual-row",
25198
+ style: { height: `${ROW_HEIGHT}px` },
25199
+ children: [
25200
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "file-cell", title: f.file, style: { width: "58%" }, children: [
25201
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "file-name", children: fileName }),
25202
+ dirName && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "file-dir", children: dirName })
25203
+ ] }),
25204
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ins-cell text-green-600 font-bold", style: { width: "21%" }, children: [
25205
+ "+",
25206
+ f.insertions || 0
25207
+ ] }),
25208
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "del-cell text-red-600 font-bold", style: { width: "21%" }, children: [
25209
+ "-",
25210
+ f.deletions || 0
25211
+ ] })
25212
+ ]
25213
+ },
25214
+ actualIdx
25215
+ );
25216
+ })
25217
+ }
25218
+ )
25219
+ }
25220
+ )
25221
+ }
25222
+ ),
25223
+ /* @__PURE__ */ jsxRuntimeExports.jsx("table", { className: "receipt-summary-table", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
24926
25224
  /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-subtotal", children: [
24927
25225
  /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Files Changed" }),
24928
- /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: commit.diff?.changed || 0 })
25226
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: (commit.diff?.changed || allFiles.length).toLocaleString() })
24929
25227
  ] }),
24930
25228
  /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-tax", children: [
24931
- /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Insertions" }),
25229
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Total Insertions" }),
24932
25230
  /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24933
25231
  "+",
24934
- commit.diff?.insertions || 0
25232
+ (commit.diff?.insertions || 0).toLocaleString()
24935
25233
  ] })
24936
25234
  ] }),
24937
25235
  /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-total", children: [
24938
- /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Deletions" }),
25236
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Total Deletions" }),
24939
25237
  /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24940
25238
  "-",
24941
- commit.diff?.deletions || 0
25239
+ (commit.diff?.deletions || 0).toLocaleString()
24942
25240
  ] })
24943
25241
  ] })
24944
25242
  ] }) }),
24945
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-message text-center line-clamp-2", title: commit.message, children: commit.message })
25243
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-message", title: commit.message, children: [
25244
+ '"',
25245
+ commit.message,
25246
+ '"'
25247
+ ] }),
25248
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-barcode", children: "||| | |||| | ||| || |||| | || |||" })
24946
25249
  ] }) })
24947
25250
  ] });
24948
25251
  };
@@ -25816,14 +26119,28 @@ function App() {
25816
26119
  }
25817
26120
  }, [changesTab, collaboratedRepos.length]);
25818
26121
  reactExports.useEffect(() => {
26122
+ let invInterval = null;
25819
26123
  if (authStatus.status === "Verified") {
25820
26124
  window.api.getCollaboratedRepos().then((repos) => {
25821
26125
  setCollaboratedRepos(repos);
25822
26126
  }).catch((err) => console.error(err));
26127
+ window.api.getUserInvitations().then((invs) => {
26128
+ setInvitations(invs || []);
26129
+ }).catch((err) => console.error("Failed to fetch user invitations", err));
26130
+ invInterval = setInterval(() => {
26131
+ window.api.getUserInvitations().then((invs) => {
26132
+ setInvitations(invs || []);
26133
+ }).catch(() => {
26134
+ });
26135
+ }, 3e4);
25823
26136
  } else {
25824
26137
  setCollaboratedRepos([]);
26138
+ setInvitations([]);
25825
26139
  }
25826
- }, [authStatus.status]);
26140
+ return () => {
26141
+ if (invInterval) clearInterval(invInterval);
26142
+ };
26143
+ }, [authStatus.status, activeAccountId]);
25827
26144
  reactExports.useEffect(() => {
25828
26145
  window.api.getAuthStatus().then((auth) => {
25829
26146
  setAuthStatus(auth);
@@ -26326,11 +26643,6 @@ Are you SURE you want to link "${repoName}" to this folder?`
26326
26643
  await navigator.clipboard.writeText(data.user_code);
26327
26644
  } catch (err) {
26328
26645
  }
26329
- if (data.verification_uri_complete) {
26330
- await window.api.openExternal(data.verification_uri_complete);
26331
- } else {
26332
- await window.api.openExternal(data.verification_uri);
26333
- }
26334
26646
  await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
26335
26647
  setShowAuthModal(false);
26336
26648
  const accs = await window.api.getAccounts();
@@ -26586,11 +26898,6 @@ Are you SURE you want to link "${repoName}" to this folder?`
26586
26898
  await navigator.clipboard.writeText(data.user_code);
26587
26899
  } catch (err) {
26588
26900
  }
26589
- if (data.verification_uri_complete) {
26590
- await window.api.openExternal(data.verification_uri_complete);
26591
- } else {
26592
- await window.api.openExternal(data.verification_uri);
26593
- }
26594
26901
  await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
26595
26902
  setShowAuthModal(false);
26596
26903
  setIsDailyAuthMode(false);
@@ -29223,51 +29530,300 @@ Are you SURE you want to link "${repoName}" to this folder?`
29223
29530
  onChangeFolder: handleSelectCollabFolder
29224
29531
  }
29225
29532
  )
29226
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-secondary relative z-10", children: [
29227
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-24 h-24 mb-6 opacity-30 hover:opacity-50 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, alt: "Logo", className: "w-full h-full drop-shadow-md" }) }),
29228
- repoPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29229
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xl mb-2 text-primary font-semibold", children: "Folder Loaded" }),
29230
- /* @__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 }),
29231
- 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: [
29232
- /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Error:" }),
29233
- /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
29234
- errorMsg
29235
- ] }) : !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: [
29236
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
29237
- "svg",
29533
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col min-h-0 relative z-10", children: [
29534
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap justify-between items-center bg-surface/80 backdrop-blur-md border border-border p-3 rounded-xl mb-4 gap-4 relative z-50", children: [
29535
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-wrap items-center gap-4 text-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 relative", children: [
29536
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-secondary", children: "Auth:" }),
29537
+ accounts.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29538
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29539
+ "button",
29540
+ {
29541
+ onClick: () => setShowAccountDropdown(!showAccountDropdown),
29542
+ className: "flex items-center hover:bg-surface-hover px-2 py-1 rounded transition-colors",
29543
+ children: authStatus.status === "Verified" ? /* @__PURE__ */ jsxRuntimeExports.jsx(AuthHoverButton, { username: authStatus.username }) : authStatus.status === "Waiting" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-warning font-medium flex items-center", children: [
29544
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-6 h-6 mr-2 animate-bounce", children: "🚀" }),
29545
+ "Waiting..."
29546
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-danger font-medium flex items-center", children: [
29547
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-danger rounded-full mr-2" }),
29548
+ "Select Account",
29549
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29550
+ "svg",
29551
+ {
29552
+ className: "w-3 h-3 text-secondary ml-2",
29553
+ fill: "none",
29554
+ stroke: "currentColor",
29555
+ viewBox: "0 0 24 24",
29556
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29557
+ "path",
29558
+ {
29559
+ strokeLinecap: "round",
29560
+ strokeLinejoin: "round",
29561
+ strokeWidth: 2,
29562
+ d: "M19 9l-7 7-7-7"
29563
+ }
29564
+ )
29565
+ }
29566
+ )
29567
+ ] })
29568
+ }
29569
+ ),
29570
+ showAccountDropdown && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute top-full left-0 mt-2 w-64 max-w-[90vw] bg-surface backdrop-blur-xl border border-border rounded-lg shadow-2xl py-2 z-[60] account-dropdown-glass", children: [
29571
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-1.5 text-xs font-semibold text-secondary uppercase tracking-wider mb-1", children: "Your Accounts" }),
29572
+ accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
29573
+ "div",
29574
+ {
29575
+ className: "flex items-center justify-between px-3 py-2 hover:bg-surface-hover group transition-colors",
29576
+ children: [
29577
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
29578
+ "button",
29579
+ {
29580
+ className: "flex-1 flex items-center text-left",
29581
+ onClick: async () => {
29582
+ await window.api.switchAccount(acc.id);
29583
+ if (repoPath) {
29584
+ refreshRepoState();
29585
+ }
29586
+ setShowAccountDropdown(false);
29587
+ },
29588
+ children: [
29589
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29590
+ "div",
29591
+ {
29592
+ className: `w-2 h-2 rounded-full mr-3 ${activeAccountId === acc.id ? "bg-success" : "bg-transparent border border-border group-hover:border-primary"}`
29593
+ }
29594
+ ),
29595
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-primary font-medium", children: acc.username })
29596
+ ]
29597
+ }
29598
+ ),
29599
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29600
+ "button",
29601
+ {
29602
+ onClick: async (e) => {
29603
+ e.stopPropagation();
29604
+ await window.api.removeAccount(acc.id);
29605
+ const accs = await window.api.getAccounts();
29606
+ setAccounts(accs.accounts);
29607
+ setActiveAccountId(accs.activeAccountId);
29608
+ if (repoPath) {
29609
+ refreshRepoState();
29610
+ }
29611
+ },
29612
+ className: "text-secondary hover:text-danger p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",
29613
+ title: "Remove Account",
29614
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29615
+ "svg",
29616
+ {
29617
+ className: "w-3.5 h-3.5",
29618
+ fill: "none",
29619
+ stroke: "currentColor",
29620
+ viewBox: "0 0 24 24",
29621
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29622
+ "path",
29623
+ {
29624
+ strokeLinecap: "round",
29625
+ strokeLinejoin: "round",
29626
+ strokeWidth: 2,
29627
+ d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
29628
+ }
29629
+ )
29630
+ }
29631
+ )
29632
+ }
29633
+ )
29634
+ ]
29635
+ },
29636
+ acc.id
29637
+ )),
29638
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border mt-2 pt-2 px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
29639
+ "button",
29640
+ {
29641
+ onClick: () => {
29642
+ setShowAccountDropdown(false);
29643
+ handleStartAuth();
29644
+ },
29645
+ className: "w-full text-left px-3 py-2 text-sm text-primary hover:bg-surface-hover rounded-md flex items-center transition-colors",
29646
+ children: [
29647
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29648
+ "svg",
29649
+ {
29650
+ className: "w-4 h-4 mr-3 text-secondary",
29651
+ fill: "none",
29652
+ stroke: "currentColor",
29653
+ viewBox: "0 0 24 24",
29654
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29655
+ "path",
29656
+ {
29657
+ strokeLinecap: "round",
29658
+ strokeLinejoin: "round",
29659
+ strokeWidth: 2,
29660
+ d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
29661
+ }
29662
+ )
29663
+ }
29664
+ ),
29665
+ "Add Another Account"
29666
+ ]
29667
+ }
29668
+ ) })
29669
+ ] })
29670
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
29671
+ "button",
29238
29672
  {
29239
- className: "w-4 h-4 animate-spin text-secondary",
29240
- fill: "none",
29241
- viewBox: "0 0 24 24",
29673
+ onClick: handleStartAuth,
29674
+ className: "px-4 py-1.5 bg-brand hover:bg-brand-hover text-white rounded-md text-xs font-semibold transition-colors shadow-sm flex items-center gap-1.5 cursor-pointer",
29242
29675
  children: [
29243
29676
  /* @__PURE__ */ jsxRuntimeExports.jsx(
29244
- "circle",
29677
+ "svg",
29245
29678
  {
29246
- className: "opacity-25",
29247
- cx: "12",
29248
- cy: "12",
29249
- r: "10",
29679
+ className: "w-3.5 h-3.5",
29680
+ fill: "none",
29250
29681
  stroke: "currentColor",
29251
- strokeWidth: "4"
29682
+ viewBox: "0 0 24 24",
29683
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29684
+ "path",
29685
+ {
29686
+ strokeLinecap: "round",
29687
+ strokeLinejoin: "round",
29688
+ strokeWidth: 2,
29689
+ d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
29690
+ }
29691
+ )
29252
29692
  }
29253
29693
  ),
29254
- /* @__PURE__ */ jsxRuntimeExports.jsx(
29694
+ "Sign In to GitHub"
29695
+ ]
29696
+ }
29697
+ )
29698
+ ] }) }),
29699
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
29700
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
29701
+ "button",
29702
+ {
29703
+ onClick: () => setShowInvitationsModal(true),
29704
+ className: `relative px-3 py-1.5 border rounded-md transition-all flex items-center justify-center gap-2 cursor-pointer shadow-sm ${invitations.length > 0 ? "bg-brand/20 border-brand text-brand hover:bg-brand/30 ring-1 ring-brand/50" : "bg-surface-hover border-border text-secondary hover:text-primary"}`,
29705
+ title: invitations.length > 0 ? `${invitations.length} Pending Collaboration Invitation(s)` : "Pending Invitations",
29706
+ children: [
29707
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29255
29708
  "path",
29256
29709
  {
29257
- className: "opacity-75",
29258
- fill: "currentColor",
29259
- 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"
29710
+ strokeLinecap: "round",
29711
+ strokeLinejoin: "round",
29712
+ strokeWidth: 2,
29713
+ d: "M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
29260
29714
  }
29261
- )
29715
+ ) }),
29716
+ invitations.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29717
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-primary", children: invitations.length }),
29718
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 bg-danger rounded-full animate-pulse" })
29719
+ ] })
29262
29720
  ]
29263
29721
  }
29264
29722
  ),
29265
- " ",
29266
- "Analyzing..."
29723
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29724
+ "button",
29725
+ {
29726
+ onClick: async () => {
29727
+ const invs = await window.api.getUserInvitations();
29728
+ setInvitations(invs || []);
29729
+ const repos = await window.api.getCollaboratedRepos();
29730
+ setCollaboratedRepos(repos || []);
29731
+ showToast("Notifications refreshed", "info");
29732
+ },
29733
+ className: "px-3 py-1.5 bg-surface-hover border border-border rounded-md text-xs font-semibold text-secondary hover:text-primary active:scale-95 transition-all flex items-center justify-center gap-1.5 cursor-pointer",
29734
+ title: "Refresh Notifications & Invitations",
29735
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29736
+ "svg",
29737
+ {
29738
+ className: "w-3.5 h-3.5",
29739
+ fill: "none",
29740
+ stroke: "currentColor",
29741
+ viewBox: "0 0 24 24",
29742
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
29743
+ "path",
29744
+ {
29745
+ strokeLinecap: "round",
29746
+ strokeLinejoin: "round",
29747
+ strokeWidth: 2,
29748
+ 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"
29749
+ }
29750
+ )
29751
+ }
29752
+ )
29753
+ }
29754
+ )
29755
+ ] })
29756
+ ] }),
29757
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-secondary relative z-10 py-6", children: [
29758
+ invitations.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-6 p-4 sm:p-5 bg-surface/90 border border-brand/40 hover:border-brand/70 rounded-2xl shadow-xl flex items-center gap-4 max-w-md w-full backdrop-blur-md animate-fade-in transition-all", children: [
29759
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-11 h-11 rounded-xl bg-brand text-white flex items-center justify-center text-xl flex-shrink-0 shadow-md", children: "🔔" }),
29760
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
29761
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm font-bold text-primary truncate", children: [
29762
+ invitations.length,
29763
+ " Collaboration Invitation",
29764
+ invitations.length > 1 ? "s" : "",
29765
+ " Pending"
29766
+ ] }),
29767
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-0.5", children: "Accept now to clone or link and start collaborating." })
29768
+ ] }),
29769
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
29770
+ "button",
29771
+ {
29772
+ onClick: () => setShowInvitationsModal(true),
29773
+ className: "px-3.5 py-1.5 bg-brand hover:bg-brand-hover text-white text-xs font-bold rounded-lg transition-all shadow-sm flex-shrink-0 cursor-pointer",
29774
+ children: [
29775
+ "Review (",
29776
+ invitations.length,
29777
+ ")"
29778
+ ]
29779
+ }
29780
+ )
29781
+ ] }),
29782
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-24 h-24 mb-6 opacity-30 hover:opacity-50 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, alt: "Logo", className: "w-full h-full drop-shadow-md" }) }),
29783
+ repoPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
29784
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xl mb-2 text-primary font-semibold", children: "Folder Loaded" }),
29785
+ /* @__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 }),
29786
+ 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: [
29787
+ /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Error:" }),
29788
+ /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
29789
+ errorMsg
29790
+ ] }) : !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: [
29791
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
29792
+ "svg",
29793
+ {
29794
+ className: "w-4 h-4 animate-spin text-secondary",
29795
+ fill: "none",
29796
+ viewBox: "0 0 24 24",
29797
+ children: [
29798
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29799
+ "circle",
29800
+ {
29801
+ className: "opacity-25",
29802
+ cx: "12",
29803
+ cy: "12",
29804
+ r: "10",
29805
+ stroke: "currentColor",
29806
+ strokeWidth: "4"
29807
+ }
29808
+ ),
29809
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29810
+ "path",
29811
+ {
29812
+ className: "opacity-75",
29813
+ fill: "currentColor",
29814
+ 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"
29815
+ }
29816
+ )
29817
+ ]
29818
+ }
29819
+ ),
29820
+ " ",
29821
+ "Analyzing..."
29822
+ ] })
29823
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center flex flex-col items-center", children: [
29824
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-3xl font-bold text-primary mb-2 tracking-tight", children: "GIT ELECTRON" }),
29825
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-secondary mb-10", children: "Open a project from the sidebar to manage a repository." })
29267
29826
  ] })
29268
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center flex flex-col items-center", children: [
29269
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-3xl font-bold text-primary mb-2 tracking-tight", children: "GIT ELECTRON" }),
29270
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-secondary mb-10", children: "Open a project from the sidebar to manage a repository." })
29271
29827
  ] })
29272
29828
  ] }) }),
29273
29829
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -29314,10 +29870,21 @@ Are you SURE you want to link "${repoName}" to this folder?`
29314
29870
  onClick: async () => {
29315
29871
  try {
29316
29872
  await window.api.acceptInvitation(inv.id);
29317
- showToast("Invitation accepted!", "success");
29873
+ showToast(`Invitation accepted for ${inv.repository.full_name}!`, "success");
29874
+ setShowInvitationsModal(false);
29875
+ setShowCollabActionModal({
29876
+ name: inv.repository.name,
29877
+ fullName: inv.repository.full_name,
29878
+ url: inv.repository.html_url || inv.repository.clone_url,
29879
+ repo: inv.repository
29880
+ });
29318
29881
  const invs = await window.api.getUserInvitations();
29319
29882
  setInvitations(invs || []);
29320
- refreshRepoState();
29883
+ const repos = await window.api.getCollaboratedRepos();
29884
+ setCollaboratedRepos(repos || []);
29885
+ if (repoPath) {
29886
+ refreshRepoState();
29887
+ }
29321
29888
  } catch (e) {
29322
29889
  showToast(e.message || "Failed to accept invitation", "error");
29323
29890
  }