gitxelectron 1.3.4 → 1.3.5

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.
@@ -22936,6 +22936,7 @@ function UniversalPushWizard({ isOpen, onClose, onAutoHealTrigger }) {
22936
22936
  const [step, setStep] = reactExports.useState("START");
22937
22937
  const [errorMsg, setErrorMsg] = reactExports.useState("");
22938
22938
  const [files, setFiles] = reactExports.useState([]);
22939
+ const [isDragging2, setIsDragging] = reactExports.useState(false);
22939
22940
  const [accounts, setAccounts] = reactExports.useState([]);
22940
22941
  const [selectedAccount, setSelectedAccount] = reactExports.useState(null);
22941
22942
  const [repos, setRepos] = reactExports.useState([]);
@@ -22994,6 +22995,28 @@ function UniversalPushWizard({ isOpen, onClose, onAutoHealTrigger }) {
22994
22995
  await fetchAccounts();
22995
22996
  }
22996
22997
  };
22998
+ const handleWizardDragOver = (e) => {
22999
+ e.preventDefault();
23000
+ e.stopPropagation();
23001
+ setIsDragging(true);
23002
+ };
23003
+ const handleWizardDragLeave = (e) => {
23004
+ e.preventDefault();
23005
+ e.stopPropagation();
23006
+ setIsDragging(false);
23007
+ };
23008
+ const handleWizardDrop = async (e) => {
23009
+ e.preventDefault();
23010
+ e.stopPropagation();
23011
+ setIsDragging(false);
23012
+ if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
23013
+ const droppedPaths = Array.from(e.dataTransfer.files).map((f) => f.path);
23014
+ if (droppedPaths.length > 0) {
23015
+ setFiles(droppedPaths);
23016
+ await fetchAccounts();
23017
+ }
23018
+ }
23019
+ };
22997
23020
  const fetchAccounts = async () => {
22998
23021
  try {
22999
23022
  const data = await window.api.getAccounts();
@@ -23122,7 +23145,10 @@ function UniversalPushWizard({ isOpen, onClose, onAutoHealTrigger }) {
23122
23145
  initial: { opacity: 0 },
23123
23146
  animate: { opacity: 1 },
23124
23147
  exit: { opacity: 0 },
23125
- className: "flex flex-col items-center justify-center h-full gap-6",
23148
+ onDragOver: handleWizardDragOver,
23149
+ onDragLeave: handleWizardDragLeave,
23150
+ onDrop: handleWizardDrop,
23151
+ className: `flex flex-col items-center justify-center h-full gap-6 rounded-2xl transition-colors border-2 ${isDragging2 ? "border-brand bg-brand/10" : "border-transparent"}`,
23126
23152
  children: [
23127
23153
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center space-y-2 mb-4", children: [
23128
23154
  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-2xl text-white font-semibold", children: "Select files to push" }),
@@ -25615,10 +25641,6 @@ function App() {
25615
25641
  });
25616
25642
  if (msg.includes("✅") || msg.includes("❌")) {
25617
25643
  refreshRepoState();
25618
- if (msg.includes("❌")) {
25619
- const errorExtract = msg.replace("❌ Auto-sync failed:", "").trim();
25620
- setPushFailureData({ reason: errorExtract, operation: "push" });
25621
- }
25622
25644
  }
25623
25645
  });
25624
25646
  window.api.onGitProgress((data) => {
@@ -26137,14 +26159,19 @@ Are you SURE you want to link "${repoName}" to this folder?`
26137
26159
  if (remotes2.length > 0) {
26138
26160
  const targetBranch = overrideBranch || branches.current || "main";
26139
26161
  if (operation === "push") {
26162
+ await window.api.executeRawGit(["add", "."]);
26163
+ await window.api.commitChanges(commitMessage || "Auto-Healed Push");
26140
26164
  if (pushAllBranches && !overrideBranch) await window.api.pushAllBranches(remotes2[0].name);
26141
26165
  else await window.api.pushToRemote(remotes2[0].name, targetBranch);
26142
26166
  setPushSuccessData({
26143
26167
  repository: targetRepoPath?.split("\\").pop() || "",
26144
26168
  branch: targetBranch,
26145
26169
  timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
26146
- remote: remotes2[0].name
26170
+ remote: remotes2[0].name,
26171
+ files: 0,
26172
+ commitMessage: commitMessage || "Auto-Healed Push"
26147
26173
  });
26174
+ setCommitMessage("");
26148
26175
  } else {
26149
26176
  await window.api.pullFromRemote(remotes2[0].name, targetBranch);
26150
26177
  }
@@ -26575,145 +26602,275 @@ Are you SURE you want to link "${repoName}" to this folder?`
26575
26602
  ] }),
