gitxelectron 1.2.3 → 1.2.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.
@@ -13749,6 +13749,147 @@ const LogicGame2048 = () => {
13749
13749
  ] })
13750
13750
  ] });
13751
13751
  };
13752
+ const getRotation = (value, spins) => {
13753
+ const s = spins * 360;
13754
+ switch (value) {
13755
+ case 1:
13756
+ return `rotateX(${s}deg) rotateY(${s}deg)`;
13757
+ case 2:
13758
+ return `rotateX(${s}deg) rotateY(${s + 180}deg)`;
13759
+ case 3:
13760
+ return `rotateX(${s}deg) rotateY(${s - 90}deg)`;
13761
+ case 4:
13762
+ return `rotateX(${s}deg) rotateY(${s + 90}deg)`;
13763
+ case 5:
13764
+ return `rotateX(${s - 90}deg) rotateY(${s}deg)`;
13765
+ case 6:
13766
+ return `rotateX(${s + 90}deg) rotateY(${s}deg)`;
13767
+ default:
13768
+ return `rotateX(0deg) rotateY(0deg)`;
13769
+ }
13770
+ };
13771
+ const DiceGame = () => {
13772
+ const [targetNumber, setTargetNumber] = reactExports.useState(7);
13773
+ const [isRolling, setIsRolling] = reactExports.useState(false);
13774
+ const [dice1, setDice1] = reactExports.useState(5);
13775
+ const [dice2, setDice2] = reactExports.useState(3);
13776
+ const [spins, setSpins] = reactExports.useState(0);
13777
+ const [gameResult, setGameResult] = reactExports.useState("idle");
13778
+ const handleRoll = (e) => {
13779
+ e.preventDefault();
13780
+ if (isRolling) return;
13781
+ setIsRolling(true);
13782
+ setGameResult("idle");
13783
+ setSpins((s) => s + 2);
13784
+ const d1 = Math.floor(Math.random() * 6) + 1;
13785
+ const d2 = Math.floor(Math.random() * 6) + 1;
13786
+ setTimeout(() => {
13787
+ setDice1(d1);
13788
+ setDice2(d2);
13789
+ setIsRolling(false);
13790
+ if (d1 + d2 === targetNumber) {
13791
+ setGameResult("win");
13792
+ } else {
13793
+ setGameResult("lose");
13794
+ }
13795
+ }, 1e3);
13796
+ };
13797
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col items-center justify-center h-full w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "card flex flex-col items-center gap-6 p-8 relative overflow-visible mt-20", children: [
13798
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center gap-2 mb-2 z-20", children: [
13799
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "text-primary font-bold text-lg", children: "Guess the total (2-12):" }),
13800
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [
13801
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
13802
+ "input",
13803
+ {
13804
+ type: "range",
13805
+ min: "2",
13806
+ max: "12",
13807
+ value: targetNumber,
13808
+ onChange: (e) => setTargetNumber(parseInt(e.target.value)),
13809
+ disabled: isRolling,
13810
+ className: "w-48 accent-brand cursor-pointer"
13811
+ }
13812
+ ),
13813
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-2xl font-black text-brand bg-brand/10 px-4 py-1 rounded-lg border border-brand/20", children: targetNumber })
13814
+ ] })
13815
+ ] }),
13816
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
13817
+ "input",
13818
+ {
13819
+ type: "checkbox",
13820
+ id: "rollToggle",
13821
+ className: "roll-toggle hidden",
13822
+ checked: isRolling,
13823
+ readOnly: true
13824
+ }
13825
+ ),
13826
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "h-16 flex items-center justify-center z-20", children: [
13827
+ gameResult === "idle" && !isRolling && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-secondary font-medium", children: "Ready to roll..." }),
13828
+ isRolling && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-accent font-bold animate-pulse text-2xl", children: "Rolling..." }),
13829
+ gameResult === "win" && !isRolling && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-success font-black text-3xl animate-bounce drop-shadow-md", children: [
13830
+ "🎉 YOU WIN! (",
13831
+ dice1 + dice2,
13832
+ ") 🎉"
13833
+ ] }),
13834
+ gameResult === "lose" && !isRolling && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-danger font-bold text-xl drop-shadow-sm", children: [
13835
+ "You rolled ",
13836
+ dice1 + dice2,
13837
+ ". Try again!"
13838
+ ] })
13839
+ ] }),
13840
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dice-area my-4", children: [
13841
+ { val: dice1, cls: "dice1", delay: 0 },
13842
+ { val: dice2, cls: "dice2", delay: 0.1 }
13843
+ ].map((dice, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
13844
+ "div",
13845
+ {
13846
+ className: `dice ${dice.cls}`,
13847
+ style: {
13848
+ transform: !isRolling ? getRotation(dice.val, spins) : void 0,
13849
+ transition: !isRolling ? `transform ${0.8 + dice.delay}s cubic-bezier(0.34, 1.56, 0.64, 1)` : "none"
13850
+ },
13851
+ children: [
13852
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face front", "data-value": "1", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "dots", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}) }) }),
13853
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face back", "data-value": "2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dots", children: [
13854
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13855
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
13856
+ ] }) }),
13857
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face right", "data-value": "3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dots", children: [
13858
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13859
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13860
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
13861
+ ] }) }),
13862
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face left", "data-value": "4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dots", children: [
13863
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13864
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13865
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13866
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
13867
+ ] }) }),
13868
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face top", "data-value": "5", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dots", children: [
13869
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13870
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13871
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13872
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13873
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
13874
+ ] }) }),
13875
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "face bottom", "data-value": "6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dots", children: [
13876
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13877
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13878
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13879
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13880
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {}),
13881
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
13882
+ ] }) })
13883
+ ]
13884
+ },
13885
+ idx
13886
+ )) }),
13887
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "controls mt-8 z-20", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "dice-btn", onClick: handleRoll, children: [
13888
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dice-btn-text", children: "ROLL" }),
13889
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "dice-btn-text-stop", children: "ROLLING" })
13890
+ ] }) })
13891
+ ] }) });
13892
+ };
13752
13893
  const SpaceScene = ({ fullScreen, onGameActiveChange }) => {
13753
13894
  const [isOnline, setIsOnline] = reactExports.useState(navigator.onLine);
13754
13895
  const [activeMode, setActiveMode] = reactExports.useState("none");
@@ -13770,10 +13911,13 @@ const SpaceScene = ({ fullScreen, onGameActiveChange }) => {
13770
13911
  }, [currentMode, onGameActiveChange]);
