gitxelectron 1.2.3 → 1.2.4

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,97 @@ 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 }) => {
24058
+ const [isPrinted, setIsPrinted] = reactExports.useState(false);
24059
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `commit-printer-wrapper ${isPrinted ? "is-printed" : ""}`, children: [
24060
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "printer" }),
24061
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "printer-display", children: [
24062
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "printer-message", children: " Click to print changes" }),
24063
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "letter-wrapper", children: [
24064
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "P" }),
24065
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "r" }),
24066
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24067
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24068
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "t" }),
24069
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "i" }),
24070
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "n" }),
24071
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "g" }),
24072
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24073
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." }),
24074
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "letter", children: "." })
24075
+ ] })
24076
+ ] }),
24077
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "print-button", onClick: () => setIsPrinted(true), children: "🖨" }),
24078
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt", children: [
24079
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-header", children: [
24080
+ "Commit Changes ",
24081
+ /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24082
+ "Hash: ",
24083
+ commit.hash.substring(0, 7),
24084
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "logo", children: "🐙" })
24085
+ ] }),
24086
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "receipt-subheader", children: [
24087
+ "Author: ",
24088
+ commit.author_name,
24089
+ " ",
24090
+ /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
24091
+ new Date(commit.date).toLocaleString()
24092
+ ] }),
24093
+ /* @__PURE__ */ jsxRuntimeExports.jsx("table", { className: "receipt-table", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
24094
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24095
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "File" }),
24096
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Ins" }),
24097
+ /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: "Del" })
24098
+ ] }),
24099
+ commit.diff?.files?.map((f, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { children: [
24100
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "truncate max-w-[120px]", title: f.file, children: f.file.split("/").pop() }),
24101
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24102
+ "+",
24103
+ f.insertions
24104
+ ] }),
24105
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24106
+ "-",
24107
+ f.deletions
24108
+ ] })
24109
+ ] }, idx)),
24110
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-subtotal", children: [
24111
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Files Changed" }),
24112
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: commit.diff?.changed || 0 })
24113
+ ] }),
24114
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-tax", children: [
24115
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Insertions" }),
24116
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-green-600 font-bold", children: [
24117
+ "+",
24118
+ commit.diff?.insertions || 0
24119
+ ] })
24120
+ ] }),
24121
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("tr", { className: "receipt-total", children: [
24122
+ /* @__PURE__ */ jsxRuntimeExports.jsx("td", { colSpan: 2, children: "Deletions" }),
24123
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { className: "text-red-600 font-bold", children: [
24124
+ "-",
24125
+ commit.diff?.deletions || 0
24126
+ ] })
24127
+ ] })
24128
+ ] }) }),
24129
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "receipt-message text-center line-clamp-2", title: commit.message, children: commit.message })
24130
+ ] }) })
24131
+ ] });
24132
+ };
23890
24133
  const translations = {
23891
24134
  en: {
23892
24135
  settings: "Settings",
@@ -24465,6 +24708,8 @@ function App() {
24465
24708
  const [conflictFile, setConflictFile] = reactExports.useState(null);
24466
24709
  const [pendingDropDestination, setPendingDropDestination] = reactExports.useState("/");
24467
24710
  const [conflictQueue, setConflictQueue] = reactExports.useState([]);
24711
+ const [autoSyncErrorPayload, setAutoSyncErrorPayload] = reactExports.useState(null);
24712
+ const [failedFiles, setFailedFiles] = reactExports.useState([]);
24468
24713
  const [isLocked, setIsLocked] = reactExports.useState(true);
24469
24714
  const [storedPin, setStoredPin] = reactExports.useState(localStorage.getItem("gitelectron-pin"));
24470
24715
  const [pinInput, setPinInput] = reactExports.useState("");
@@ -24804,9 +25049,16 @@ function App() {
24804
25049
  window.api.onGitProgress((data) => {
24805
25050
  if (data && typeof data.progress === "number") {
24806
25051
  setGitProgress(data.progress);
24807
- console.log(`[Git Progress]: ${data.progress}%`);
24808
25052
  }
24809
25053
  });
25054
+ window.api.onAutoSyncErrorApproval((payload) => {
25055
+ setAutoSyncErrorPayload(payload);
25056
+ });
25057
+ window.api.onAutoSyncResolved(() => {
25058
+ setAutoSyncErrorPayload(null);
25059
+ setFailedFiles([]);
25060
+ refreshRepoState();
25061
+ });
24810
25062
  }, []);
24811
25063
  const handleToggleAutoSync = () => {
24812
25064
  const next = !autoSyncEnabled;
@@ -24817,8 +25069,27 @@ function App() {
24817
25069
  };
24818
25070
  const handleThemeChange = (newTheme) => {
24819
25071
  setTheme(newTheme);
25072
+ document.documentElement.setAttribute("data-theme", newTheme);
24820
25073
  localStorage.setItem("gitelectron-theme", newTheme);
24821
25074
  };
25075
+ const handleAiApprove = async () => {
25076
+ if (!autoSyncErrorPayload) return;
25077
+ setAutoSyncErrorPayload(null);
25078
+ const success = await window.api.approveAiFix(autoSyncErrorPayload.resolvedCode || {});
25079
+ if (success) {
25080
+ setFailedFiles([]);
25081
+ refreshRepoState();
25082
+ } else {
25083
+ setFailedFiles(autoSyncErrorPayload.files || []);
25084
+ }
25085
+ };
25086
+ const handleAiReject = () => {
25087
+ if (autoSyncErrorPayload) {
25088
+ setFailedFiles(autoSyncErrorPayload.files || []);
25089
+ }
25090
+ setAutoSyncErrorPayload(null);
25091
+ window.api.rejectAiFix();
25092
+ };
24822
25093
  const saveMapping = (repoFullName, localPath) => {
24823
25094
  setCollabMappings((prev) => {
24824
25095
  const updated = { ...prev, [repoFullName]: localPath };
@@ -24981,7 +25252,7 @@ function App() {
24981
25252
  } else if (fetchUrl.startsWith("git@ssh.dev.azure.com:v3/")) {
24982
25253
  const parts = fetchUrl.replace("git@ssh.dev.azure.com:v3/", "").split("/");
24983
25254
  if (parts.length >= 3)
24984
- fetchUrl = `https://dev.azure.com/${parts[0]}/${parts[1]}/_git/${parts[2]}`;
25255
+ fetchUrl = `https://dev.azure.com/${parts[0]}/${parts[1]}_git/${parts[2]}`;
24985
25256
  }
24986
25257
  try {
24987
25258
  if (fetchUrl.startsWith("http")) {
@@ -25471,6 +25742,7 @@ function App() {
25471
25742
  onDrop: handleDrop,
25472
25743
  children: [
25473
25744
  theme === "among-us-live" && /* @__PURE__ */ jsxRuntimeExports.jsx(AmongUsBackground, {}),
25745
+ theme === "space-explorer-3d" && /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceExplorerBackground, {}),
25474
25746
  showWelcomeWizard && /* @__PURE__ */ jsxRuntimeExports.jsx(WelcomeWizard, { onComplete: () => setShowWelcomeWizard(false) }),
25475
25747
  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
25748
  /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-xl font-bold text-danger mb-4", children: "Git Error" }),
@@ -25484,6 +25756,54 @@ function App() {
25484
25756
  }
25485
25757
  )
25486
25758
  ] }) }),
25759
+ 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: [
25760
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-danger/10 border-b border-danger/20 p-4 flex items-center gap-3", children: [
25761
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-8 h-8 rounded-full bg-danger/20 flex items-center justify-center text-danger shrink-0", children: "⚠️" }),
25762
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25763
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-semibold text-danger", children: "Auto-Push Paused" }),
25764
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary", children: "The system encountered an error while pushing." })
25765
+ ] })
25766
+ ] }),
25767
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 space-y-4", children: [
25768
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25769
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "Reason for Failure" }),
25770
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-surface p-3 rounded border border-border text-sm text-secondary", children: autoSyncErrorPayload.reason })
25771
+ ] }),
25772
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25773
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "AI Proposed Fix" }),
25774
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-brand/10 border border-brand/20 p-3 rounded text-sm text-brand", children: autoSyncErrorPayload.proposedFix })
25775
+ ] }),
25776
+ autoSyncErrorPayload.files && autoSyncErrorPayload.files.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25777
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-medium text-primary mb-1", children: "Affected Files" }),
25778
+ /* @__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: [
25779
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0", children: "❌" }),
25780
+ " ",
25781
+ file
25782
+ ] }, file)) })
25783
+ ] })
25784
+ ] }),
25785
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 bg-surface-hover border-t border-border flex justify-end gap-2", children: [
25786
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
25787
+ "button",
25788
+ {
25789
+ onClick: handleAiReject,
25790
+ className: "px-4 py-2 text-sm font-medium hover:bg-surface border border-transparent hover:border-border rounded transition-colors",
25791
+ children: "Cancel"
25792
+ }
25793
+ ),
25794
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
25795
+ "button",
25796
+ {
25797
+ onClick: handleAiApprove,
25798
+ 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",
25799
+ children: [
25800
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "✨" }),
25801
+ " Approve & Fix"
25802
+ ]
25803
+ }
25804
+ )
25805
+ ] })
25806
+ ] }) }),
25487
25807
  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
25808
  enableLockscreenSpace && /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceScene, { fullScreen: true, onGameActiveChange: setIsGameActive }),
25489
25809
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -25976,30 +26296,7 @@ function App() {
25976
26296
  }
25977
26297
  )
25978
26298
  ] }),
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
- )) })
26299
+ 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 }) })
26003
26300
  ]
26004
26301
  },
26005
26302
  commit.hash
@@ -26072,15 +26369,10 @@ function App() {
26072
26369
  /* @__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
26370
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-accent/5 animate-pulse pointer-events-none" }),
26074
26371
  /* @__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
- ] })
26372
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative z-10 w-full flex flex-col items-center", children: [
26373
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-primary self-start", children: "Code Auto-Copied to Clipboard!" }),
26374
+ /* @__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!" }),
26375
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 w-full", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AuthCodePrinter, { code: deviceFlowData.user_code }) })
26084
26376
  ] })
26085
26377
  ] }),
26086
26378
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3 bg-canvas border border-border rounded-lg p-3 mb-5 text-left", children: [
@@ -27191,15 +27483,15 @@ function App() {
27191
27483
  status.conflicted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27192
27484
  "li",
27193
27485
  {
27194
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27486
+ 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
27487
  children: [
27196
27488
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27197
27489
  "span",
27198
27490
  {
27199
27491
  onClick: () => viewDiff(f, false),
27200
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27492
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-warning"}`,
27201
27493
  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: "!" }),
27494
+ /* @__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
27495
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27204
27496
  ]
27205
27497
  }
@@ -27229,15 +27521,15 @@ function App() {
27229
27521
  status.not_added.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27230
27522
  "li",
27231
27523
  {
27232
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27524
+ 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
27525
  children: [
27234
27526
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27235
27527
  "span",
27236
27528
  {
27237
27529
  onClick: () => viewDiff(f, false),
27238
- className: "text-xs text-success font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27530
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-success"}`,
27239
27531
  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" }),
27532
+ /* @__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
27533
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27242
27534
  ]
27243
27535
  }
@@ -27267,15 +27559,15 @@ function App() {
27267
27559
  status.modified.filter((f) => !status.conflicted.includes(f)).map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27268
27560
  "li",
27269
27561
  {
27270
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27562
+ 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
27563
  children: [
27272
27564
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
27273
27565
  "span",
27274
27566
  {
27275
27567
  onClick: () => viewDiff(f, false),
27276
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27568
+ className: `text-xs font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate ${failedFiles.includes(f) ? "text-danger" : "text-warning"}`,
27277
27569
  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" }),
27570
+ /* @__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
27571
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27280
27572
  ]
27281
27573
  }
@@ -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-Bzibm93j.js"></script>
25
+ <link rel="stylesheet" crossorigin href="./assets/index-Bl7RyoCQ.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.4",
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": [