26576
26603
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-[-30%] left-[-20%] w-[60%] h-[60%] bg-accent/5 blur-[150px] rounded-full pointer-events-none transition-colors duration-300" }),
26577
26604
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-[-30%] right-[-20%] w-[60%] h-[60%] bg-brand/5 blur-[150px] rounded-full pointer-events-none transition-colors duration-300" }),
26578
- showSettings && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/95 backdrop-blur-xl p-8 rounded-xl shadow-2xl border border-border w-full max-w-[400px] mx-4 animate-float", children: [
26579
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold mb-6 text-primary border-b border-border pb-4", children: t("settings") }),
26580
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4 mb-8", children: [
26581
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26582
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1 text-sm font-semibold", children: t("language") }),
26583
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26584
- CustomDropdown,
26585
- {
26586
- options: LANGUAGES.map((l) => ({ value: l.id, label: l.name })),
26587
- value: lang,
26588
- onChange: (val) => setLang(val),
26589
- buttonClassName: "w-full bg-canvas border border-border rounded-md p-2 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all cursor-pointer"
26590
- }
26591
- )
26592
- ] }),
26593
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26594
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1 text-sm font-semibold", children: t("theme") }),
26595
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26596
- CustomDropdown,
26597
- {
26598
- options: THEMES.map((t2) => ({ value: t2.id, label: t2.name })),
26599
- value: theme,
26600
- onChange: (val) => handleThemeChange(val),
26601
- buttonClassName: "w-full bg-canvas border border-border rounded-md p-2 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all cursor-pointer"
26602
- }
26603
- )
26604
- ] }),
26605
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26606
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1 text-sm font-semibold", children: t("gitUsername") }),
26607
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26608
- "input",
26609
- {
26610
- type: "text",
26611
- value: gitConfig.name,
26612
- readOnly: true,
26613
- className: "w-full bg-canvas border border-border rounded-md p-2 text-primary opacity-60 cursor-not-allowed focus:outline-none"
26614
- }
26615
- )
26616
- ] }),
26617
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26618
- /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1 text-sm font-semibold", children: t("gitEmail") }),
26619
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26620
- "input",
26621
- {
26622
- type: "email",
26623
- value: gitConfig.email,
26624
- readOnly: true,
26625
- className: "w-full bg-canvas border border-border rounded-md p-2 text-primary opacity-60 cursor-not-allowed focus:outline-none"
26626
- }
26627
- ),
26628
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[10px] text-brand mt-1", children: t("syncedFromGithub") })
26629
- ] }),
26630
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
26631
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26632
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: t("dailyMobileVerification") }),
26633
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("dailyMobileDesc") })
26634
- ] }),
26635
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "switch", children: [
26636
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26637
- "input",
26638
- {
26639
- className: "toggle",
26640
- type: "checkbox",
26641
- checked: dailyAuthEnabled,
26642
- onChange: (e) => {
26643
- const next = e.target.checked;
26644
- setDailyAuthEnabled(next);
26645
- localStorage.setItem("gitelectron-daily-auth", next ? "true" : "false");
26646
- }
26647
- }
26648
- ),
26649
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "slider" }),
26650
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "card-side" })
26651
- ] })
26652
- ] }) }),
26653
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
26654
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26655
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: t("enableSpaceScene") }),
26656
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("spaceSceneDesc") })
26657
- ] }),
26658
- /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "switch", children: [
26659
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26660
- "input",
26661
- {
26662
- className: "toggle",
26663
- type: "checkbox",
26664
- checked: enableLockscreenSpace,
26665
- onChange: (e) => {
26666
- const next = e.target.checked;
26667
- setEnableLockscreenSpace(next);
26668
- localStorage.setItem("gitelectron-enable-space", next ? "true" : "false");
26669
- }
26670
- }
26671
- ),
26672
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "slider" }),
26673
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "card-side" })
26674
- ] })
26675
- ] }) }),
26676
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
26677
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26678
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: t("changeLockscreenPin") }),
26679
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("changePinDesc") })
26605
+ showSettings && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 transition-opacity p-4 md:p-8", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/95 backdrop-blur-xl rounded-2xl shadow-2xl border border-border w-full max-w-[900px] animate-float max-h-[95vh] flex flex-col overflow-hidden", children: [
26606
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
26607
+ "div",
26608
+ {
26609
+ className: "px-8 py-6 border-b border-border shrink-0 flex items-center gap-3",
26610
+ style: { backgroundColor: "var(--color-surface)" },
26611
+ children: [
26612
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "w-6 h-6 text-brand", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
26613
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" }),
26614
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
26615
+ ] }),
26616
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-2xl font-black text-primary m-0", children: t("settings") })
26617
+ ]
26618
+ }
26619
+ ),
26620
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 md:p-8 bg-black/10", children: [
26621
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 mb-4", children: [
26622
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
26623
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas/40 p-5 rounded-xl border border-border/50", children: [
26624
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-primary mb-4 flex items-center gap-2 uppercase tracking-wider", children: [
26625
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "🎨" }),
26626
+ " Preferences"
26627
+ ] }),
26628
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
26629
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26630
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1.5 text-xs font-semibold uppercase", children: t("language") }),
26631
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26632
+ CustomDropdown,
26633
+ {
26634
+ options: LANGUAGES.map((l) => ({ value: l.id, label: l.name })),
26635
+ value: lang,
26636
+ onChange: (val) => setLang(val),
26637
+ buttonClassName: "w-full bg-surface border border-border rounded-lg p-2.5 text-primary focus:outline-none focus:border-accent transition-all cursor-pointer font-medium text-sm"
26638
+ }
26639
+ )
26640
+ ] }),
26641
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26642
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1.5 text-xs font-semibold uppercase", children: t("theme") }),
26643
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26644
+ CustomDropdown,
26645
+ {
26646
+ options: THEMES.map((t2) => ({ value: t2.id, label: t2.name })),
26647
+ value: theme,
26648
+ onChange: (val) => handleThemeChange(val),
26649
+ buttonClassName: "w-full bg-surface border border-border rounded-lg p-2.5 text-primary focus:outline-none focus:border-accent transition-all cursor-pointer font-medium text-sm"
26650
+ }
26651
+ )
26652
+ ] })
26653
+ ] })
26654
+ ] }),
26655
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas/40 p-5 rounded-xl border border-border/50", children: [
26656
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-primary mb-4 flex items-center gap-2 uppercase tracking-wider", children: [
26657
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "👤" }),
26658
+ " Git Profile"
26659
+ ] }),
26660
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
26661
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26662
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1.5 text-xs font-semibold uppercase", children: t("gitUsername") }),
26663
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26664
+ "input",
26665
+ {
26666
+ type: "text",
26667
+ value: gitConfig.name,
26668
+ readOnly: true,
26669
+ className: "w-full bg-surface border border-border rounded-lg p-2.5 text-secondary cursor-not-allowed focus:outline-none font-medium text-sm"
26670
+ }
26671
+ )
26672
+ ] }),
26673
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26674
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-secondary mb-1.5 text-xs font-semibold uppercase", children: t("gitEmail") }),
26675
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26676
+ "input",
26677
+ {
26678
+ type: "email",
26679
+ value: gitConfig.email,
26680
+ readOnly: true,
26681
+ className: "w-full bg-surface border border-border rounded-lg p-2.5 text-secondary cursor-not-allowed focus:outline-none font-medium text-sm"
26682
+ }
26683
+ ),
26684
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[10px] text-brand mt-1.5 font-medium", children: t("syncedFromGithub") })
26685
+ ] })
26686
+ ] })
26687
+ ] })
26680
26688
  ] }),