13771
13912
  const cycleMode = () => {
13772
13913
  if (!isOnline) {
13773
- setActiveMode(activeMode === "2048" ? "retro" : "2048");
13914
+ if (activeMode === "2048") setActiveMode("retro");
13915
+ else if (activeMode === "retro") setActiveMode("dice");
13916
+ else setActiveMode("2048");
13774
13917
  } else {
13775
13918
  if (activeMode === "none") setActiveMode("2048");
13776
13919
  else if (activeMode === "2048") setActiveMode("retro");
13920
+ else if (activeMode === "retro") setActiveMode("dice");
13777
13921
  else setActiveMode("none");
13778
13922
  }
13779
13923
  };
@@ -13784,13 +13928,14 @@ const SpaceScene = ({ fullScreen, onGameActiveChange }) => {
13784
13928
  children: [
13785
13929
  currentMode === "retro" && /* @__PURE__ */ jsxRuntimeExports.jsx(RetroSpaceGame, {}),
13786
13930
  currentMode === "2048" && /* @__PURE__ */ jsxRuntimeExports.jsx(LogicGame2048, {}),
13931
+ currentMode === "dice" && /* @__PURE__ */ jsxRuntimeExports.jsx(DiceGame, {}),
13787
13932
  currentMode === "none" && /* @__PURE__ */ jsxRuntimeExports.jsx(LiveGitHubSpace, {}),
13788
13933
  /* @__PURE__ */ jsxRuntimeExports.jsx(
13789
13934
  "button",
13790
13935
  {
13791
13936
  onClick: cycleMode,
13792
13937
  className: `absolute top-4 right-4 z-50 px-3 py-1.5 rounded-full text-xs font-semibold backdrop-blur-md transition-all duration-300 border ${currentMode !== "none" ? "bg-brand/20 text-brand border-brand/50 hover:bg-brand/30" : "bg-white/5 text-white/50 border-white/10 hover:bg-white/10 hover:text-white"} ${!fullScreen ? "opacity-0 group-hover:opacity-100" : ""}`,
13793
- children: currentMode === "retro" ? "🎮 Playing Retro Game" : currentMode === "2048" ? "🧩 Playing 2048" : "🌐 Live GitHub Events (Play Game?)"
13938
+ children: currentMode === "retro" ? "🎮 Playing Retro Game" : currentMode === "2048" ? "🧩 Playing 2048" : currentMode === "dice" ? "🎲 Playing Dice Game" : "🌐 Live GitHub Events (Play Game?)"
13794
13939
  }
13795
13940
  ),
13796
13941
  !fullScreen && currentMode === "none" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-2 left-0 right-0 text-center text-[10px] text-secondary/60 pointer-events-none font-medium opacity-0 group-hover:opacity-100 transition-opacity", children: "Click the toggle above to play a game" }),
@@ -23561,6 +23706,13 @@ const AmongUsBackground = () => {
23561
23706
  }
23562
23707
  );
23563
23708
  };
