gitxelectron 1.3.7 → 1.3.9
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.
- package/README.md +247 -70
- package/bin/auto-push.js +526 -0
- package/bin/cli.js +41 -7
- package/out/main/index.js +87 -183
- package/out/renderer/assets/index-Bhk4vMRr.css +2989 -0
- package/out/renderer/assets/{index-DyLS9VOZ.js → index-Dtxyy2BB.js} +1043 -261
- package/out/renderer/index.html +2 -2
- package/package.json +3 -1
- package/out/renderer/assets/index-Vre34D_W.css +0 -2913
|
@@ -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(
|
|
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(
|
|
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(
|
|
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
|
|
23845
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
23861
|
-
|
|
23862
|
-
|
|
23863
|
-
|
|
23864
|
-
|
|
23865
|
-
|
|
23866
|
-
|
|
23867
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
23981
|
+
}, 600);
|
|
23880
23982
|
};
|
|
23881
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "fixed inset-0 z-[999] bg-gray-
|
|
23882
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-0 opacity-
|
|
23883
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-
|
|
23884
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-
|
|
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-[
|
|
23887
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
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-
|
|
23891
|
-
style: { width: `${
|
|
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-
|
|
23895
|
-
step === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center
|
|
23896
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
23897
|
-
"
|
|
23898
|
-
|
|
23899
|
-
|
|
23900
|
-
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
23904
|
-
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
|
|
23908
|
-
|
|
23909
|
-
|
|
23910
|
-
|
|
23911
|
-
|
|
23912
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-
|
|
23913
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
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-
|
|
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-
|
|
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
|
|
23935
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
|
|
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: "
|
|
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
|
|
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/
|
|
23950
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
|
|
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
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
children:
|
|
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.
|
|
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-
|
|
23968
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
23969
|
-
|
|
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(
|
|
23973
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
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: "
|
|
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
|
|
23985
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
23992
|
-
|
|
23993
|
-
i
|
|
23994
|
-
|
|
23995
|
-
|
|
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: "
|
|
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-
|
|
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-
|
|
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
|
|
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(
|
|
24021
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-
|
|
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-
|
|
24024
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-
|
|
24025
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
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-
|
|
24030
|
-
children:
|
|
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(
|
|
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.
|
|
24877
|
-
|
|
24878
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children:
|
|
24879
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
24880
|
-
|
|
24881
|
-
|
|
24882
|
-
|
|
24883
|
-
|
|
24884
|
-
|
|
24885
|
-
|
|
24886
|
-
|
|
24887
|
-
|
|
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("
|
|
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
|
-
|
|
24897
|
-
|
|
24898
|
-
|
|
24899
|
-
|
|
24900
|
-
|
|
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
|
-
"
|
|
24904
|
-
|
|
24905
|
-
|
|
24906
|
-
|
|
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
|
-
|
|
24916
|
-
|
|
24917
|
-
|
|
24918
|
-
|
|
24919
|
-
|
|
24920
|
-
|
|
24921
|
-
|
|
24922
|
-
|
|
24923
|
-
|
|
24924
|
-
|
|
24925
|
-
|
|
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 ||
|
|
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.
|
|
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
|
-
|
|
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();
|
|
@@ -26391,6 +26703,55 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
26391
26703
|
setIsPulling(false);
|
|
26392
26704
|
}
|
|
26393
26705
|
};
|
|
26706
|
+
const formatErrorMessage = (msg) => {
|
|
26707
|
+
if (!msg) return "";
|
|
26708
|
+
return msg.replace(/^Error invoking remote method '[^']+':\s*/i, "").replace(/^Error:\s*/i, "").replace(/^error:\s*/i, "").trim();
|
|
26709
|
+
};
|
|
26710
|
+
const handleResolveConflictOurs = async () => {
|
|
26711
|
+
try {
|
|
26712
|
+
showToast("Resolving conflicts: keeping local changes...", "info");
|
|
26713
|
+
await window.api.executeRawGit(["checkout", "--ours", "."]);
|
|
26714
|
+
await window.api.executeRawGit(["add", "."]);
|
|
26715
|
+
await window.api.executeRawGit(["commit", "-m", "Resolved conflicts (kept local changes)"]);
|
|
26716
|
+
setPushFailureData(null);
|
|
26717
|
+
await refreshRepoState();
|
|
26718
|
+
showToast("✅ Conflicts resolved (kept local changes)", "success");
|
|
26719
|
+
} catch (err) {
|
|
26720
|
+
showToast(`Failed to resolve conflicts: ${err.message}`, "error");
|
|
26721
|
+
}
|
|
26722
|
+
};
|
|
26723
|
+
const handleResolveConflictTheirs = async () => {
|
|
26724
|
+
try {
|
|
26725
|
+
showToast("Resolving conflicts: accepting remote changes...", "info");
|
|
26726
|
+
await window.api.executeRawGit(["checkout", "--theirs", "."]);
|
|
26727
|
+
await window.api.executeRawGit(["add", "."]);
|
|
26728
|
+
await window.api.executeRawGit(["commit", "-m", "Resolved conflicts (accepted remote changes)"]);
|
|
26729
|
+
setPushFailureData(null);
|
|
26730
|
+
await refreshRepoState();
|
|
26731
|
+
showToast("✅ Conflicts resolved (accepted remote changes)", "success");
|
|
26732
|
+
} catch (err) {
|
|
26733
|
+
showToast(`Failed to resolve conflicts: ${err.message}`, "error");
|
|
26734
|
+
}
|
|
26735
|
+
};
|
|
26736
|
+
const handleAbortMerge = async () => {
|
|
26737
|
+
try {
|
|
26738
|
+
showToast("Aborting merge...", "info");
|
|
26739
|
+
try {
|
|
26740
|
+
await window.api.executeRawGit(["merge", "--abort"]);
|
|
26741
|
+
} catch {
|
|
26742
|
+
try {
|
|
26743
|
+
await window.api.executeRawGit(["rebase", "--abort"]);
|
|
26744
|
+
} catch {
|
|
26745
|
+
await window.api.executeRawGit(["reset", "--merge"]);
|
|
26746
|
+
}
|
|
26747
|
+
}
|
|
26748
|
+
setPushFailureData(null);
|
|
26749
|
+
await refreshRepoState();
|
|
26750
|
+
showToast("✅ Merge aborted. Repository restored to clean state.", "success");
|
|
26751
|
+
} catch (err) {
|
|
26752
|
+
showToast(`Failed to abort merge: ${err.message}`, "error");
|
|
26753
|
+
}
|
|
26754
|
+
};
|
|
26394
26755
|
const handleSyncCollabRepo = async (repo, savedPath) => {
|
|
26395
26756
|
try {
|
|
26396
26757
|
showToast(`Syncing ${repo.name} with GitHub...`, "info");
|
|
@@ -26456,6 +26817,29 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
26456
26817
|
}, 1500);
|
|
26457
26818
|
break;
|
|
26458
26819
|
}
|
|
26820
|
+
const isConflictErr = currentError.includes("unmerged files") || currentError.includes("unresolved conflict") || currentError.includes("automatic merge failed") || currentError.includes("you have unmerged paths");
|
|
26821
|
+
if (isConflictErr) {
|
|
26822
|
+
setHealerMessage("Unmerged conflict detected. Automatically resolving conflicted files...");
|
|
26823
|
+
try {
|
|
26824
|
+
await window.api.executeRawGit(["checkout", "--ours", "."]);
|
|
26825
|
+
await window.api.executeRawGit(["add", "."]);
|
|
26826
|
+
await window.api.executeRawGit(["commit", "-m", "Auto-resolved conflicts: kept local changes"]);
|
|
26827
|
+
} catch {
|
|
26828
|
+
try {
|
|
26829
|
+
await window.api.executeRawGit(["merge", "--abort"]);
|
|
26830
|
+
} catch {
|
|
26831
|
+
}
|
|
26832
|
+
}
|
|
26833
|
+
await refreshRepoState();
|
|
26834
|
+
showToast("Merge conflicts resolved successfully!", "success");
|
|
26835
|
+
setTimeout(() => {
|
|
26836
|
+
setShowHealerOverlay(false);
|
|
26837
|
+
if (overrideRepoPath && repoPath) {
|
|
26838
|
+
window.api.setRepoPath(repoPath);
|
|
26839
|
+
}
|
|
26840
|
+
}, 1500);
|
|
26841
|
+
return true;
|
|
26842
|
+
}
|
|
26459
26843
|
const currentStatus = await window.api.getStatus();
|
|
26460
26844
|
const result = await window.api.askAi(
|
|
26461
26845
|
"gemini",
|
|
@@ -26489,14 +26873,18 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
26489
26873
|
setShowHealerOverlay(false);
|
|
26490
26874
|
await refreshRepoState();
|
|
26491
26875
|
} else {
|
|
26492
|
-
|
|
26876
|
+
const wasConflict = currentError.includes("unmerged files") || currentError.includes("unresolved conflict") || currentError.includes("automatic merge failed") || currentError.includes("you have unmerged paths");
|
|
26877
|
+
if (!wasConflict) {
|
|
26878
|
+
await window.api.pullFromRemote(remotes[0].name, overrideBranch || branches.current);
|
|
26879
|
+
}
|
|
26493
26880
|
}
|
|
26494
|
-
setHealerMessage(`Successfully auto-healed and
|
|
26881
|
+
setHealerMessage(`Successfully auto-healed and reconciled!`);
|
|
26495
26882
|
setTimeout(() => {
|
|
26496
26883
|
setShowHealerOverlay(false);
|
|
26497
26884
|
if (overrideRepoPath && repoPath) {
|
|
26498
26885
|
window.api.setRepoPath(repoPath);
|
|
26499
26886
|
}
|
|
26887
|
+
refreshRepoState();
|
|
26500
26888
|
}, 2e3);
|
|
26501
26889
|
return;
|
|
26502
26890
|
} else {
|
|
@@ -26586,11 +26974,6 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
26586
26974
|
await navigator.clipboard.writeText(data.user_code);
|
|
26587
26975
|
} catch (err) {
|
|
26588
26976
|
}
|
|
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
26977
|
await window.api.pollDeviceFlow(data.device_code, data.interval * 1e3);
|
|
26595
26978
|
setShowAuthModal(false);
|
|
26596
26979
|
setIsDailyAuthMode(false);
|
|
@@ -27869,60 +28252,199 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
27869
28252
|
}
|
|
27870
28253
|
)
|
|
27871
28254
|
] }) }),
|
|
27872
|
-
pushFailureData &&
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
|
|
27880
|
-
|
|
27881
|
-
|
|
27882
|
-
|
|
27883
|
-
|
|
27884
|
-
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
27888
|
-
|
|
27889
|
-
|
|
27890
|
-
|
|
27891
|
-
|
|
27892
|
-
|
|
27893
|
-
|
|
27894
|
-
|
|
27895
|
-
|
|
27896
|
-
|
|
27897
|
-
|
|
27898
|
-
|
|
27899
|
-
|
|
27900
|
-
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
),
|
|
27905
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
28255
|
+
pushFailureData && (() => {
|
|
28256
|
+
const isConflict = Boolean(
|
|
28257
|
+
pushFailureData.reason && (pushFailureData.reason.includes("unmerged files") || pushFailureData.reason.includes("unresolved conflict") || pushFailureData.reason.includes("merge conflict") || pushFailureData.reason.includes("Automatic merge failed") || pushFailureData.reason.includes("you have unmerged paths") || pushFailureData.reason.includes("CONFLICT ("))
|
|
28258
|
+
);
|
|
28259
|
+
const isPull = pushFailureData.operation === "pull" || pushFailureData.reason?.includes("pull-from-remote");
|
|
28260
|
+
const cleanedReason = formatErrorMessage(pushFailureData.reason);
|
|
28261
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `bg-surface/95 backdrop-blur-xl p-6 sm:p-8 rounded-xl shadow-2xl border ${isConflict ? "border-amber-500/50" : "border-danger/50"} w-full max-w-[520px] animate-float`, children: [
|
|
28262
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex items-center gap-3 mb-4 ${isConflict ? "text-amber-500" : "text-danger"}`, children: [
|
|
28263
|
+
isConflict ? /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "w-6 h-6 flex-shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
28264
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "18", cy: "18", r: "3" }),
|
|
28265
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "6", cy: "6", r: "3" }),
|
|
28266
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M6 9v12" }),
|
|
28267
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18 9a9 9 0 0 0-9 9" })
|
|
28268
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-6 h-6 flex-shrink-0", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28269
|
+
"path",
|
|
28270
|
+
{
|
|
28271
|
+
strokeLinecap: "round",
|
|
28272
|
+
strokeLinejoin: "round",
|
|
28273
|
+
strokeWidth: 2,
|
|
28274
|
+
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
28275
|
+
}
|
|
28276
|
+
) }),
|
|
28277
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
28278
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold tracking-tight", children: isConflict ? "Merge Conflict Detected" : isPull ? "Pull Failed" : "Push Rejected" }),
|
|
28279
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-0.5", children: isConflict ? "Unmerged files prevent Git from syncing automatically." : isPull ? "Unable to pull incoming commits from the remote repository." : "Remote repository rejected your push request." })
|
|
28280
|
+
] })
|
|
28281
|
+
] }),
|
|
28282
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4 bg-canvas/80 border border-border p-3.5 rounded-lg max-h-36 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-primary font-mono text-xs leading-relaxed whitespace-pre-wrap select-text", children: cleanedReason }) }),
|
|
28283
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-secondary mb-5 text-sm leading-relaxed", children: isConflict ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
28284
|
+
"Choose a resolution below: let ",
|
|
28285
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { className: "text-primary font-semibold", children: "AI Auto-Healer" }),
|
|
28286
|
+
" intelligently reconcile conflicts, keep your local changes, accept remote incoming changes, or abort the merge to revert to the previous state."
|
|
28287
|
+
] }) : isPull ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "Failed to pull latest changes from the remote repository. Check your connection or use the AI Auto-Healer to analyze and fix the issue." }) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "Recommendation: You can pull the latest changes from the remote to reconcile your local branch, or you can use the AI Auto-Healer to analyze and fix the issue automatically." }) }),
|
|
28288
|
+
isConflict ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2.5", children: [
|
|
28289
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28290
|
+
"button",
|
|
28291
|
+
{
|
|
28292
|
+
onClick: () => {
|
|
28293
|
+
const data = pushFailureData;
|
|
28294
|
+
setPushFailureData(null);
|
|
28295
|
+
autonomousHealAndPush(
|
|
28296
|
+
data.reason,
|
|
28297
|
+
data.operation || "pull",
|
|
28298
|
+
data.overrideRepoPath,
|
|
28299
|
+
data.overrideBranch
|
|
28300
|
+
);
|
|
28301
|
+
},
|
|
28302
|
+
className: "w-full py-2.5 bg-brand hover:bg-brand-hover border border-white/10 text-white rounded-md font-semibold transition-all text-sm flex items-center justify-center gap-2 shadow-lg shadow-brand/20 active:scale-[0.99]",
|
|
28303
|
+
children: "✨ Auto-Resolve with AI"
|
|
28304
|
+
}
|
|
28305
|
+
),
|
|
28306
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
28307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28308
|
+
"button",
|
|
28309
|
+
{
|
|
28310
|
+
onClick: handleResolveConflictOurs,
|
|
28311
|
+
className: "py-2 px-2 bg-surface hover:bg-surface-hover border border-border text-primary rounded-md font-semibold transition-all text-xs text-center hover:border-brand/40",
|
|
28312
|
+
title: "Keep local changes and discard remote changes",
|
|
28313
|
+
children: "Keep Local (Ours)"
|
|
28314
|
+
}
|
|
28315
|
+
),
|
|
28316
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28317
|
+
"button",
|
|
28318
|
+
{
|
|
28319
|
+
onClick: handleResolveConflictTheirs,
|
|
28320
|
+
className: "py-2 px-2 bg-surface hover:bg-surface-hover border border-border text-primary rounded-md font-semibold transition-all text-xs text-center hover:border-brand/40",
|
|
28321
|
+
title: "Accept remote incoming changes and discard local changes",
|
|
28322
|
+
children: "Accept Remote (Theirs)"
|
|
28323
|
+
}
|
|
28324
|
+
),
|
|
28325
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28326
|
+
"button",
|
|
28327
|
+
{
|
|
28328
|
+
onClick: handleAbortMerge,
|
|
28329
|
+
className: "py-2 px-2 bg-danger/10 hover:bg-danger/20 border border-danger/30 text-danger rounded-md font-semibold transition-all text-xs text-center",
|
|
28330
|
+
title: "Abort the merge and revert repository to previous state",
|
|
28331
|
+
children: "Abort Merge"
|
|
28332
|
+
}
|
|
28333
|
+
)
|
|
28334
|
+
] }),
|
|
28335
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28336
|
+
"button",
|
|
28337
|
+
{
|
|
28338
|
+
onClick: () => {
|
|
28339
|
+
setPushFailureData(null);
|
|
28340
|
+
setChangesTab("changes");
|
|
28341
|
+
},
|
|
28342
|
+
className: "w-full py-2 bg-surface hover:bg-surface-hover border border-border text-secondary hover:text-primary rounded-md font-medium transition-colors text-xs text-center",
|
|
28343
|
+
children: "Review Conflicted Files Manually in Changes Tab"
|
|
28344
|
+
}
|
|
28345
|
+
),
|
|
28346
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28347
|
+
"button",
|
|
28348
|
+
{
|
|
28349
|
+
onClick: async () => {
|
|
28350
|
+
const data = pushFailureData;
|
|
28351
|
+
setPushFailureData(null);
|
|
28352
|
+
try {
|
|
28353
|
+
const remotes = await window.api.getRemotes();
|
|
28354
|
+
const targetRemote = data?.overrideRepoPath || remotes[0]?.name || "origin";
|
|
28355
|
+
const targetBranch = data?.overrideBranch || "main";
|
|
28356
|
+
await window.api.masterPush(targetRemote, targetBranch);
|
|
28357
|
+
setPushSuccessData({
|
|
28358
|
+
files: "All",
|
|
28359
|
+
branch: targetBranch,
|
|
28360
|
+
repository: targetRemote
|
|
28361
|
+
});
|
|
28362
|
+
} catch (err) {
|
|
28363
|
+
setPushFailureData({
|
|
28364
|
+
reason: err.message || "Master Force Push Failed",
|
|
28365
|
+
operation: "push",
|
|
28366
|
+
overrideRepoPath: data?.overrideRepoPath,
|
|
28367
|
+
overrideBranch: data?.overrideBranch
|
|
28368
|
+
});
|
|
28369
|
+
}
|
|
28370
|
+
},
|
|
28371
|
+
className: "w-full mt-2 py-2.5 bg-danger/20 hover:bg-danger/30 border border-danger/50 text-danger rounded-md font-bold transition-all text-sm flex items-center justify-center gap-2 shadow-lg shadow-danger/10 active:scale-[0.99]",
|
|
28372
|
+
title: "Force push everything (including ignored files) bypassing all rules",
|
|
28373
|
+
children: "⚡ Master Force Push (Override All)"
|
|
28374
|
+
}
|
|
28375
|
+
)
|
|
28376
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
28377
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
|
|
28378
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28379
|
+
"button",
|
|
28380
|
+
{
|
|
28381
|
+
onClick: () => {
|
|
28382
|
+
const data = pushFailureData;
|
|
28383
|
+
setPushFailureData(null);
|
|
28384
|
+
autonomousHealAndPush(
|
|
28385
|
+
data.reason,
|
|
28386
|
+
data.operation || (isPull ? "pull" : "push"),
|
|
28387
|
+
data.overrideRepoPath,
|
|
28388
|
+
data.overrideBranch
|
|
28389
|
+
);
|
|
28390
|
+
},
|
|
28391
|
+
className: "flex-1 py-2 bg-brand hover:bg-brand-hover border border-white/10 text-white rounded-md font-semibold transition-all text-sm flex items-center justify-center gap-2 active:scale-[0.99]",
|
|
28392
|
+
children: "✨ Fix with AI"
|
|
28393
|
+
}
|
|
28394
|
+
),
|
|
28395
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28396
|
+
"button",
|
|
28397
|
+
{
|
|
28398
|
+
onClick: () => {
|
|
28399
|
+
setPushFailureData(null);
|
|
28400
|
+
handlePull();
|
|
28401
|
+
},
|
|
28402
|
+
className: "flex-1 py-2 bg-surface hover:bg-surface-hover border border-border text-primary rounded-md font-semibold transition-all text-sm active:scale-[0.99]",
|
|
28403
|
+
children: isPull ? "Retry Pull" : "Pull Changes"
|
|
28404
|
+
}
|
|
28405
|
+
),
|
|
28406
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28407
|
+
"button",
|
|
28408
|
+
{
|
|
28409
|
+
onClick: () => setPushFailureData(null),
|
|
28410
|
+
className: "flex-1 py-2 bg-surface hover:bg-surface-hover border border-border text-primary rounded-md font-semibold transition-colors text-sm active:scale-[0.99]",
|
|
28411
|
+
children: "Cancel"
|
|
28412
|
+
}
|
|
28413
|
+
)
|
|
28414
|
+
] }),
|
|
28415
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28416
|
+
"button",
|
|
28417
|
+
{
|
|
28418
|
+
onClick: async () => {
|
|
28419
|
+
const data = pushFailureData;
|
|
28420
|
+
setPushFailureData(null);
|
|
28421
|
+
try {
|
|
28422
|
+
const remotes = await window.api.getRemotes();
|
|
28423
|
+
const targetRemote = data?.overrideRepoPath || remotes[0]?.name || "origin";
|
|
28424
|
+
const targetBranch = data?.overrideBranch || "main";
|
|
28425
|
+
await window.api.masterPush(targetRemote, targetBranch);
|
|
28426
|
+
setPushSuccessData({
|
|
28427
|
+
files: "All",
|
|
28428
|
+
branch: targetBranch,
|
|
28429
|
+
repository: targetRemote
|
|
28430
|
+
});
|
|
28431
|
+
} catch (err) {
|
|
28432
|
+
setPushFailureData({
|
|
28433
|
+
reason: err.message || "Master Force Push Failed",
|
|
28434
|
+
operation: "push",
|
|
28435
|
+
overrideRepoPath: data?.overrideRepoPath,
|
|
28436
|
+
overrideBranch: data?.overrideBranch
|
|
28437
|
+
});
|
|
28438
|
+
}
|
|
28439
|
+
},
|
|
28440
|
+
className: "w-full py-2 bg-danger/20 hover:bg-danger/30 border border-danger/50 text-danger rounded-md font-bold transition-all text-sm flex items-center justify-center gap-2 active:scale-[0.99]",
|
|
28441
|
+
title: "Force push everything (including ignored files) bypassing all rules",
|
|
28442
|
+
children: "⚡ Master Force Push (Override All)"
|
|
28443
|
+
}
|
|
28444
|
+
)
|
|
28445
|
+
] })
|
|
28446
|
+
] }) });
|
|
28447
|
+
})(),
|
|
27926
28448
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-64 lg:w-72 flex-shrink-0 bg-surface/80 backdrop-blur-md p-5 border-r border-border flex flex-col relative z-10 shadow-lg transition-colors duration-300", children: [
|
|
27927
28449
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mb-6 p-1", children: [
|
|
27928
28450
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -29223,51 +29745,300 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
29223
29745
|
onChangeFolder: handleSelectCollabFolder
|
|
29224
29746
|
}
|
|
29225
29747
|
)
|
|
29226
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col
|
|
29227
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
29228
|
-
|
|
29229
|
-
|
|
29230
|
-
|
|
29231
|
-
|
|
29232
|
-
|
|
29233
|
-
|
|
29234
|
-
|
|
29235
|
-
|
|
29236
|
-
|
|
29237
|
-
|
|
29748
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col min-h-0 relative z-10", children: [
|
|
29749
|
+
/* @__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: [
|
|
29750
|
+
/* @__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: [
|
|
29751
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-secondary", children: "Auth:" }),
|
|
29752
|
+
accounts.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29753
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29754
|
+
"button",
|
|
29755
|
+
{
|
|
29756
|
+
onClick: () => setShowAccountDropdown(!showAccountDropdown),
|
|
29757
|
+
className: "flex items-center hover:bg-surface-hover px-2 py-1 rounded transition-colors",
|
|
29758
|
+
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: [
|
|
29759
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-6 h-6 mr-2 animate-bounce", children: "🚀" }),
|
|
29760
|
+
"Waiting..."
|
|
29761
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-danger font-medium flex items-center", children: [
|
|
29762
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-danger rounded-full mr-2" }),
|
|
29763
|
+
"Select Account",
|
|
29764
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29765
|
+
"svg",
|
|
29766
|
+
{
|
|
29767
|
+
className: "w-3 h-3 text-secondary ml-2",
|
|
29768
|
+
fill: "none",
|
|
29769
|
+
stroke: "currentColor",
|
|
29770
|
+
viewBox: "0 0 24 24",
|
|
29771
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29772
|
+
"path",
|
|
29773
|
+
{
|
|
29774
|
+
strokeLinecap: "round",
|
|
29775
|
+
strokeLinejoin: "round",
|
|
29776
|
+
strokeWidth: 2,
|
|
29777
|
+
d: "M19 9l-7 7-7-7"
|
|
29778
|
+
}
|
|
29779
|
+
)
|
|
29780
|
+
}
|
|
29781
|
+
)
|
|
29782
|
+
] })
|
|
29783
|
+
}
|
|
29784
|
+
),
|
|
29785
|
+
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: [
|
|
29786
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-1.5 text-xs font-semibold text-secondary uppercase tracking-wider mb-1", children: "Your Accounts" }),
|
|
29787
|
+
accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29788
|
+
"div",
|
|
29789
|
+
{
|
|
29790
|
+
className: "flex items-center justify-between px-3 py-2 hover:bg-surface-hover group transition-colors",
|
|
29791
|
+
children: [
|
|
29792
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29793
|
+
"button",
|
|
29794
|
+
{
|
|
29795
|
+
className: "flex-1 flex items-center text-left",
|
|
29796
|
+
onClick: async () => {
|
|
29797
|
+
await window.api.switchAccount(acc.id);
|
|
29798
|
+
if (repoPath) {
|
|
29799
|
+
refreshRepoState();
|
|
29800
|
+
}
|
|
29801
|
+
setShowAccountDropdown(false);
|
|
29802
|
+
},
|
|
29803
|
+
children: [
|
|
29804
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29805
|
+
"div",
|
|
29806
|
+
{
|
|
29807
|
+
className: `w-2 h-2 rounded-full mr-3 ${activeAccountId === acc.id ? "bg-success" : "bg-transparent border border-border group-hover:border-primary"}`
|
|
29808
|
+
}
|
|
29809
|
+
),
|
|
29810
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-primary font-medium", children: acc.username })
|
|
29811
|
+
]
|
|
29812
|
+
}
|
|
29813
|
+
),
|
|
29814
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29815
|
+
"button",
|
|
29816
|
+
{
|
|
29817
|
+
onClick: async (e) => {
|
|
29818
|
+
e.stopPropagation();
|
|
29819
|
+
await window.api.removeAccount(acc.id);
|
|
29820
|
+
const accs = await window.api.getAccounts();
|
|
29821
|
+
setAccounts(accs.accounts);
|
|
29822
|
+
setActiveAccountId(accs.activeAccountId);
|
|
29823
|
+
if (repoPath) {
|
|
29824
|
+
refreshRepoState();
|
|
29825
|
+
}
|
|
29826
|
+
},
|
|
29827
|
+
className: "text-secondary hover:text-danger p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",
|
|
29828
|
+
title: "Remove Account",
|
|
29829
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29830
|
+
"svg",
|
|
29831
|
+
{
|
|
29832
|
+
className: "w-3.5 h-3.5",
|
|
29833
|
+
fill: "none",
|
|
29834
|
+
stroke: "currentColor",
|
|
29835
|
+
viewBox: "0 0 24 24",
|
|
29836
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29837
|
+
"path",
|
|
29838
|
+
{
|
|
29839
|
+
strokeLinecap: "round",
|
|
29840
|
+
strokeLinejoin: "round",
|
|
29841
|
+
strokeWidth: 2,
|
|
29842
|
+
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"
|
|
29843
|
+
}
|
|
29844
|
+
)
|
|
29845
|
+
}
|
|
29846
|
+
)
|
|
29847
|
+
}
|
|
29848
|
+
)
|
|
29849
|
+
]
|
|
29850
|
+
},
|
|
29851
|
+
acc.id
|
|
29852
|
+
)),
|
|
29853
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border mt-2 pt-2 px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29854
|
+
"button",
|
|
29855
|
+
{
|
|
29856
|
+
onClick: () => {
|
|
29857
|
+
setShowAccountDropdown(false);
|
|
29858
|
+
handleStartAuth();
|
|
29859
|
+
},
|
|
29860
|
+
className: "w-full text-left px-3 py-2 text-sm text-primary hover:bg-surface-hover rounded-md flex items-center transition-colors",
|
|
29861
|
+
children: [
|
|
29862
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29863
|
+
"svg",
|
|
29864
|
+
{
|
|
29865
|
+
className: "w-4 h-4 mr-3 text-secondary",
|
|
29866
|
+
fill: "none",
|
|
29867
|
+
stroke: "currentColor",
|
|
29868
|
+
viewBox: "0 0 24 24",
|
|
29869
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29870
|
+
"path",
|
|
29871
|
+
{
|
|
29872
|
+
strokeLinecap: "round",
|
|
29873
|
+
strokeLinejoin: "round",
|
|
29874
|
+
strokeWidth: 2,
|
|
29875
|
+
d: "M12 6v6m0 0v6m0-6h6m-6 0H6"
|
|
29876
|
+
}
|
|
29877
|
+
)
|
|
29878
|
+
}
|
|
29879
|
+
),
|
|
29880
|
+
"Add Another Account"
|
|
29881
|
+
]
|
|
29882
|
+
}
|
|
29883
|
+
) })
|
|
29884
|
+
] })
|
|
29885
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29886
|
+
"button",
|
|
29238
29887
|
{
|
|
29239
|
-
|
|
29240
|
-
|
|
29241
|
-
viewBox: "0 0 24 24",
|
|
29888
|
+
onClick: handleStartAuth,
|
|
29889
|
+
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
29890
|
children: [
|
|
29243
29891
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29244
|
-
"
|
|
29892
|
+
"svg",
|
|
29245
29893
|
{
|
|
29246
|
-
className: "
|
|
29247
|
-
|
|
29248
|
-
cy: "12",
|
|
29249
|
-
r: "10",
|
|
29894
|
+
className: "w-3.5 h-3.5",
|
|
29895
|
+
fill: "none",
|
|
29250
29896
|
stroke: "currentColor",
|
|
29251
|
-
|
|
29897
|
+
viewBox: "0 0 24 24",
|
|
29898
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29899
|
+
"path",
|
|
29900
|
+
{
|
|
29901
|
+
strokeLinecap: "round",
|
|
29902
|
+
strokeLinejoin: "round",
|
|
29903
|
+
strokeWidth: 2,
|
|
29904
|
+
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"
|
|
29905
|
+
}
|
|
29906
|
+
)
|
|
29252
29907
|
}
|
|
29253
29908
|
),
|
|
29254
|
-
|
|
29909
|
+
"Sign In to GitHub"
|
|
29910
|
+
]
|
|
29911
|
+
}
|
|
29912
|
+
)
|
|
29913
|
+
] }) }),
|
|
29914
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
29915
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29916
|
+
"button",
|
|
29917
|
+
{
|
|
29918
|
+
onClick: () => setShowInvitationsModal(true),
|
|
29919
|
+
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"}`,
|
|
29920
|
+
title: invitations.length > 0 ? `${invitations.length} Pending Collaboration Invitation(s)` : "Pending Invitations",
|
|
29921
|
+
children: [
|
|
29922
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29255
29923
|
"path",
|
|
29256
29924
|
{
|
|
29257
|
-
|
|
29258
|
-
|
|
29259
|
-
|
|
29925
|
+
strokeLinecap: "round",
|
|
29926
|
+
strokeLinejoin: "round",
|
|
29927
|
+
strokeWidth: 2,
|
|
29928
|
+
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
29929
|
}
|
|
29261
|
-
)
|
|
29930
|
+
) }),
|
|
29931
|
+
invitations.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29932
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-primary", children: invitations.length }),
|
|
29933
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 bg-danger rounded-full animate-pulse" })
|
|
29934
|
+
] })
|
|
29262
29935
|
]
|
|
29263
29936
|
}
|
|
29264
29937
|
),
|
|
29265
|
-
|
|
29266
|
-
|
|
29938
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29939
|
+
"button",
|
|
29940
|
+
{
|
|
29941
|
+
onClick: async () => {
|
|
29942
|
+
const invs = await window.api.getUserInvitations();
|
|
29943
|
+
setInvitations(invs || []);
|
|
29944
|
+
const repos = await window.api.getCollaboratedRepos();
|
|
29945
|
+
setCollaboratedRepos(repos || []);
|
|
29946
|
+
showToast("Notifications refreshed", "info");
|
|
29947
|
+
},
|
|
29948
|
+
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",
|
|
29949
|
+
title: "Refresh Notifications & Invitations",
|
|
29950
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29951
|
+
"svg",
|
|
29952
|
+
{
|
|
29953
|
+
className: "w-3.5 h-3.5",
|
|
29954
|
+
fill: "none",
|
|
29955
|
+
stroke: "currentColor",
|
|
29956
|
+
viewBox: "0 0 24 24",
|
|
29957
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29958
|
+
"path",
|
|
29959
|
+
{
|
|
29960
|
+
strokeLinecap: "round",
|
|
29961
|
+
strokeLinejoin: "round",
|
|
29962
|
+
strokeWidth: 2,
|
|
29963
|
+
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"
|
|
29964
|
+
}
|
|
29965
|
+
)
|
|
29966
|
+
}
|
|
29967
|
+
)
|
|
29968
|
+
}
|
|
29969
|
+
)
|
|
29970
|
+
] })
|
|
29971
|
+
] }),
|
|
29972
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-secondary relative z-10 py-6", children: [
|
|
29973
|
+
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: [
|
|
29974
|
+
/* @__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: "🔔" }),
|
|
29975
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 text-left min-w-0", children: [
|
|
29976
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm font-bold text-primary truncate", children: [
|
|
29977
|
+
invitations.length,
|
|
29978
|
+
" Collaboration Invitation",
|
|
29979
|
+
invitations.length > 1 ? "s" : "",
|
|
29980
|
+
" Pending"
|
|
29981
|
+
] }),
|
|
29982
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-0.5", children: "Accept now to clone or link and start collaborating." })
|
|
29983
|
+
] }),
|
|
29984
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
29985
|
+
"button",
|
|
29986
|
+
{
|
|
29987
|
+
onClick: () => setShowInvitationsModal(true),
|
|
29988
|
+
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",
|
|
29989
|
+
children: [
|
|
29990
|
+
"Review (",
|
|
29991
|
+
invitations.length,
|
|
29992
|
+
")"
|
|
29993
|
+
]
|
|
29994
|
+
}
|
|
29995
|
+
)
|
|
29996
|
+
] }),
|
|
29997
|
+
/* @__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" }) }),
|
|
29998
|
+
repoPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
29999
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xl mb-2 text-primary font-semibold", children: "Folder Loaded" }),
|
|
30000
|
+
/* @__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 }),
|
|
30001
|
+
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: [
|
|
30002
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Error:" }),
|
|
30003
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
30004
|
+
errorMsg
|
|
30005
|
+
] }) : !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: [
|
|
30006
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
30007
|
+
"svg",
|
|
30008
|
+
{
|
|
30009
|
+
className: "w-4 h-4 animate-spin text-secondary",
|
|
30010
|
+
fill: "none",
|
|
30011
|
+
viewBox: "0 0 24 24",
|
|
30012
|
+
children: [
|
|
30013
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30014
|
+
"circle",
|
|
30015
|
+
{
|
|
30016
|
+
className: "opacity-25",
|
|
30017
|
+
cx: "12",
|
|
30018
|
+
cy: "12",
|
|
30019
|
+
r: "10",
|
|
30020
|
+
stroke: "currentColor",
|
|
30021
|
+
strokeWidth: "4"
|
|
30022
|
+
}
|
|
30023
|
+
),
|
|
30024
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30025
|
+
"path",
|
|
30026
|
+
{
|
|
30027
|
+
className: "opacity-75",
|
|
30028
|
+
fill: "currentColor",
|
|
30029
|
+
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"
|
|
30030
|
+
}
|
|
30031
|
+
)
|
|
30032
|
+
]
|
|
30033
|
+
}
|
|
30034
|
+
),
|
|
30035
|
+
" ",
|
|
30036
|
+
"Analyzing..."
|
|
30037
|
+
] })
|
|
30038
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center flex flex-col items-center", children: [
|
|
30039
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-3xl font-bold text-primary mb-2 tracking-tight", children: "GIT ELECTRON" }),
|
|
30040
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-secondary mb-10", children: "Open a project from the sidebar to manage a repository." })
|
|
29267
30041
|
] })
|
|
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
30042
|
] })
|
|
29272
30043
|
] }) }),
|
|
29273
30044
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -29314,10 +30085,21 @@ Are you SURE you want to link "${repoName}" to this folder?`
|
|
|
29314
30085
|
onClick: async () => {
|
|
29315
30086
|
try {
|
|
29316
30087
|
await window.api.acceptInvitation(inv.id);
|
|
29317
|
-
showToast(
|
|
30088
|
+
showToast(`Invitation accepted for ${inv.repository.full_name}!`, "success");
|
|
30089
|
+
setShowInvitationsModal(false);
|
|
30090
|
+
setShowCollabActionModal({
|
|
30091
|
+
name: inv.repository.name,
|
|
30092
|
+
fullName: inv.repository.full_name,
|
|
30093
|
+
url: inv.repository.html_url || inv.repository.clone_url,
|
|
30094
|
+
repo: inv.repository
|
|
30095
|
+
});
|
|
29318
30096
|
const invs = await window.api.getUserInvitations();
|
|
29319
30097
|
setInvitations(invs || []);
|
|
29320
|
-
|
|
30098
|
+
const repos = await window.api.getCollaboratedRepos();
|
|
30099
|
+
setCollaboratedRepos(repos || []);
|
|
30100
|
+
if (repoPath) {
|
|
30101
|
+
refreshRepoState();
|
|
30102
|
+
}
|
|
29321
30103
|
} catch (e) {
|
|
29322
30104
|
showToast(e.message || "Failed to accept invitation", "error");
|
|
29323
30105
|
}
|