26681
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
26682
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26683
- "input",
26684
- {
26685
- type: "password",
26686
- maxLength: 3,
26687
- value: newPin,
26688
- onChange: (e) => setNewPin(e.target.value),
26689
- placeholder: "***",
26690
- className: "bg-canvas border border-border rounded px-2 py-1 text-sm text-primary w-24 outline-none focus:border-accent"
26691
- }
26692
- ),
26693
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26694
- "button",
26695
- {
26696
- type: "button",
26697
- onClick: () => {
26698
- if (newPin.length === 3) {
26699
- localStorage.setItem("gitelectron-pin", newPin);
26700
- setStoredPin(newPin);
26701
- setPinChangeSuccess(true);
26702
- setTimeout(() => setPinChangeSuccess(false), 2e3);
26703
- setNewPin("");
26689
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
26690
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas/40 p-5 rounded-xl border border-border/50", children: [
26691
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-primary mb-4 flex items-center gap-2 uppercase tracking-wider", children: [
26692
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "🛡️" }),
26693
+ " Security & Features"
26694
+ ] }),
26695
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-5", children: [
26696
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
26697
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pr-4", children: [
26698
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary", children: t("dailyMobileVerification") }),
26699
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-1", children: t("dailyMobileDesc") })
26700
+ ] }),
26701
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "switch shrink-0", children: [
26702
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26703
+ "input",
26704
+ {
26705
+ className: "toggle",
26706
+ type: "checkbox",
26707
+ checked: dailyAuthEnabled,
26708
+ onChange: (e) => {
26709
+ const next = e.target.checked;
26710
+ setDailyAuthEnabled(next);
26711
+ localStorage.setItem("gitelectron-daily-auth", next ? "true" : "false");
26712
+ }
26713
+ }
26714
+ ),
26715
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "slider" }),
26716
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "card-side" })
26717
+ ] })
26718
+ ] }),
26719
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-border/50 pt-5 flex items-center justify-between", children: [
26720
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pr-4", children: [
26721
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary", children: t("enableSpaceScene") }),
26722
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-1", children: t("spaceSceneDesc") })
26723
+ ] }),
26724
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "switch shrink-0", children: [
26725
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26726
+ "input",
26727
+ {
26728
+ className: "toggle",
26729
+ type: "checkbox",
26730
+ checked: enableLockscreenSpace,
26731
+ onChange: (e) => {
26732
+ const next = e.target.checked;
26733
+ setEnableLockscreenSpace(next);
26734
+ localStorage.setItem("gitelectron-enable-space", next ? "true" : "false");
26735
+ }
26736
+ }
26737
+ ),
26738
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "slider" }),
26739
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "card-side" })
26740
+ ] })
26741
+ ] }),
26742
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-5", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3", children: [
26743
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26744
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary", children: t("changeLockscreenPin") }),
26745
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-1", children: t("changePinDesc") })
26746
+ ] }),
26747
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
26748
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26749
+ "input",
26750
+ {
26751
+ type: "password",
26752
+ maxLength: 3,
26753
+ value: newPin,
26754
+ onChange: (e) => setNewPin(e.target.value),
26755
+ placeholder: "***",
26756
+ className: "bg-surface border border-border rounded-lg px-3 py-2 text-sm text-primary w-24 outline-none focus:border-accent text-center tracking-widest font-black"
26757
+ }
26758
+ ),
26759
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26760
+ "button",
26761
+ {
26762
+ type: "button",
26763
+ onClick: () => {
26764
+ if (newPin.length === 3) {
26765
+ localStorage.setItem("gitelectron-pin", newPin);
26766
+ setStoredPin(newPin);
26767
+ setPinChangeSuccess(true);
26768
+ setTimeout(() => setPinChangeSuccess(false), 2e3);
26769
+ setNewPin("");
26770
+ }
26771
+ },
26772
+ disabled: newPin.length !== 3,
26773
+ className: "px-4 py-2 bg-accent text-canvas text-xs font-black rounded-lg hover:bg-accent/90 transition-colors disabled:opacity-50 uppercase",
26774
+ children: pinChangeSuccess ? t("saved") : t("savePin")
26775
+ }
26776
+ )
26777
+ ] })
26778
+ ] }) })
26779
+ ] })
26780
+ ] }),
26781
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas/40 p-5 rounded-xl border border-border/50", children: [
26782
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
26783
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-bold text-primary flex items-center gap-2 uppercase tracking-wider", children: [
26784
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "👥" }),
26785
+ " ",
26786
+ t("githubAccounts")
26787
+ ] }),
26788
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
26789
+ "button",
26790
+ {
26791
+ type: "button",
26792
+ onClick: () => {
26793
+ setShowSettings(false);
26794
+ handleStartAuth();
26795
+ },
26796
+ className: "px-3 py-1.5 bg-brand/10 hover:bg-brand/20 text-brand text-xs font-bold rounded-lg border border-brand/20 transition-colors",
26797
+ children: [
26798
+ "+ ",
26799
+ t("addAccount")
26800
+ ]
26704
26801
  }