23709
+ const SpaceExplorerBackground = () => {
23710
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-stars-container", children: [
23711
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "stars" }),
23712
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "stars2" }),
23713
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "stars3" })
23714
+ ] });
23715
+ };
23564
23716
  const AuthHoverButton = ({ username }) => {
23565
23717
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "auth-btn-wrapper flex justify-center items-center", children: [
23566
23718
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "invisible whitespace-nowrap px-6 flex items-center font-semibold text-sm pointer-events-none", children: [
@@ -23887,6 +24039,98 @@ const CollaborationRepoView = ({
23887
24039
  }) }) })
23888
24040
  ] });
23889
24041
  };
24042
+ const AuthCodePrinter = ({ code }) => {
24043
+ const handleCopy = () => {
24044
+ navigator.clipboard.writeText(code);
24045
+ };
24046
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "auth-printer-container", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "auth-printer-wrapper", children: [
24047
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutout-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutout" }) }),
24048
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "paper-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sec", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { className: "paper", onClick: handleCopy, children: [
24049
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "txt copied", children: "Copied!" }),
24050
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "txt coupon", children: code }),
24051
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "txt hov", children: "Copy Code" })
24052
+ ] }) }) }),
24053
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shadow-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "shadow" }) }),
24054
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cutter" }) })
24055
+ ] }) });
24056
+ };
24057
+ const CommitReceiptPrinter = ({ commit, onClose }) => {
24058
+ const [isPrinted, setIsPrinted] = reactExports.useState(false);
24059
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `commit-printer-wrapper ${isPrinted ? "is-printed" : ""}`, children: [
24060
+ onClose && /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "printer-close-btn", onClick: onClose, title: "Close Printer", children: "✕" }),
24061
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer" }),
24062
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "printer-display", children: [
24063
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children: " Click to print changes" }),
24064
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "letter-wrapper", children: [
24065
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "P" }),
24066
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "r" }),
24067
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24068
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24069
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "t" }),
24070
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24071
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24072
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "g" }),
24073
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24074
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24075
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." })
24076
+ ] })
24077
+ ] }),
24078
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "print-button", onClick: () => setIsPrinted(true), children: "🖨" }),
24079
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt", children: [
24080
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-header", children: [
24081
+ "Commit Changes ",
24082
+ /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24083
+ "Hash: ",
24084
+ commit.hash.substring(0, 7),
24085
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "logo", children: "🐙" })
24086
+ ] }),
24087
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-subheader", children: [
24088
+ "Author: ",
24089
+ commit.author_name,
24090
+ " ",
24091
+ /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24092
+ new Date(commit.date).toLocaleString()
24093
+ ] }),
24094
+ /* @__PURE__ */ jsxRuntimeExports.jsx("table", { className: "receipt-table", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
24095
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24096
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "File" }),
24097
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Ins" }),
24098
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Del" })
24099
+ ] }),
24100
+ commit.diff?.files?.map((f, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24101
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "truncate max-w-[120px]", title: f.file, children: f.file.split("/").pop() }),
24102
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24103
+ "+",
24104
+ f.insertions
24105
+ ] }),
24106
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24107
+ "-",
24108
+ f.deletions
24109
+ ] })
24110
+ ] }, idx)),
24111
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-subtotal", children: [
24112
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Files Changed" }),
24113
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: commit.diff?.changed || 0 })
24114
+ ] }),
24115
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-tax", children: [
24116
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Insertions" }),
24117
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24118
+ "+",
24119
+ commit.diff?.insertions || 0
24120
+ ] })
24121
+ ] }),
24122
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-total", children: [
24123
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Deletions" }),
24124
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24125
+ "-",
24126
+ commit.diff?.deletions || 0
24127
+ ] })
24128
+ ] })
24129
+ ] }) }),
24130
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-message text-center line-clamp-2", title: commit.message, children: commit.message })
24131
+ ] }) })
24132
+ ] });
24133
+ };
23890
24134
  const translations = {
23891
24135
  en: {
23892
24136
  settings: "Settings",
@@ -24465,6 +24709,8 @@ function App() {
24465
24709
  const [conflictFile, setConflictFile] = reactExports.useState(null);
24466
24710
  const [pendingDropDestination, setPendingDropDestination] = reactExports.useState("/");
24467
24711
  const [conflictQueue, setConflictQueue] = reactExports.useState([]);
24712
+ const [autoSyncErrorPayload, setAutoSyncErrorPayload] = reactExports.useState(null);
24713
+ const [failedFiles, setFailedFiles] = reactExports.useState([]);
24468
24714
  const [isLocked, setIsLocked] = reactExports.useState(true);
24469
24715
  const [storedPin, setStoredPin] = reactExports.useState(localStorage.getItem("gitelectron-pin"));
24470
24716
  const [pinInput, setPinInput] = reactExports.useState("");
@@ -24804,9 +25050,16 @@ function App() {
24804
25050
  window.api.onGitProgress((data) => {
24805
25051
  if (data && typeof data.progress === "number") {
24806
25052
  setGitProgress(data.progress);
24807
- console.log(`[Git Progress]: ${data.progress}%`);
24808
25053
  }
24809
25054
  });
25055
+ window.api.onAutoSyncErrorApproval((payload) => {
25056
+ setAutoSyncErrorPayload(payload);
25057
+ });
25058
+ window.api.onAutoSyncResolved(() => {
25059
+ setAutoSyncErrorPayload(null);
25060
+ setFailedFiles([]);
25061
+ refreshRepoState();
25062
+ });
24810
25063
  }, []);
24811
25064
  const handleToggleAutoSync = () => {
24812
25065
  const next = !autoSyncEnabled;
@@ -24817,8 +25070,27 @@ function App() {
24817
25070
  };
24818
25071
  const handleThemeChange = (newTheme) => {
24819
25072
  setTheme(newTheme);
25073
+ document.documentElement.setAttribute("data-theme", newTheme);
24820
25074
  localStorage.setItem("gitelectron-theme", newTheme);
24821
25075
  };
25076
+ const handleAiApprove = async () => {
25077
+ if (!autoSyncErrorPayload) return;
25078
+ setAutoSyncErrorPayload(null);
25079
+ const success = await window.api.approveAiFix(autoSyncErrorPayload.resolvedCode || {});
25080
+ if (success) {
25081
+ setFailedFiles([]);
25082
+ refreshRepoState();
25083
+ } else {
25084
+ setFailedFiles(autoSyncErrorPayload.files || []);
25085
+ }
25086
+ };
25087
+ const handleAiReject = () => {
25088
+ if (autoSyncErrorPayload) {
25089
+ setFailedFiles(autoSyncErrorPayload.files || []);
25090
+ }
25091
+ setAutoSyncErrorPayload(null);
25092
+ window.api.rejectAiFix();
25093
+ };
24822
25094
  const saveMapping = (repoFullName, localPath) => {
24823
25095
  setCollabMappings((prev) => {
24824
25096
  const updated = { ...prev, [repoFullName]: localPath };
@@ -24981,7 +25253,7 @@ function App() {
24981
25253
  } else if (fetchUrl.startsWith("git@ssh.dev.azure.com:v3/")) {
24982
25254
  const parts = fetchUrl.replace("git@ssh.dev.azure.com:v3/", "").split("/");
24983
25255
  if (parts.length >= 3)
24984
- fetchUrl = `https://dev.azure.com/${parts[0]}/${parts[1]}/_git/${parts[2]}`;
25256
+ fetchUrl = `https://dev.azure.com/${parts[0]}/${parts[1]}_git/${parts[2]}`;
24985
25257
  }
24986
25258
  try {
24987
25259
  if (fetchUrl.startsWith("http")) {
@@ -25471,6 +25743,7 @@ function App() {
25471
25743
  onDrop: handleDrop,
25472
25744
  children: [
25473
25745
  theme === "among-us-live" && /* @__PURE__ */ jsxRuntimeExports.jsx(AmongUsBackground, {}),
25746
+ theme === "space-explorer-3d" && /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceExplorerBackground, {}),
25474
25747
  showWelcomeWizard && /* @__PURE__ */ jsxRuntimeExports.jsx(WelcomeWizard, { onComplete: () => setShowWelcomeWizard(false) }),
25475
25748
  gitErrorData && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/70 backdrop-blur-md flex items-center justify-center z-[150] p-6 animate-fade-in", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/95 border border-danger/50 rounded-2xl shadow-2xl w-full max-w-lg overflow-hidden flex flex-col p-6", children: [
25476
25749
  /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-danger mb-4", children: "Git Error" }),
@@ -25484,6 +25757,54 @@ function App() {
25484
25757
  }
25485
25758
  )
25486
25759
  ] }) }),
25760
+ autoSyncErrorPayload && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas border border-border rounded-xl shadow-2xl w-full max-w-lg overflow-hidden animate-in fade-in zoom-in duration-200", children: [
25761
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-danger/10 border-b border-danger/20 p-4 flex items-center gap-3", children: [
25762
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 rounded-full bg-danger/20 flex items-center justify-center text-danger shrink-0", children: "⚠️" }),
25763
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25764
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-semibold text-danger", children: "Auto-Push Paused" }),
25765
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary", children: "The system encountered an error while pushing." })
25766
+ ] })
25767
+ ] }),
25768
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 space-y-4", children: [
25769
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25770
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "Reason for Failure" }),
25771
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface p-3 rounded border border-border text-sm text-secondary", children: autoSyncErrorPayload.reason })
25772
+ ] }),
25773
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25774
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "AI Proposed Fix" }),
25775
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-brand/10 border border-brand/20 p-3 rounded text-sm text-brand", children: autoSyncErrorPayload.proposedFix })
25776
+ ] }),
25777
+ autoSyncErrorPayload.files && autoSyncErrorPayload.files.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25778
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "Affected Files" }),
25779
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "bg-surface border border-border rounded p-2 max-h-32 overflow-auto text-xs font-mono space-y-1", children: autoSyncErrorPayload.files.map((file) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "text-danger flex items-center gap-2", children: [
25780
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0", children: "❌" }),
25781
+ " ",
25782
+ file
25783
+ ] }, file)) })
25784
+ ] })
25785
+ ] }),
25786
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 bg-surface-hover border-t border-border flex justify-end gap-2", children: [
25787
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
25788
+ "button",
25789
+ {
25790
+ onClick: handleAiReject,
25791
+ className: "px-4 py-2 text-sm font-medium hover:bg-surface border border-transparent hover:border-border rounded transition-colors",
25792
+ children: "Cancel"
25793
+ }
25794
+ ),
25795
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
25796
+ "button",
25797
+ {
25798
+ onClick: handleAiApprove,
25799
+ className: "px-4 py-2 text-sm font-medium bg-brand text-white hover:brightness-110 rounded transition-all shadow-sm flex items-center gap-2",
25800
+ children: [
25801
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "✨" }),
25802
+ " Approve & Fix"
25803
+ ]
25804
+ }
25805
+ )
25806
+ ] })
25807
+ ] }) }),
25487
25808
  isLocked && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 z-[100] bg-canvas/95 backdrop-blur-2xl flex flex-col items-center justify-center transition-opacity duration-500 overflow-hidden", children: [
