gitxelectron 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12540,6 +12540,180 @@ function Loader() {
12540
12540
  /* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "680", cy: "340", r: "5", fill: "black" })
12541
12541
  ] }) }) });
12542
12542
  }
12543
+ const MassivePushLoader = ({ percentage, eta, hideHeader, compact }) => {
12544
+ const isIndeterminate = percentage < 0;
12545
+ const clampedPercentage = isIndeterminate ? 0 : Math.min(100, Math.max(0, percentage));
12546
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex flex-col items-center justify-center w-full h-full ${compact ? "" : "space-y-8 py-8"}`, children: [
12547
+ !hideHeader && !compact && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center text-primary mb-4 relative z-10", children: [
12548
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-2xl font-bold", children: "Massive Push in Progress" }),
12549
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm opacity-70 mt-1", children: "Chunking thousands of files to prevent freezing" })
12550
+ ] }),
12551
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `loader-wrapper ${compact ? "is-compact" : ""}`, children: [
12552
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "loader", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box", children: [
12553
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "top-side" }),
12554
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bottom-side" }),
12555
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "screen", children: [
12556
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "lightray-limit", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "lightray" }) }),
12557
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "loader-box-container", children: [
12558
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "loader-progress-box", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
12559
+ "div",
12560
+ {
12561
+ className: `progress-bar-fill transition-all duration-300 ease-out ${isIndeterminate ? "indeterminate-progress" : ""}`,
12562
+ style: { width: isIndeterminate ? "0%" : `${clampedPercentage}%` }
12563
+ }
12564
+ ) }),
12565
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `flex flex-col items-center mt-2 text-primary font-mono drop-shadow-md ${compact ? "scale-95" : ""}`, children: [
12566
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${compact ? "text-2xl" : "text-3xl mt-2"} font-bold`, children: isIndeterminate ? ". . ." : `${clampedPercentage.toFixed(1)}%` }),
12567
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${compact ? "text-xs" : "text-xs"} opacity-90 mt-1 font-semibold`, children: eta })
12568
+ ] })
12569
+ ] })
12570
+ ] })
12571
+ ] }) }),
12572
+ /* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `
12573
+ .loader-wrapper .loader .box {
12574
+ background-color: var(--color-surface-hover);
12575
+ width: var(--size, 240px);
12576
+ height: var(--size, 240px);
12577
+ padding: var(--pad, 20px);
12578
+ border-radius: 50%;
12579
+ border: var(--border-w, 5px) solid var(--color-border);
12580
+ position: relative;
12581
+ overflow: hidden;
12582
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), inset 0 5px 15px rgba(0,0,0,0.2);
12583
+ transform: rotate(-45deg);
12584
+ margin: 0 auto;
12585
+ }
12586
+
12587
+ .loader-wrapper.is-compact {
12588
+ --size: 180px;
12589
+ --pad: 15px;
12590
+ --border-w: 4px;
12591
+ --top-offset: 40px;
12592
+ --bottom-offset: 45px;
12593
+ --screen-pad: 8px;
12594
+ --prog-pad: 3px;
12595
+ --prog-h: 6px;
12596
+ }
12597
+
12598
+ .loader-wrapper:not(.is-compact) {
12599
+ --top-offset: 50px;
12600
+ --bottom-offset: 60px;
12601
+ --screen-pad: 10px;
12602
+ --prog-pad: 4px;
12603
+ --prog-h: 8px;
12604
+ }
12605
+
12606
+ .loader-wrapper .loader .box .screen {
12607
+ position: absolute;
12608
+ top: 50%;
12609
+ left: 50%;
12610
+ transform: translate(-50%, -50%) rotate(45deg);
12611
+ background-color: var(--color-canvas);
12612
+ width: calc(100% - calc(var(--pad, 20px) * 2));
12613
+ height: calc(100% - calc(var(--pad, 20px) * 2));
12614
+ border-radius: 50%;
12615
+ padding: var(--screen-pad);
12616
+ overflow: hidden;
12617
+ display: flex;
12618
+ flex-direction: column;
12619
+ align-items: center;
12620
+ justify-content: center;
12621
+ box-shadow: inset 0 0 15px rgba(0,0,0,0.4);
12622
+ }
12623
+
12624
+ .loader-wrapper .screen .lightray-limit {
12625
+ position: absolute;
12626
+ top: 50%;
12627
+ left: 50%;
12628
+ transform: translate(-50%, -50%);
12629
+ width: calc(100% - 10px);
12630
+ height: calc(100% - 10px);
12631
+ overflow: hidden;
12632
+ border-radius: 50%;
12633
+ pointer-events: none;
12634
+ }
12635
+
12636
+ .loader-wrapper .screen .lightray {
12637
+ position: absolute;
12638
+ left: 0;
12639
+ top: 0;
12640
+ transform: translate(-50%, -50%);
12641
+ width: 250%;
12642
+ height: 250%;
12643
+ background-image: radial-gradient(var(--color-primary), transparent, transparent);
12644
+ border-radius: 50% 10px 0 0;
12645
+ animation: rotateRay 8s linear infinite;
12646
+ opacity: 0.15;
12647
+ }
12648
+
12649
+ @keyframes rotateRay {
12650
+ 0% { transform: translate(-50%, -50%) rotate(0deg); }
12651
+ 100% { transform: translate(-50%, -50%) rotate(360deg); }
12652
+ }
12653
+
12654
+ .loader-wrapper .screen .loader-box-container {
12655
+ position: absolute;
12656
+ left: 50%;
12657
+ top: 50%;
12658
+ transform: translate(-50%, -50%);
12659
+ width: 75%;
12660
+ display: flex;
12661
+ flex-direction: column;
12662
+ align-items: center;
12663
+ z-index: 10;
12664
+ }
12665
+
12666
+ .loader-wrapper .screen .loader-progress-box {
12667
+ width: 100%;
12668
+ padding: var(--prog-pad);
12669
+ border: 2px solid var(--color-border);
12670
+ border-radius: 6px;
12671
+ background: var(--color-surface);
12672
+ box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
12673
+ }
12674
+
12675
+ .loader-wrapper .screen .progress-bar-fill {
12676
+ height: var(--prog-h);
12677
+ background-color: var(--color-brand);
12678
+ border-radius: 3px;
12679
+ box-shadow: 0 0 8px var(--color-brand);
12680
+ }
12681
+
12682
+ .loader-wrapper .top-side {
12683
+ position: absolute;
12684
+ width: 100%;
12685
+ height: 50%;
12686
+ top: var(--top-offset);
12687
+ left: 50%;
12688
+ transform: translate(-50%, -50%);
12689
+ box-shadow: 0 10px 15px rgba(0,0,0,0.2);
12690
+ background-color: rgba(0, 0, 0, 0.2);
12691
+ }
12692
+
12693
+ .loader-wrapper .bottom-side {
12694
+ position: absolute;
12695
+ width: 100%;
12696
+ height: 50%;
12697
+ top: calc(100% + var(--bottom-offset));
12698
+ left: 50%;
12699
+ transform: translate(-50%, -100%);
12700
+ box-shadow: 0 -15px 25px rgba(255,255,255,0.1);
12701
+ background-color: rgba(255, 255, 255, 0.1);
12702
+ }
12703
+
12704
+ .indeterminate-progress {
12705
+ animation: indeterminateProgress 5s infinite;
12706
+ }
12707
+
12708
+ @keyframes indeterminateProgress {
12709
+ 0% { width: 0%; }
12710
+ 50% { width: 100%; }
12711
+ 100% { width: 0%; }
12712
+ }
12713
+ ` })
12714
+ ] })
12715
+ ] });
12716
+ };
12543
12717
  function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12544
12718
  const [step, setStep] = reactExports.useState(1);
12545
12719
  const [deviceFlowData, setDeviceFlowData] = reactExports.useState(null);
@@ -12554,8 +12728,15 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12554
12728
  const [selectedRepoUrl, setSelectedRepoUrl] = reactExports.useState("");
12555
12729
  const [isLoading, setIsLoading] = reactExports.useState(false);
12556
12730
  const [error, setError] = reactExports.useState("");
12731
+ const [massivePushData, setMassivePushData] = reactExports.useState(null);
12732
+ const [localProgress, setLocalProgress] = reactExports.useState(null);
12557
12733
  reactExports.useEffect(() => {
12558
12734
  checkAuth();
12735
+ if (window.api.onMassivePushProgress) {
12736
+ window.api.onMassivePushProgress((data) => {
12737
+ setMassivePushData(data);
12738
+ });
12739
+ }
12559
12740
  }, []);
12560
12741
  const checkAuth = async () => {
12561
12742
  const status = await window.api.getAuthStatus();
@@ -12596,8 +12777,10 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12596
12777
  setError("");
12597
12778
  try {
12598
12779
  localStorage.setItem("gitquickpush-last-repo", repoPath);
12780
+ setLocalProgress({ percentage: 5, eta: "Initializing Git locally..." });
12599
12781
  await window.api.initRepo(repoPath);
12600
12782
  if (action === "new") {
12783
+ setLocalProgress({ percentage: 15, eta: "Creating GitHub Repository..." });
12601
12784
  const autoInit = addReadme || !!gitignoreTemplate || !!licenseTemplate;
12602
12785
  const newRepo = await window.api.createGitHubRepository(
12603
12786
  repoName,
@@ -12607,10 +12790,13 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12607
12790
  gitignoreTemplate,
12608
12791
  licenseTemplate
12609
12792
  );
12793
+ setLocalProgress({ percentage: 35, eta: "Linking Remote..." });
12610
12794
  await window.api.addRemote("origin", newRepo.clone_url);
12611
12795
  if (autoInit) {
12796
+ setLocalProgress({ percentage: 45, eta: "Syncing with Remote..." });
12612
12797
  await window.api.resetToRemote("origin", "main");
12613
12798
  }
12799
+ setLocalProgress({ percentage: 55, eta: "Scanning files..." });
12614
12800
  const status = await window.api.getStatus();
12615
12801
  const allFiles = [
12616
12802
  ...status.not_added,
@@ -12619,17 +12805,24 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12619
12805
  ...status.conflicted
12620
12806
  ];
12621
12807
  if (allFiles.length > 0) {
12808
+ setLocalProgress({ percentage: 70, eta: `Staging ${allFiles.length} files...` });
12622
12809
  await window.api.stageFiles(allFiles);
12810
+ setLocalProgress({ percentage: 85, eta: "Committing changes..." });
12623
12811
  await window.api.commitChanges("Initial commit");
12624
12812
  }
12813
+ setLocalProgress({ percentage: 95, eta: "Pushing to GitHub..." });
12625
12814
  const branches = await window.api.getBranches();
12626
12815
  const currentBranch = branches.current || "main";
12627
12816
  await window.api.pushToRemote("origin", currentBranch);
12817
+ setLocalProgress({ percentage: 100, eta: "Complete!" });
12628
12818
  } else if (action === "existing") {
12819
+ setLocalProgress({ percentage: 50, eta: "Linking existing repository..." });
12629
12820
  if (selectedRepoUrl) {
12630
12821
  await window.api.addRemote("origin", selectedRepoUrl);
12822
+ setLocalProgress({ percentage: 80, eta: "Fetching remote data..." });
12631
12823
  await window.api.fetchRemote();
12632
12824
  }
12825
+ setLocalProgress({ percentage: 100, eta: "Complete!" });
12633
12826
  } else if (action === "local") {
12634
12827
  localStorage.setItem(`gitquickpush-wizard-dismissed-${repoPath}`, "true");
12635
12828
  }
@@ -12644,10 +12837,19 @@ function RepositoryWizard({ repoPath, onClose, onSuccess }) {
12644
12837
  localStorage.setItem(`gitquickpush-wizard-dismissed-${repoPath}`, "true");
12645
12838
  if (onClose) onClose();
12646
12839
  };
12840
+ const effectiveProgress = massivePushData || localProgress;
12647
12841
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[70] p-4 sm:p-6 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/95 backdrop-blur-xl rounded-xl shadow-2xl border border-border w-full max-w-[550px] mx-auto overflow-hidden animate-float relative flex flex-col max-h-[90vh]", children: [
12648
- isLoading && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 bg-surface/90 backdrop-blur-md z-10 flex flex-col items-center justify-center", children: [
12649
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-[250px] sm:w-[350px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {}) }),
12650
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 font-mono text-sm text-primary animate-pulse", children: "Processing..." })
12842
+ isLoading && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute inset-0 bg-surface/90 backdrop-blur-md z-10 flex flex-col items-center justify-center pt-8", children: [
12843
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-[280px] sm:w-[380px] shrink-0 -mt-8", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {}) }),
12844
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full mt-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
12845
+ MassivePushLoader,
12846
+ {
12847
+ percentage: effectiveProgress ? effectiveProgress.percentage : -1,
12848
+ eta: effectiveProgress ? effectiveProgress.eta : "Processing...",
12849
+ hideHeader: true,
12850
+ compact: true
12851
+ }
12852
+ ) })
12651
12853
  ] }),
12652
12854
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border bg-surface-hover/50 shrink-0", children: [
12653
12855
  /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-lg font-bold text-primary flex items-center gap-2", children: [
@@ -23662,6 +23864,247 @@ function WelcomeWizard({ onComplete }) {
23662
23864
  ] })
23663
23865
  ] });
23664
23866
  }
23867
+ function CloneRepoWizard({ onClose, onSuccess }) {
23868
+ const [repoUrl, setRepoUrl] = reactExports.useState("");
23869
+ const [destFolder, setDestFolder] = reactExports.useState("");
23870
+ const [folderName, setFolderName] = reactExports.useState("");
23871
+ const [isLoading, setIsLoading] = reactExports.useState(false);
23872
+ const [error, setError] = reactExports.useState("");
23873
+ const [cloneProgress, setCloneProgress] = reactExports.useState(null);
23874
+ const [showOptions, setShowOptions] = reactExports.useState(false);
23875
+ const [clonedPathState, setClonedPathState] = reactExports.useState("");
23876
+ reactExports.useEffect(() => {
23877
+ if (window.api.onGitProgress) {
23878
+ window.api.onGitProgress((data) => {
23879
+ if (data && data.progress !== void 0) {
23880
+ setCloneProgress({
23881
+ percentage: data.progress,
23882
+ eta: data.stage || "Cloning..."
23883
+ });
23884
+ }
23885
+ });
23886
+ }
23887
+ }, []);
23888
+ reactExports.useEffect(() => {
23889
+ if (repoUrl && !folderName) {
23890
+ let extracted = repoUrl.split("/").pop() || "";
23891
+ if (extracted.endsWith(".git")) {
23892
+ extracted = extracted.substring(0, extracted.length - 4);
23893
+ }
23894
+ if (extracted) {
23895
+ setFolderName(extracted);
23896
+ }
23897
+ }
23898
+ }, [repoUrl]);
23899
+ const handleSelectFolder = async () => {
23900
+ try {
23901
+ const result = await window.api.selectDirectory();
23902
+ if (result) {
23903
+ setDestFolder(result.path);
23904
+ }
23905
+ } catch (e) {
23906
+ setError(e.message);
23907
+ }
23908
+ };
23909
+ const handleClone = async () => {
23910
+ if (!repoUrl) {
23911
+ setError("Repository URL is required");
23912
+ return;
23913
+ }
23914
+ if (!destFolder) {
23915
+ setError("Destination folder is required");
23916
+ return;
23917
+ }
23918
+ const finalPath = destFolder + "\\" + (folderName || "cloned-repo");
23919
+ setIsLoading(true);
23920
+ setError("");
23921
+ setCloneProgress({ percentage: 0, eta: "Starting clone..." });
23922
+ try {
23923
+ const clonedPath = await window.api.cloneRepository(repoUrl, finalPath);
23924
+ setCloneProgress({ percentage: 100, eta: "Clone complete!" });
23925
+ setClonedPathState(clonedPath);
23926
+ try {
23927
+ const authStatus = await window.api.getAuthStatus();
23928
+ const myUsername = authStatus?.username?.toLowerCase();
23929
+ let repoOwner = "";
23930
+ const urlParts = repoUrl.replace(".git", "").split("/");
23931
+ if (repoUrl.includes("github.com")) {
23932
+ const ghIndex = urlParts.findIndex((p) => p.includes("github.com"));
23933
+ if (ghIndex !== -1 && urlParts.length > ghIndex + 1) {
23934
+ repoOwner = urlParts[ghIndex + 1].toLowerCase();
23935
+ }
23936
+ }
23937
+ if (myUsername && repoOwner && repoOwner === myUsername) {
23938
+ setTimeout(() => {
23939
+ onSuccess(clonedPath, "keep");
23940
+ }, 1e3);
23941
+ } else {
23942
+ setTimeout(() => {
23943
+ setIsLoading(false);
23944
+ setShowOptions(true);
23945
+ }, 1e3);
23946
+ }
23947
+ } catch (e) {
23948
+ setTimeout(() => {
23949
+ setIsLoading(false);
23950
+ setShowOptions(true);
23951
+ }, 1e3);
23952
+ }
23953
+ } catch (e) {
23954
+ setError(e.message || "Failed to clone repository");
23955
+ setIsLoading(false);
23956
+ setCloneProgress(null);
23957
+ }
23958
+ };
23959
+ const effectiveProgress = cloneProgress || (isLoading ? { percentage: 5, eta: "Initializing..." } : null);
23960
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-[100] p-4 animate-in fade-in duration-300", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-surface/95 border border-border w-full max-w-[600px] rounded-2xl shadow-2xl flex flex-col overflow-hidden max-h-[90vh]", children: [
23961
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 border-b border-border/50 bg-canvas/30", children: [
23962
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-2xl font-bold text-primary flex items-center gap-3", children: [
23963
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-6 h-6 text-brand", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2" }) }),
23964
+ "Clone Repository"
23965
+ ] }),
23966
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-secondary mt-2 text-sm", children: "Download an existing Git repository to your computer" })
23967
+ ] }),
23968
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-6 overflow-y-auto", children: isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-12", children: [
23969
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23970
+ MassivePushLoader,
23971
+ {
23972
+ percentage: effectiveProgress?.percentage || 0,
23973
+ eta: effectiveProgress?.eta || "Cloning..."
23974
+ }
23975
+ ),
23976
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-8 text-secondary text-center max-w-[300px] text-sm animate-pulse", children: "Please wait while GitElectron clones the repository. This might take a while depending on the repository size." })
23977
+ ] }) : showOptions ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center py-8 space-y-6 text-center animate-in zoom-in-95 duration-300", children: [
23978
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-16 h-16 rounded-full bg-brand/10 text-brand flex items-center justify-center mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-8 h-8", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }) }),
23979
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
23980
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xl font-bold text-primary", children: "Clone Successful!" }),
23981
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-secondary text-sm mt-2 max-w-sm mx-auto", children: "This repository belongs to someone else. What would you like to do with it?" })
23982
+ ] }),
23983
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 w-full mt-4", children: [
23984
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
23985
+ "button",
23986
+ {
23987
+ onClick: () => onSuccess(clonedPathState, "keep"),
23988
+ className: "flex flex-col items-center p-4 rounded-xl border border-border bg-canvas hover:bg-surface-hover transition-all text-left gap-3",
23989
+ children: [
23990
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-full bg-blue-500/10 text-blue-400 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
23991
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }),
23992
+ /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" })
23993
+ ] }) }),
23994
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
23995
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-semibold text-primary", children: "Keep as View-Only" }),
23996
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary mt-1", children: "Leave the original remote intact." })
23997
+ ] })
23998
+ ]
23999
+ }
24000
+ ),
24001
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24002
+ "button",
24003
+ {
24004
+ onClick: () => onSuccess(clonedPathState, "new"),
24005
+ className: "flex flex-col items-center p-4 rounded-xl border border-brand/30 bg-brand/5 hover:bg-brand/10 transition-all text-left gap-3 relative overflow-hidden",
24006
+ children: [
24007
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute top-0 right-0 px-2 py-0.5 bg-brand text-[10px] font-bold text-white rounded-bl-lg", children: "RECOMMENDED" }),
24008
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-full bg-brand/20 text-brand flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 6v6m0 0v6m0-6h6m-6 0H6" }) }) }),
24009
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
24010
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-semibold text-brand", children: "Create My Own Copy" }),
24011
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary mt-1", children: "Strip original data to create your own repo." })
24012
+ ] })
24013
+ ]
24014
+ }
24015
+ )
24016
+ ] })
24017
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-6", children: [
24018
+ error && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-danger/10 border border-danger/30 text-danger px-4 py-3 rounded-lg text-sm flex items-start gap-3", children: [
24019
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 flex-shrink-0 mt-0.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
24020
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "break-words", children: error })
24021
+ ] }),
24022
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
24023
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24024
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-medium text-secondary mb-1.5", children: "Repository URL (HTTPS / SSH)" }),
24025
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
24026
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24027
+ "input",
24028
+ {
24029
+ type: "text",
24030
+ className: "w-full bg-canvas border border-border rounded-lg px-4 py-2.5 text-primary focus:border-brand focus:ring-1 focus:ring-brand outline-none transition-all pl-10",
24031
+ placeholder: "https://github.com/user/repo.git",
24032
+ value: repoUrl,
24033
+ onChange: (e) => setRepoUrl(e.target.value)
24034
+ }
24035
+ ),
24036
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5 absolute left-3 top-3 text-secondary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" }) })
24037
+ ] })
24038
+ ] }),
24039
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24040
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-medium text-secondary mb-1.5", children: "Destination Base Folder" }),
24041
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
24042
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24043
+ "input",
24044
+ {
24045
+ type: "text",
24046
+ className: "flex-1 bg-canvas border border-border rounded-lg px-4 py-2.5 text-primary opacity-70 cursor-not-allowed text-sm",
24047
+ placeholder: "Select a folder...",
24048
+ value: destFolder,
24049
+ readOnly: true
24050
+ }
24051
+ ),
24052
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24053
+ "button",
24054
+ {
24055
+ onClick: handleSelectFolder,
24056
+ className: "bg-surface-hover border border-border hover:border-brand/50 text-primary px-4 rounded-lg font-medium transition-all",
24057
+ children: "Browse"
24058
+ }
24059
+ )
24060
+ ] }),
24061
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-1.5", children: "The folder where the cloned repository directory will be placed." })
24062
+ ] }),
24063
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
24064
+ /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "block text-sm font-medium text-secondary mb-1.5", children: "Folder Name (Optional)" }),
24065
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24066
+ "input",
24067
+ {
24068
+ type: "text",
24069
+ className: "w-full bg-canvas border border-border rounded-lg px-4 py-2.5 text-primary focus:border-brand focus:ring-1 focus:ring-brand outline-none transition-all",
24070
+ placeholder: "E.g. my-awesome-project",
24071
+ value: folderName,
24072
+ onChange: (e) => setFolderName(e.target.value)
24073
+ }
24074
+ ),
24075
+ destFolder && folderName && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-brand mt-1.5 font-mono bg-brand/10 p-2 rounded inline-block", children: [
24076
+ "Will clone to: ",
24077
+ destFolder,
24078
+ "\\",
24079
+ folderName
24080
+ ] })
24081
+ ] })
24082
+ ] })
24083
+ ] }) }),
24084
+ !isLoading && !showOptions && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 border-t border-border bg-canvas/30 flex justify-end gap-3", children: [
24085
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
24086
+ "button",
24087
+ {
24088
+ onClick: onClose,
24089
+ className: "px-5 py-2.5 rounded-lg border border-border text-secondary hover:text-primary hover:bg-surface transition-all font-medium",
24090
+ children: "Cancel"
24091
+ }
24092
+ ),
24093
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
24094
+ "button",
24095
+ {
24096
+ onClick: handleClone,
24097
+ disabled: !repoUrl || !destFolder,
24098
+ className: "px-6 py-2.5 rounded-lg bg-brand hover:bg-brand-hover text-white font-medium transition-all shadow-lg shadow-brand/20 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",
24099
+ children: [
24100
+ /* @__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: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" }) }),
24101
+ "Clone Repository"
24102
+ ]
24103
+ }
24104
+ )
24105
+ ] })
24106
+ ] }) });
24107
+ }
23665
24108
  const AmongUsBackground = () => {
23666
24109
  const canvasRef = reactExports.useRef(null);
23667
24110
  reactExports.useEffect(() => {
@@ -24738,6 +25181,7 @@ function App() {
24738
25181
  return () => document.removeEventListener("click", handleClick);
24739
25182
  }, []);
24740
25183
  const [showDropModal, setShowDropModal] = reactExports.useState(false);
25184
+ const [showCloneWizard, setShowCloneWizard] = reactExports.useState(false);
24741
25185
  const [droppedFiles, setDroppedFiles] = reactExports.useState([]);
24742
25186
  const [showConflictModal, setShowConflictModal] = reactExports.useState(false);
24743
25187
  const [conflictFile, setConflictFile] = reactExports.useState(null);
@@ -24745,6 +25189,7 @@ function App() {
24745
25189
  const [conflictQueue, setConflictQueue] = reactExports.useState([]);
24746
25190
  const [autoSyncErrorPayload, setAutoSyncErrorPayload] = reactExports.useState(null);
24747
25191
  const [failedFiles, setFailedFiles] = reactExports.useState([]);
25192
+ const [massivePushData, setMassivePushData] = reactExports.useState(null);
24748
25193
  const [isLocked, setIsLocked] = reactExports.useState(true);
24749
25194
  const [storedPin, setStoredPin] = reactExports.useState(localStorage.getItem("gitelectron-pin"));
24750
25195
  const [pinInput, setPinInput] = reactExports.useState("");
@@ -25115,6 +25560,11 @@ function App() {
25115
25560
  setFailedFiles([]);
25116
25561
  refreshRepoState();
25117
25562
  });
25563
+ if (window.api.onMassivePushProgress) {
25564
+ window.api.onMassivePushProgress((data) => {
25565
+ setMassivePushData(data);
25566
+ });
25567
+ }
25118
25568
  }, []);
25119
25569
  const handleToggleAutoSync = () => {
25120
25570
  const next = !autoSyncEnabled;
@@ -26586,6 +27036,25 @@ function App() {
26586
27036
  onReplace: handleConflictReplace
26587
27037
  }
26588
27038
  ),
27039
+ showUniversalWizard && /* @__PURE__ */ jsxRuntimeExports.jsx(UniversalPushWizard, { isOpen: showUniversalWizard, onClose: () => setShowUniversalWizard(false) }),
27040
+ showCloneWizard && /* @__PURE__ */ jsxRuntimeExports.jsx(
27041
+ CloneRepoWizard,
27042
+ {
27043
+ onClose: () => setShowCloneWizard(false),
27044
+ onSuccess: async (clonedPath, action) => {
27045
+ setShowCloneWizard(false);
27046
+ if (action === "new") {
27047
+ await window.api.removeGitMetadata(clonedPath);
27048
+ localStorage.setItem("gitelectron-last-repo", clonedPath);
27049
+ setRepoPath(clonedPath);
27050
+ setIsRepo(false);
27051
+ setShowSetupWizard(true);
27052
+ } else {
27053
+ openCollabRepoPath(clonedPath);
27054
+ }
27055
+ }
27056
+ }
27057
+ ),
26589
27058
  showSetupWizard && repoPath && /* @__PURE__ */ jsxRuntimeExports.jsx(
26590
27059
  RepositoryWizard,
26591
27060
  {
@@ -26824,6 +27293,26 @@ function App() {
26824
27293
  ]
26825
27294
  }
26826
27295
  ),
27296
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27297
+ "button",
27298
+ {
27299
+ onClick: () => setShowCloneWizard(true),
27300
+ className: "w-full bg-surface-hover hover:brightness-110 text-primary font-medium py-2 px-4 rounded-md transition-all border border-border text-sm flex items-center justify-center gap-2",
27301
+ children: [
27302
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27303
+ "svg",
27304
+ {
27305
+ className: "w-4 h-4 text-secondary",
27306
+ fill: "none",
27307
+ stroke: "currentColor",
27308
+ viewBox: "0 0 24 24",
27309
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" })
27310
+ }
27311
+ ),
27312
+ "Clone Repository"
27313
+ ]
27314
+ }
27315
+ ),
26827
27316
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
26828
27317
  "button",
26829
27318
  {
@@ -27534,7 +28023,13 @@ function App() {
27534
28023
  )
27535
28024
  ] })
27536
28025
  ] }),
27537
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-auto p-4 custom-scrollbar", children: [
28026
+ status?.isMassive ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 flex flex-col items-center justify-center p-8 bg-canvas", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
28027
+ MassivePushLoader,
28028
+ {
28029
+ percentage: massivePushData?.percentage || 0,
28030
+ eta: massivePushData?.eta || "calculating..."
28031
+ }
28032
+ ) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-auto p-4 custom-scrollbar", children: [
27538
28033
  changesTab === "changes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
27539
28034
  status.conflicted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27540
28035
  "li",