26802
+ )
26803
+ ] }),
26804
+ accounts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center p-6 border border-dashed border-border/50 rounded-xl bg-surface/30", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-secondary", children: t("noAccountsLinked") }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 max-h-40 overflow-y-auto pr-1 custom-scrollbar mb-4", children: accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26805
+ "div",
26806
+ {
26807
+ className: "flex items-center justify-between p-3 border border-border/80 rounded-xl bg-surface hover:border-brand/50 transition-colors",
26808
+ children: [
26809
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
26810
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26811
+ "img",
26812
+ {
26813
+ src: acc.avatar_url || `https://github.com/${acc.username}.png`,
26814
+ alt: acc.username,
26815
+ className: "w-8 h-8 rounded-full object-cover border-2 border-border"
26816
+ }
26817
+ ),
26818
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm font-bold text-primary", children: [
26819
+ "@",
26820
+ acc.username
26821
+ ] })
26822
+ ] }),
26823
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
26824
+ activeAccountId === acc.id && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] uppercase font-black text-success bg-success/10 px-2 py-1 rounded-md border border-success/20", children: "Active" }),
26825
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26826
+ "button",
26827
+ {
26828
+ type: "button",
26829
+ onClick: () => window.api.openExternal(`https://github.com/${acc.username}`),
26830
+ className: "px-2.5 py-1 border border-border hover:border-brand hover:text-brand text-secondary text-[10px] uppercase font-bold rounded-md transition-all",
26831
+ children: "Profile"
26832
+ }
26833
+ )
26834
+ ] })
26835
+ ]
26705
26836
  },