25488
25809
  enableLockscreenSpace && /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceScene, { fullScreen: true, onGameActiveChange: setIsGameActive }),
25489
25810
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -25976,30 +26297,7 @@ function App() {
25976
26297
  }
25977
26298
  )
25978
26299
  ] }),
25979
- expandedCommits[commit.hash] && commit.diff && commit.diff.files && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-3 bg-canvas/30 border border-border rounded p-2 text-[11px] font-mono max-h-64 overflow-y-auto custom-scrollbar", children: commit.diff.files.map((f, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
25980
- "div",
25981
- {
25982
- className: "flex items-center justify-between py-1.5 border-b border-border/40 last:border-0 hover:bg-surface-hover/50 px-2 rounded transition-colors",
25983
- children: [
25984
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-secondary max-w-[75%]", title: f.file, children: f.file }),
25985
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
25986
- f.status === "A" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] font-bold bg-success/20 text-success border border-success/30 px-1.5 py-0.5 rounded", children: "Added" }),
25987
- f.status === "M" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] font-bold bg-warning/20 text-warning border border-warning/30 px-1.5 py-0.5 rounded", children: "Modified" }),
25988
- f.status === "D" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] font-bold bg-danger/20 text-danger border border-danger/30 px-1.5 py-0.5 rounded", children: "Deleted" }),
25989
- f.status?.startsWith("R") && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] font-bold bg-accent/20 text-accent border border-accent/30 px-1.5 py-0.5 rounded", children: "Renamed" }),
25990
- !f.status && f.insertions > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-success w-8 text-right", children: [
25991
- "+",
25992
- f.insertions
25993
- ] }),
25994
- !f.status && f.deletions > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-danger w-8 text-right", children: [
25995
- "-",
25996
- f.deletions
25997
- ] })
25998
- ] })
25999
- ]
26000
- },
26001
- idx
26002
- )) })
26300
+ expandedCommits[commit.hash] && commit.diff && commit.diff.files && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 flex justify-center pb-8 border-t border-border/40 pt-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CommitReceiptPrinter, { commit, onClose: () => toggleCommit(commit.hash) }) })
26003
26301
  ]
26004
26302
  },
26005
26303
  commit.hash
@@ -26072,15 +26370,10 @@ function App() {
26072
26370
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3 bg-canvas border border-accent/50 shadow-[0_0_15px_rgba(var(--color-accent),0.15)] rounded-lg p-3 mb-4 text-left relative overflow-hidden", children: [
26073
26371
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-accent/5 animate-pulse pointer-events-none" }),
26074
26372
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-6 h-6 rounded-full bg-accent/20 border border-accent/40 flex items-center justify-center flex-shrink-0 mt-0.5 relative z-10", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-accent", children: "2" }) }),
26075
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10", children: [
26076
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary", children: "Code Auto-Copied to Clipboard!" }),
26077
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-secondary mt-0.5", children: [
26078
- "Your code",
26079
- " ",
26080
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-accent font-bold text-[13px] bg-accent/10 px-2 py-0.5 rounded border border-accent/20 mx-1", children: deviceFlowData.user_code }),
26081
- " ",
26082
- "is in your clipboard. Just paste it in the browser!"
26083
- ] })
26373
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-full flex flex-col items-center", children: [
26374
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary self-start", children: "Code Auto-Copied to Clipboard!" }),
26375
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-0.5 self-start", children: "Your authorization code is below. Just paste it in the browser!" }),
26376
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AuthCodePrinter, { code: deviceFlowData.user_code }) })
26084
26377
  ] })