26706
- disabled: newPin.length !== 3,
26707
- className: "px-3 py-1 bg-accent/10 text-accent text-xs font-semibold rounded hover:bg-accent/20 transition-colors disabled:opacity-50",
26708
- children: pinChangeSuccess ? t("saved") : t("savePin")
26709
- }
26710
- )
26837
+ acc.id
26838
+ )) }),
26839
+ authStatus.status === "Verified" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-4 mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
26840
+ "button",
26841
+ {
26842
+ type: "button",
26843
+ onClick: async () => {
26844
+ try {
26845
+ await window.api.logoutGithub();
26846
+ setAuthStatus({ status: "Not Authenticated", username: null });
26847
+ setAccounts([]);
26848
+ setActiveAccountId(null);
26849
+ setPushPermission(false);
26850
+ setShowSettings(false);
26851
+ showToast("Successfully logged out", "success");
26852
+ } catch (e) {
26853
+ console.error("Logout failed", e);
26854
+ showToast("Logout failed", "error");
26855
+ }
26856
+ },
26857
+ className: "w-full py-2.5 bg-danger/10 hover:bg-danger/20 text-danger text-sm font-bold rounded-lg border border-danger/30 hover:border-danger/50 transition-all flex items-center justify-center gap-2",
26858
+ children: [
26859
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" }) }),
26860
+ t("signOut")
26861
+ ]
26862
+ }
26863
+ ) })
26864
+ ] })
26711
26865
  ] })