26085
26378
  ] }),
26086
26379
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3 bg-canvas border border-border rounded-lg p-3 mb-5 text-left", children: [
@@ -27124,7 +27417,7 @@ function App() {
27124
27417
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
27125
27418
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden flex flex-col lg:flex-row gap-6 pb-2", children: [
27126
27419
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 bg-surface/70 backdrop-blur-md rounded-xl border border-border flex flex-col transition-colors duration-300 overflow-hidden", children: [
27127
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center border-b border-border px-4 pt-3 gap-y-2 gap-x-1", children: [
27420
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-nowrap overflow-x-auto custom-scrollbar items-center border-b border-border px-4 pt-3 pb-1 gap-y-2 gap-x-1", children: [
27128
27421
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27129
27422
  "button",
27130
27423
  {
@@ -27191,15 +27484,15 @@ function App() {
27191
27484
  status.conflicted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27192
27485
  "li",
27193
27486
  {
27194
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27487
+ className: `flex justify-between items-center px-2 py-1.5 rounded-md group transition-colors ${failedFiles.includes(f) ? "bg-danger/10 border border-danger/20" : "hover:bg-surface-hover"}`,
27195
27488
  children: [
27196
27489
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27197
27490
  "span",
27198
27491
  {
27199
27492
  onClick: () => viewDiff(f, false),
27200
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27493
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-warning"}`,
27201
27494
  children: [
27202
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 text-[10px] font-bold bg-warning/20 text-warning border border-warning/30 px-1 rounded", children: "!" }),
27495
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-shrink-0 text-[10px] font-bold px-1 rounded border ${failedFiles.includes(f) ? "bg-danger/20 border-danger/30 text-danger" : "bg-warning/20 text-warning border-warning/30"}`, children: failedFiles.includes(f) ? "X" : "!" }),
27203
27496
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27204
27497
  ]
27205
27498
  }
@@ -27229,15 +27522,15 @@ function App() {
27229
27522
  status.not_added.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27230
27523
  "li",
27231
27524
  {
27232
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27525
+ className: `flex justify-between items-center px-2 py-1.5 rounded-md group transition-colors ${failedFiles.includes(f) ? "bg-danger/10 border border-danger/20" : "hover:bg-surface-hover"}`,
27233
27526
  children: [
27234
27527
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27235
27528
  "span",
27236
27529
  {
27237
27530
  onClick: () => viewDiff(f, false),
27238
- className: "text-xs text-success font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27531
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-success"}`,
27239
27532
  children: [
27240
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 text-[10px] font-bold bg-success/20 text-success border border-success/30 px-1 rounded", children: "U" }),
27533
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-shrink-0 text-[10px] font-bold px-1 rounded border ${failedFiles.includes(f) ? "bg-danger/20 border-danger/30 text-danger" : "bg-success/20 text-success border-success/30"}`, children: failedFiles.includes(f) ? "X" : "U" }),
27241
27534
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27242
27535
  ]
27243
27536
  }
@@ -27267,15 +27560,15 @@ function App() {
27267
27560
  status.modified.filter((f) => !status.conflicted.includes(f)).map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27268
27561
  "li",
27269
27562
  {
27270
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27563
+ className: `flex justify-between items-center px-2 py-1.5 rounded-md group transition-colors ${failedFiles.includes(f) ? "bg-danger/10 border border-danger/20" : "hover:bg-surface-hover"}`,
27271
27564
  children: [
27272
27565
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27273
27566
  "span",
27274
27567
  {
27275
27568
  onClick: () => viewDiff(f, false),
27276
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27569
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-warning"}`,
27277
27570
  children: [
27278
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 text-[10px] font-bold bg-warning/20 text-warning border border-warning/30 px-1 rounded", children: "M" }),
27571
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-shrink-0 text-[10px] font-bold px-1 rounded border ${failedFiles.includes(f) ? "bg-danger/20 border-danger/30 text-danger" : "bg-warning/20 text-warning border-warning/30"}`, children: failedFiles.includes(f) ? "X" : "M" }),
27279
27572
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27280
27573
  ]
27281
27574
  }
@@ -21,8 +21,8 @@
21
21
  href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
22
22
  rel="stylesheet"
23
23
  />
24
- <script type="module" crossorigin src="./assets/index-C9VJOfEp.js"></script>
25
- <link rel="stylesheet" crossorigin href="./assets/index-iCHfrYpB.css">
24
+ <script type="module" crossorigin src="./assets/index-Cd-sn1hH.js"></script>
25
+ <link rel="stylesheet" crossorigin href="./assets/index-BL0VWE8P.css">
26
26
  </head>
27
27
 
28
28
  <body class="bg-gray-900 text-white font-sans antialiased overflow-hidden">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitxelectron",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "An elegant, completely silent auto-syncing Git client. Works as a desktop app and npm CLI tool.",
5
5
  "main": "./out/main/index.js",
6
6
  "files": [