26712
- ] }) }),
26713
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
26866
+ ] }),
26867
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-danger/10 p-5 rounded-xl border border-danger/30 mb-8 mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-4", children: [
26714
26868
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26715
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-bold text-danger", children: "Emergency Override (Master Push)" }),
26716
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5 leading-tight", children: "Bypass all protections, ignore unpushed changes or missing files, and FORCE push all current files. Warning: This overwrites remote history." })
26869
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-sm font-black text-danger flex items-center gap-2 uppercase tracking-wider mb-1", children: [
26870
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "⚠️" }),
26871
+ " Emergency Override (Master Push)"
26872
+ ] }),
26873
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-medium text-danger/80 leading-relaxed max-w-2xl", children: "Bypass all protections, ignore unpushed changes or missing files, and FORCE push all current files. Warning: This completely overwrites remote history." })
26717
26874
  ] }),
26718
26875
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
26719
26876
  "button",
@@ -26737,119 +26894,40 @@ Are you SURE you want to link "${repoName}" to this folder?`
26737
26894
  showToast("Master Push failed: " + (err.message || "Unknown error"), "error");
26738
26895
  }
26739
26896
  },
26740
- className: "w-full mt-1 px-3 py-2 bg-danger/10 text-danger border border-danger/30 text-xs font-bold rounded-lg hover:bg-danger/20 hover:border-danger/50 transition-all text-center flex items-center justify-center gap-2",
26897
+ className: "shrink-0 px-6 py-3 bg-danger text-white text-xs font-black uppercase tracking-wider rounded-xl hover:bg-danger/80 border-b-4 border-black/30 active:border-b-0 active:translate-y-1 transition-all flex items-center justify-center gap-2",
26741
26898
  children: [
26742
26899
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "🚀" }),
26743
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Execute Master Push (Force)" })
26900
+ " FORCE PUSH"
26744
26901
  ]
26745
26902
  }
26746
26903
  )
26747
- ] }) }),
26748
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-border/50 pt-4 mt-2", children: [
26749
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
26750
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26751
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-secondary", children: t("githubAccounts") }),
26752
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("manageAccounts") })
26753
- ] }),
26904
+ ] }) })
26905
+ ] }),
26906
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
26907
+ "div",
26908
+ {
26909
+ className: "px-8 py-5 border-t border-border shrink-0 flex justify-end gap-3",
26910
+ style: { backgroundColor: "var(--color-surface)" },
26911
+ children: [
26754
26912
  /* @__PURE__ */ jsxRuntimeExports.jsx(
26755
26913
  "button",
26756
26914
  {
26757
- type: "button",
26758
- onClick: () => {
26759
- setShowSettings(false);
26760
- handleStartAuth();
26761
- },
26762
- className: "px-3 py-1.5 bg-brand/10 hover:bg-brand/20 text-brand text-xs font-semibold rounded-md border border-brand/20 transition-colors",
26763
- children: t("addAccount")
26915
+ onClick: () => setShowSettings(false),
26916
+ className: "px-6 py-2.5 bg-surface border-2 border-border hover:bg-surface-hover rounded-xl transition-all font-bold text-sm",
26917
+ children: t("cancel")
26918
+ }
26919
+ ),
26920
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26921
+ "button",
26922
+ {
26923
+ onClick: saveSettings,
26924
+ className: "px-8 py-2.5 bg-brand hover:bg-brand-hover text-white rounded-xl transition-all font-black text-sm shadow-lg shadow-brand/20 border-b-4 border-black/20 active:border-b-0 active:translate-y-1",
26925
+ children: t("save")
26764
26926
  }
26765
26927
  )
26766
- ] }),
26767
- accounts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center p-4 border border-dashed border-border/50 rounded-lg bg-surface/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60", children: t("noAccountsLinked") }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 max-h-32 overflow-y-auto pr-1 custom-scrollbar", children: accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26768
- "div",
26769
- {
26770
- className: "flex items-center justify-between p-2 border border-border rounded-lg bg-canvas",
26771
- children: [
26772
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
26773
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26774
- "img",
26775
- {
26776
- src: acc.avatar_url || `https://github.com/${acc.username}.png`,
26777
- alt: acc.username,
26778
- className: "w-6 h-6 rounded-full object-cover"
26779
- }
26780
- ),
26781
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm text-primary", children: [
26782
- "@",
26783
- acc.username
26784
- ] })
26785
- ] }),
26786
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
26787
- activeAccountId === acc.id && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] uppercase font-bold text-green-500 bg-green-500/10 px-2 py-0.5 rounded-full", children: "Active" }),
26788
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26789
- "button",
26790
- {
26791
- type: "button",
26792
- onClick: () => window.api.openExternal(`https://github.com/${acc.username}`),
26793
- className: "px-2 py-0.5 border border-border hover:border-brand hover:text-brand text-secondary text-[10px] uppercase font-bold rounded transition-all",
26794
- children: "Profile"
26795
- }
26796
- )
26797
- ] })
26798
- ]
26799
- },
26800
- acc.id
26801
- )) })
26802
- ] }),
26803
- authStatus.status === "Verified" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-danger/20 pt-4 mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
26804
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26805
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-danger", children: t("logout") }),
26806
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("logoutDesc") })
26807
- ] }),
26808
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26809
- "button",
26810
- {
26811
- type: "button",
26812
- onClick: async () => {
26813
- try {
26814
- await window.api.logoutGithub();
26815
- setAuthStatus({ status: "Not Authenticated", username: null });
26816
- setAccounts([]);
26817
- setActiveAccountId(null);
26818
- setPushPermission(false);
26819
- setShowSettings(false);
26820
- showToast("Successfully logged out", "success");
26821
- } catch (e) {
26822
- console.error("Logout failed", e);
26823
- showToast("Logout failed", "error");
26824
- }
26825
- },
26826
- className: "px-4 py-1.5 bg-danger/10 hover:bg-danger/20 text-danger text-xs font-bold rounded-md border border-danger/30 hover:border-danger/50 transition-all flex items-center gap-2",
26827
- children: [
26828
- /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" }) }),
26829
- t("signOut")
26830
- ]
26831
- }
26832
- )
26833
- ] }) })
26834
- ] }),
26835
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-3", children: [
26836
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26837
- "button",
26838
- {
26839
- onClick: () => setShowSettings(false),
26840
- className: "px-4 py-2 bg-surface-hover border border-border rounded-md transition-colors font-medium text-sm",
26841
- children: t("cancel")
26842
- }
26843
- ),
26844
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26845
- "button",
26846
- {
26847
- onClick: saveSettings,
26848
- className: "px-4 py-2 bg-brand hover:bg-brand-hover border border-white/10 rounded-md transition-all font-medium text-white text-sm shadow-sm",
26849
- children: t("save")
26850
- }
26851
- )
26852
- ] })
26928
+ ]
26929
+ }
26930
+ )
26853
26931
  ] }) }),
26854
26932
  showDiff && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50 p-6 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas/95 backdrop-blur-xl rounded-xl shadow-2xl border border-border w-full max-w-5xl max-h-[95vh] mx-4 flex flex-col overflow-hidden animate-float", children: [
26855
26933
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center p-4 border-b border-border bg-surface/50", children: [