gitxelectron 1.1.8 → 1.2.0

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.
@@ -23589,6 +23589,304 @@ const AuthHoverButton = ({ username }) => {
23589
23589
  ] })
23590
23590
  ] });
23591
23591
  };
23592
+ const CollaborationRepoView = ({
23593
+ collaboratedRepos,
23594
+ collabMappings,
23595
+ pathExistenceMap,
23596
+ collabSearch,
23597
+ setCollabSearch,
23598
+ currentRepoPath,
23599
+ onRepoCardClick,
23600
+ onRefresh,
23601
+ isRefreshing,
23602
+ onOpenExternal
23603
+ }) => {
23604
+ const filteredRepos = collaboratedRepos.filter((repo) => {
23605
+ if (!collabSearch.trim()) return true;
23606
+ const q = collabSearch.toLowerCase().trim();
23607
+ return repo.name?.toLowerCase().includes(q) || repo.full_name?.toLowerCase().includes(q) || repo.owner?.login?.toLowerCase().includes(q) || repo.description && repo.description.toLowerCase().includes(q) || repo.language && repo.language.toLowerCase().includes(q);
23608
+ });
23609
+ const connectedCount = collaboratedRepos.filter((r) => {
23610
+ const saved = collabMappings[r.full_name];
23611
+ return saved && pathExistenceMap[r.full_name] !== false;
23612
+ }).length;
23613
+ const missingCount = collaboratedRepos.filter((r) => {
23614
+ const saved = collabMappings[r.full_name];
23615
+ return saved && pathExistenceMap[r.full_name] === false;
23616
+ }).length;
23617
+ const notClonedCount = collaboratedRepos.length - connectedCount - missingCount;
23618
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden gap-4", children: [
23619
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gradient-to-r from-brand/15 via-surface/60 to-purple-500/10 border border-brand/20 rounded-2xl p-4 sm:p-5 shadow-sm flex flex-col md:flex-row md:items-center justify-between gap-4 flex-shrink-0", children: [
23620
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start sm:items-center gap-3.5 min-w-0", children: [
23621
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-11 h-11 rounded-2xl bg-brand/20 border border-brand/30 flex items-center justify-center text-brand flex-shrink-0 shadow-inner", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23622
+ "path",
23623
+ {
23624
+ strokeLinecap: "round",
23625
+ strokeLinejoin: "round",
23626
+ strokeWidth: 2,
23627
+ 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"
23628
+ }
23629
+ ) }) }),
23630
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
23631
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
23632
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base sm:text-lg font-bold text-primary tracking-tight", children: "Collaboration Repositories" }),
23633
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs bg-brand/20 border border-brand/30 text-brand px-2.5 py-0.5 rounded-full font-bold", children: collaboratedRepos.length })
23634
+ ] }),
23635
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary mt-0.5 truncate", children: "Repositories you collaborate on with organizations, teams, and other developers." })
23636
+ ] })
23637
+ ] }),
23638
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-wrap items-center gap-2.5 w-full md:w-auto", children: [
23639
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex-1 sm:w-64 min-w-[200px]", children: [
23640
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23641
+ "svg",
23642
+ {
23643
+ className: "w-4 h-4 text-secondary absolute left-3 top-2.5 pointer-events-none",
23644
+ fill: "none",
23645
+ stroke: "currentColor",
23646
+ viewBox: "0 0 24 24",
23647
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23648
+ "path",
23649
+ {
23650
+ strokeLinecap: "round",
23651
+ strokeLinejoin: "round",
23652
+ strokeWidth: 2,
23653
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
23654
+ }
23655
+ )
23656
+ }
23657
+ ),
23658
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23659
+ "input",
23660
+ {
23661
+ type: "text",
23662
+ value: collabSearch,
23663
+ onChange: (e) => setCollabSearch(e.target.value),
23664
+ placeholder: "Search by repo, owner, or tech...",
23665
+ className: "w-full bg-surface border border-border rounded-xl pl-9 pr-8 py-2 text-xs text-primary placeholder-secondary/70 focus:outline-none focus:border-brand focus:ring-1 focus:ring-brand transition-all shadow-xs"
23666
+ }
23667
+ ),
23668
+ collabSearch && /* @__PURE__ */ jsxRuntimeExports.jsx(
23669
+ "button",
23670
+ {
23671
+ onClick: () => setCollabSearch(""),
23672
+ className: "absolute right-2.5 top-2 text-secondary hover:text-primary text-xs p-0.5 rounded",
23673
+ title: "Clear search",
23674
+ children: "✕"
23675
+ }
23676
+ )
23677
+ ] }),
23678
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
23679
+ "button",
23680
+ {
23681
+ onClick: onRefresh,
23682
+ disabled: isRefreshing,
23683
+ className: "px-3.5 py-2 bg-surface hover:bg-surface-hover border border-border rounded-xl text-xs font-medium text-primary transition-all flex items-center gap-1.5 shadow-xs disabled:opacity-50 flex-shrink-0",
23684
+ title: "Refresh collaboration repositories from GitHub",
23685
+ children: [
23686
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23687
+ "svg",
23688
+ {
23689
+ className: `w-3.5 h-3.5 ${isRefreshing ? "animate-spin text-brand" : "text-secondary"}`,
23690
+ fill: "none",
23691
+ stroke: "currentColor",
23692
+ viewBox: "0 0 24 24",
23693
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23694
+ "path",
23695
+ {
23696
+ strokeLinecap: "round",
23697
+ strokeLinejoin: "round",
23698
+ strokeWidth: 2,
23699
+ d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
23700
+ }
23701
+ )
23702
+ }
23703
+ ),
23704
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isRefreshing ? "Refreshing..." : "Refresh" })
23705
+ ]
23706
+ }
23707
+ )
23708
+ ] })
23709
+ ] }),
23710
+ collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-secondary flex-wrap px-1", children: [
23711
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[11px] font-medium text-secondary/80", children: "Filter summary:" }),
23712
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1 bg-surface border border-border px-2.5 py-1 rounded-lg font-mono text-[11px] text-primary", children: [
23713
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-emerald-400" }),
23714
+ connectedCount,
23715
+ " Connected"
23716
+ ] }),
23717
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1 bg-surface border border-border px-2.5 py-1 rounded-lg font-mono text-[11px] text-secondary", children: [
23718
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-secondary/50" }),
23719
+ notClonedCount,
23720
+ " Not Cloned"
23721
+ ] }),
23722
+ missingCount > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "inline-flex items-center gap-1 bg-danger/10 border border-danger/30 px-2.5 py-1 rounded-lg font-mono text-[11px] text-danger", children: [
23723
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-danger animate-pulse" }),
23724
+ missingCount,
23725
+ " Missing Folder"
23726
+ ] })
23727
+ ] }),
23728
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto pr-1 pb-4 custom-scrollbar min-h-0", children: collaboratedRepos.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center py-16 px-6 border border-dashed border-border rounded-2xl bg-surface/30 max-w-lg mx-auto my-8", children: [
23729
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-2xl bg-brand/10 border border-brand/20 flex items-center justify-center text-3xl", children: "🤝" }),
23730
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-base font-bold text-primary mb-1.5", children: "No Collaboration Repositories Found" }),
23731
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary leading-relaxed mb-5 max-w-sm mx-auto", children: "You do not have any external collaboration repositories yet. When someone invites you as a collaborator or you invite someone to your repository, it will automatically appear here." }),
23732
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
23733
+ "button",
23734
+ {
23735
+ onClick: onRefresh,
23736
+ disabled: isRefreshing,
23737
+ className: "px-4 py-2 bg-brand hover:bg-brand-hover text-white text-xs font-semibold rounded-xl transition-all shadow-sm flex items-center gap-2 mx-auto",
23738
+ children: [
23739
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23740
+ "svg",
23741
+ {
23742
+ className: `w-3.5 h-3.5 ${isRefreshing ? "animate-spin" : ""}`,
23743
+ fill: "none",
23744
+ stroke: "currentColor",
23745
+ viewBox: "0 0 24 24",
23746
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
23747
+ "path",
23748
+ {
23749
+ strokeLinecap: "round",
23750
+ strokeLinejoin: "round",
23751
+ strokeWidth: 2,
23752
+ d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
23753
+ }
23754
+ )
23755
+ }
23756
+ ),
23757
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Refresh from GitHub" })
23758
+ ]
23759
+ }
23760
+ )
23761
+ ] }) : filteredRepos.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center py-12 px-6 border border-dashed border-border rounded-2xl bg-surface/20 max-w-md mx-auto my-8", children: [
23762
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-2xl mb-2", children: "🔍" }),
23763
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold text-primary mb-1", children: "No matches found" }),
23764
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-xs text-secondary mb-4", children: [
23765
+ "No repository matches ",
23766
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-semibold text-primary", children: [
23767
+ '"',
23768
+ collabSearch,
23769
+ '"'
23770
+ ] })
23771
+ ] }),
23772
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23773
+ "button",
23774
+ {
23775
+ onClick: () => setCollabSearch(""),
23776
+ className: "px-3.5 py-1.5 bg-surface hover:bg-surface-hover border border-border text-primary text-xs font-medium rounded-lg transition-colors",
23777
+ children: "Clear Search Filter"
23778
+ }
23779
+ )
23780
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 gap-4", children: filteredRepos.map((repo) => {
23781
+ const savedPath = collabMappings[repo.full_name];
23782
+ const isMissing = savedPath && pathExistenceMap[repo.full_name] === false;
23783
+ const isCurrentActive = currentRepoPath && savedPath && currentRepoPath.toLowerCase() === savedPath.toLowerCase();
23784
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
23785
+ "div",
23786
+ {
23787
+ onClick: () => onRepoCardClick(repo),
23788
+ className: `group relative rounded-2xl border p-4 sm:p-5 flex flex-col justify-between gap-3.5 transition-all duration-200 cursor-pointer min-w-0 ${isCurrentActive ? "bg-brand/10 border-brand shadow-md ring-1 ring-brand/40" : "bg-surface/75 hover:bg-surface border-border hover:border-brand/40 shadow-xs hover:shadow-md"}`,
23789
+ children: [
23790
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3 min-w-0", children: [
23791
+ repo.owner?.avatar_url ? /* @__PURE__ */ jsxRuntimeExports.jsx(
23792
+ "img",
23793
+ {
23794
+ src: repo.owner.avatar_url,
23795
+ alt: repo.owner.login,
23796
+ className: "w-10 h-10 rounded-xl border border-border/80 flex-shrink-0 object-cover bg-canvas shadow-xs mt-0.5"
23797
+ }
23798
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-canvas border border-border/80 flex items-center justify-center text-xs font-bold text-secondary flex-shrink-0 mt-0.5", children: repo.owner?.login ? repo.owner.login.slice(0, 2).toUpperCase() : "GH" }),
23799
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
23800
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 flex-wrap min-w-0", children: [
23801
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
23802
+ "span",
23803
+ {
23804
+ className: "text-sm font-bold text-primary group-hover:text-brand transition-colors truncate max-w-[220px]",
23805
+ title: repo.name,
23806
+ children: repo.name
23807
+ }
23808
+ ),
23809
+ repo.private ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-amber-500/10 text-amber-400 border border-amber-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Private" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-emerald-500/10 text-emerald-400 border border-emerald-500/25 px-2 py-0.2 rounded-full font-medium flex-shrink-0", children: "Public" }),
23810
+ isCurrentActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[9px] bg-brand text-white px-2 py-0.5 rounded-full font-bold uppercase tracking-wider flex-shrink-0 shadow-xs", children: "Active" })
23811
+ ] }),
23812
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mt-1 text-xs text-secondary min-w-0 flex-wrap", children: [
23813
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-mono text-secondary truncate max-w-[140px]", title: `@${repo.owner?.login}`, children: [
23814
+ "@",
23815
+ repo.owner?.login
23816
+ ] }),
23817
+ repo.default_branch && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] font-mono bg-surface-hover text-secondary border border-border/60 px-1.5 py-0.5 rounded flex items-center gap-1 flex-shrink-0", children: [
23818
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "🌿" }),
23819
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate max-w-[90px]", children: repo.default_branch })
23820
+ ] }),
23821
+ repo.language && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] font-medium text-secondary/70 flex items-center gap-1 flex-shrink-0", children: [
23822
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-brand/60" }),
23823
+ repo.language
23824
+ ] })
23825
+ ] })
23826
+ ] }),
23827
+ repo.html_url && /* @__PURE__ */ jsxRuntimeExports.jsx(
23828
+ "button",
23829
+ {
23830
+ type: "button",
23831
+ onClick: (e) => {
23832
+ e.stopPropagation();
23833
+ onOpenExternal(repo.html_url);
23834
+ },
23835
+ className: "p-1.5 rounded-lg text-secondary hover:text-primary hover:bg-surface-hover transition-colors flex-shrink-0 opacity-70 group-hover:opacity-100",
23836
+ title: "Open on GitHub",
23837
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.205 11.387.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 21.795 24 17.298 24 12c0-6.627-5.373-12-12-12z" }) })
23838
+ }
23839
+ )
23840
+ ] }),
23841
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary line-clamp-2 min-h-[34px] break-words leading-relaxed", children: repo.description || /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "italic text-secondary/50", children: "No repository description provided." }) }),
23842
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-border/60 pt-3 flex flex-col sm:flex-row sm:items-center justify-between gap-2.5 min-w-0", children: [
23843
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 flex-1", children: savedPath ? isMissing ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
23844
+ "div",
23845
+ {
23846
+ className: "inline-flex items-center gap-1.5 text-xs text-danger font-mono bg-danger/10 border border-danger/25 px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
23847
+ title: `Folder was deleted or moved: ${savedPath}`,
23848
+ children: [
23849
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-danger animate-pulse flex-shrink-0" }),
23850
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: "Folder missing on disk" })
23851
+ ]
23852
+ }
23853
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
23854
+ "div",
23855
+ {
23856
+ className: "inline-flex items-center gap-1.5 text-xs text-emerald-400 font-mono bg-emerald-500/10 border border-emerald-500/25 px-2.5 py-1 rounded-lg min-w-0 max-w-full truncate",
23857
+ title: savedPath,
23858
+ children: [
23859
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400 flex-shrink-0" }),
23860
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: savedPath.split("\\").pop() || savedPath })
23861
+ ]
23862
+ }
23863
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "inline-flex items-center gap-1.5 text-xs text-secondary/70 italic bg-canvas/60 border border-border/60 px-2.5 py-1 rounded-lg flex-shrink-0", children: [
23864
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-secondary/40" }),
23865
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Not cloned yet" })
23866
+ ] }) }),
23867
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 flex-shrink-0 self-end sm:self-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
23868
+ "button",
23869
+ {
23870
+ type: "button",
23871
+ onClick: (e) => {
23872
+ e.stopPropagation();
23873
+ onRepoCardClick(repo);
23874
+ },
23875
+ className: `px-3.5 py-1.5 text-xs font-semibold rounded-xl transition-all shadow-xs flex items-center gap-1.5 ${savedPath ? isMissing ? "bg-danger/20 hover:bg-danger/30 text-danger border border-danger/40" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20" : "bg-brand hover:bg-brand-hover text-white shadow-brand/20"}`,
23876
+ children: [
23877
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: savedPath ? isMissing ? "Re-Clone" : "Open Repo" : "Clone / Connect" }),
23878
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isMissing ? "☁️" : savedPath ? "→" : "☁️" })
23879
+ ]
23880
+ }
23881
+ ) })
23882
+ ] })
23883
+ ]
23884
+ },
23885
+ repo.id
23886
+ );
23887
+ }) }) })
23888
+ ] });
23889
+ };
23592
23890
  const translations = {
23593
23891
  en: {
23594
23892
  settings: "Settings",
@@ -23614,7 +23912,27 @@ const translations = {
23614
23912
  commitMessagePlaceholder: "Enter commit message...",
23615
23913
  success: "Success",
23616
23914
  error: "Error",
23617
- aiFixFailed: "AI auto-heal failed. Please fix conflicts manually."
23915
+ aiFixFailed: "AI auto-heal failed. Please fix conflicts manually.",
23916
+ enableSpaceScene: "Enable Space Scene",
23917
+ spaceSceneDesc: "Show live events and games on lockscreens",
23918
+ changeLockscreenPin: "Change Lockscreen PIN",
23919
+ changePinDesc: "Set a new 3-character PIN for your lockscreen",
23920
+ savePin: "Save PIN",
23921
+ saved: "Saved!",
23922
+ githubAccounts: "GitHub Accounts",
23923
+ manageAccounts: "Manage your authenticated accounts",
23924
+ addAccount: "+ Add Account",
23925
+ noAccountsLinked: "No accounts linked yet.",
23926
+ logout: "Logout",
23927
+ logoutDesc: "Sign out of all GitHub accounts on this device",
23928
+ signOut: "Sign Out",
23929
+ newWindow: "New Window",
23930
+ universalPush: "Universal Push",
23931
+ collaborationRepo: "Collaboration Repo",
23932
+ localPath: "LOCAL PATH",
23933
+ repositorySetup: "Repository Setup",
23934
+ commitHistory: "Commit History",
23935
+ syncedFromGithub: "Synced automatically from your GitHub Account"
23618
23936
  },
23619
23937
  es: {
23620
23938
  settings: "Configuración",
@@ -23640,7 +23958,27 @@ const translations = {
23640
23958
  commitMessagePlaceholder: "Escriba el mensaje de confirmación...",
23641
23959
  success: "Éxito",
23642
23960
  error: "Error",
23643
- aiFixFailed: "La autoreparación de IA falló. Por favor solucione los conflictos manualmente."
23961
+ aiFixFailed: "La autoreparación de IA falló. Por favor solucione los conflictos manualmente.",
23962
+ enableSpaceScene: "Habilitar Escena Espacial",
23963
+ spaceSceneDesc: "Mostrar eventos en vivo y juegos en pantallas de bloqueo",
23964
+ changeLockscreenPin: "Cambiar PIN de Pantalla de Bloqueo",
23965
+ changePinDesc: "Establezca un nuevo PIN de 3 caracteres",
23966
+ savePin: "Guardar PIN",
23967
+ saved: "¡Guardado!",
23968
+ githubAccounts: "Cuentas de GitHub",
23969
+ manageAccounts: "Administre sus cuentas autenticadas",
23970
+ addAccount: "+ Agregar Cuenta",
23971
+ noAccountsLinked: "No hay cuentas vinculadas aún.",
23972
+ logout: "Cerrar Sesión",
23973
+ logoutDesc: "Cerrar sesión de todas las cuentas de GitHub en este dispositivo",
23974
+ signOut: "Desconectar",
23975
+ newWindow: "Nueva Ventana",
23976
+ universalPush: "Push Universal",
23977
+ collaborationRepo: "Repo de Colaboración",
23978
+ localPath: "RUTA LOCAL",
23979
+ repositorySetup: "Configuración de Repositorio",
23980
+ commitHistory: "Historial de Commits",
23981
+ syncedFromGithub: "Sincronizado automáticamente desde su cuenta de GitHub"
23644
23982
  },
23645
23983
  pt: {
23646
23984
  settings: "Configurações",
@@ -23666,7 +24004,27 @@ const translations = {
23666
24004
  commitMessagePlaceholder: "Digite a mensagem de confirmação...",
23667
24005
  success: "Sucesso",
23668
24006
  error: "Erro",
23669
- aiFixFailed: "A cura automática de IA falhou. Corrija os conflitos manualmente."
24007
+ aiFixFailed: "A cura automática de IA falhou. Corrija os conflitos manualmente.",
24008
+ enableSpaceScene: "Habilitar Cena Espacial",
24009
+ spaceSceneDesc: "Mostrar eventos ao vivo e jogos na tela de bloqueio",
24010
+ changeLockscreenPin: "Alterar PIN da Tela de Bloqueio",
24011
+ changePinDesc: "Defina um novo PIN de 3 caracteres",
24012
+ savePin: "Salvar PIN",
24013
+ saved: "Salvo!",
24014
+ githubAccounts: "Contas do GitHub",
24015
+ manageAccounts: "Gerencie suas contas autenticadas",
24016
+ addAccount: "+ Adicionar Conta",
24017
+ noAccountsLinked: "Nenhuma conta vinculada ainda.",
24018
+ logout: "Sair",
24019
+ logoutDesc: "Sair de todas as contas do GitHub neste dispositivo",
24020
+ signOut: "Desconectar",
24021
+ newWindow: "Nova Janela",
24022
+ universalPush: "Push Universal",
24023
+ collaborationRepo: "Repositório de Colaboração",
24024
+ localPath: "CAMINHO LOCAL",
24025
+ repositorySetup: "Configuração do Repositório",
24026
+ commitHistory: "Histórico de Commits",
24027
+ syncedFromGithub: "Sincronizado automaticamente da sua conta do GitHub"
23670
24028
  },
23671
24029
  fr: {
23672
24030
  settings: "Paramètres",
@@ -23692,7 +24050,27 @@ const translations = {
23692
24050
  commitMessagePlaceholder: "Entrez le message de validation...",
23693
24051
  success: "Succès",
23694
24052
  error: "Erreur",
23695
- aiFixFailed: "L'auto-réparation a échoué. Veuillez corriger les conflits manuellement."
24053
+ aiFixFailed: "L'auto-réparation a échoué. Veuillez corriger les conflits manuellement.",
24054
+ enableSpaceScene: "Activer la scène spatiale",
24055
+ spaceSceneDesc: "Afficher les événements en direct sur les écrans de verrouillage",
24056
+ changeLockscreenPin: "Modifier le code PIN",
24057
+ changePinDesc: "Définissez un nouveau code PIN à 3 caractères",
24058
+ savePin: "Enregistrer PIN",
24059
+ saved: "Enregistré !",
24060
+ githubAccounts: "Comptes GitHub",
24061
+ manageAccounts: "Gérez vos comptes authentifiés",
24062
+ addAccount: "+ Ajouter un compte",
24063
+ noAccountsLinked: "Aucun compte lié pour le moment.",
24064
+ logout: "Déconnexion",
24065
+ logoutDesc: "Se déconnecter de tous les comptes GitHub sur cet appareil",
24066
+ signOut: "Se déconnecter",
24067
+ newWindow: "Nouvelle fenêtre",
24068
+ universalPush: "Push Universel",
24069
+ collaborationRepo: "Dépôt de collaboration",
24070
+ localPath: "CHEMIN LOCAL",
24071
+ repositorySetup: "Configuration du dépôt",
24072
+ commitHistory: "Historique des commits",
24073
+ syncedFromGithub: "Synchronisé automatiquement depuis votre compte GitHub"
23696
24074
  },
23697
24075
  ro: {
23698
24076
  settings: "Setări",
@@ -23718,7 +24096,27 @@ const translations = {
23718
24096
  commitMessagePlaceholder: "Introduceți mesajul de confirmare...",
23719
24097
  success: "Succes",
23720
24098
  error: "Eroare",
23721
- aiFixFailed: "Auto-repararea IA a eșuat. Vă rugăm să reparați manual conflictele."
24099
+ aiFixFailed: "Auto-repararea IA a eșuat. Vă rugăm să reparați manual conflictele.",
24100
+ enableSpaceScene: "Activează scena spațială",
24101
+ spaceSceneDesc: "Afișează evenimente live și jocuri pe ecranele de blocare",
24102
+ changeLockscreenPin: "Schimbă PIN-ul ecranului",
24103
+ changePinDesc: "Setează un nou PIN de 3 caractere",
24104
+ savePin: "Salvează PIN",
24105
+ saved: "Salvat!",
24106
+ githubAccounts: "Conturi GitHub",
24107
+ manageAccounts: "Gestionează conturile autentificate",
24108
+ addAccount: "+ Adaugă cont",
24109
+ noAccountsLinked: "Niciun cont conectat încă.",
24110
+ logout: "Deconectare",
24111
+ logoutDesc: "Deconectați-vă de la toate conturile GitHub pe acest dispozitiv",
24112
+ signOut: "Ieșire",
24113
+ newWindow: "Fereastră nouă",
24114
+ universalPush: "Push Universal",
24115
+ collaborationRepo: "Repo de colaborare",
24116
+ localPath: "CALE LOCALĂ",
24117
+ repositorySetup: "Configurare depozit",
24118
+ commitHistory: "Istoric confirmări",
24119
+ syncedFromGithub: "Sincronizat automat din contul tău GitHub"
23722
24120
  },
23723
24121
  hi: {
23724
24122
  settings: "सेटिंग्स",
@@ -23744,7 +24142,27 @@ const translations = {
23744
24142
  commitMessagePlaceholder: "कमिट संदेश दर्ज करें...",
23745
24143
  success: "सफलता",
23746
24144
  error: "त्रुटि",
23747
- aiFixFailed: "AI ऑटो-हील विफल रहा। कृपया विवादों को मैन्युअल रूप से ठीक करें।"
24145
+ aiFixFailed: "AI ऑटो-हील विफल रहा। कृपया विवादों को मैन्युअल रूप से ठीक करें।",
24146
+ enableSpaceScene: "स्पेस सीन सक्षम करें",
24147
+ spaceSceneDesc: "लॉकस्क्रीन पर लाइव इवेंट और गेम दिखाएं",
24148
+ changeLockscreenPin: "लॉकस्क्रीन पिन बदलें",
24149
+ changePinDesc: "लॉकस्क्रीन के लिए नया 3-वर्ण का पिन सेट करें",
24150
+ savePin: "पिन सहेजें",
24151
+ saved: "सहेजा गया!",
24152
+ githubAccounts: "गिटहब अकाउंट्स",
24153
+ manageAccounts: "अपने प्रमाणित खातों को प्रबंधित करें",
24154
+ addAccount: "+ खाता जोड़ें",
24155
+ noAccountsLinked: "अभी तक कोई खाता लिंक नहीं किया गया है।",
24156
+ logout: "लॉग आउट",
24157
+ logoutDesc: "इस डिवाइस के सभी गिटहब खातों से साइन आउट करें",
24158
+ signOut: "साइन आउट",
24159
+ newWindow: "नई विंडो",
24160
+ universalPush: "यूनिवर्सल पुश",
24161
+ collaborationRepo: "कोलैबोरेशन रेपो",
24162
+ localPath: "लोकल पाथ",
24163
+ repositorySetup: "रिपॉजिटरी सेटअप",
24164
+ commitHistory: "कमिट इतिहास",
24165
+ syncedFromGithub: "आपके गिटहब खाते से स्वचालित रूप से सिंक किया गया"
23748
24166
  },
23749
24167
  bn: {
23750
24168
  settings: "সেটিংস",
@@ -23770,7 +24188,27 @@ const translations = {
23770
24188
  commitMessagePlaceholder: "কমিট মেসেজ লিখুন...",
23771
24189
  success: "সফলতা",
23772
24190
  error: "ত্রুটি",
23773
- aiFixFailed: "AI অটো-হিল ব্যর্থ হয়েছে। অনুগ্রহ করে নিজে সংঘাতগুলি ঠিক করুন।"
24191
+ aiFixFailed: "AI অটো-হিল ব্যর্থ হয়েছে। অনুগ্রহ করে নিজে সংঘাতগুলি ঠিক করুন।",
24192
+ enableSpaceScene: "স্পেস সিন চালু করুন",
24193
+ spaceSceneDesc: "লকস্ক্রিনে লাইভ ইভেন্ট এবং গেম দেখান",
24194
+ changeLockscreenPin: "লকস্ক্রিন পিন পরিবর্তন করুন",
24195
+ changePinDesc: "লকস্ক্রিনের জন্য একটি নতুন ৩-অক্ষরের পিন সেট করুন",
24196
+ savePin: "পিন সেভ করুন",
24197
+ saved: "সংরক্ষিত!",
24198
+ githubAccounts: "গিটহাব অ্যাকাউন্টসমূহ",
24199
+ manageAccounts: "আপনার যাচাইকৃত অ্যাকাউন্টগুলি পরিচালনা করুন",
24200
+ addAccount: "+ অ্যাকাউন্ট যোগ করুন",
24201
+ noAccountsLinked: "এখনও কোনো অ্যাকাউন্ট লিঙ্ক করা হয়নি।",
24202
+ logout: "লগআউট",
24203
+ logoutDesc: "এই ডিভাইসের সমস্ত গিটহাব অ্যাকাউন্ট থেকে সাইন আউট করুন",
24204
+ signOut: "সাইন আউট",
24205
+ newWindow: "নতুন উইন্ডো",
24206
+ universalPush: "ইউনিভার্সাল পুশ",
24207
+ collaborationRepo: "কোলাবোরেশন রিপো",
24208
+ localPath: "লোকাল পাথ",
24209
+ repositorySetup: "রিপোজিটরি সেটআপ",
24210
+ commitHistory: "কমিট ইতিহাস",
24211
+ syncedFromGithub: "আপনার গিটহাব অ্যাকাউন্ট থেকে স্বয়ংক্রিয়ভাবে সিঙ্ক করা হয়েছে"
23774
24212
  },
23775
24213
  te: {
23776
24214
  settings: "సెట్టింగులు",
@@ -23796,7 +24234,27 @@ const translations = {
23796
24234
  commitMessagePlaceholder: "కమిట్ సందేశాన్ని నమోదు చేయండి...",
23797
24235
  success: "విజయం",
23798
24236
  error: "లోపం",
23799
- aiFixFailed: "AI ఆటో-హీల్ విఫలమైంది. దయచేసి సమస్యలను మీరే పరిష్కరించండి."
24237
+ aiFixFailed: "AI ఆటో-హీల్ విఫలమైంది. దయచేసి సమస్యలను మీరే పరిష్కరించండి.",
24238
+ enableSpaceScene: "స్పేస్ సీన్‌ని ప్రారంభించండి",
24239
+ spaceSceneDesc: "లాక్‌స్క్రీన్‌లలో లైవ్ ఈవెంట్‌లు మరియు గేమ్‌లను చూపించు",
24240
+ changeLockscreenPin: "లాక్‌స్క్రీన్ PIN ని మార్చండి",
24241
+ changePinDesc: "లాక్‌స్క్రీన్ కోసం కొత్త 3-అక్షరాల PIN ని సెట్ చేయండి",
24242
+ savePin: "PIN సేవ్ చేయి",
24243
+ saved: "సేవ్ చేయబడింది!",
24244
+ githubAccounts: "GitHub ఖాతాలు",
24245
+ manageAccounts: "మీ ఖాతాలను నిర్వహించండి",
24246
+ addAccount: "+ ఖాతాను జోడించు",
24247
+ noAccountsLinked: "ఇంకా ఖాతాలు లింక్ చేయబడలేదు.",
24248
+ logout: "లాగ్అవుట్",
24249
+ logoutDesc: "ఈ పరికరంలో అన్ని GitHub ఖాతాల నుండి సైన్ అవుట్ చేయండి",
24250
+ signOut: "సైన్ అవుట్",
24251
+ newWindow: "కొత్త విండో",
24252
+ universalPush: "యూనివర్సల్ పుష్",
24253
+ collaborationRepo: "సహకార రెపో",
24254
+ localPath: "స్థానిక మార్గం",
24255
+ repositorySetup: "రిపోజిటరీ సెటప్",
24256
+ commitHistory: "కమిట్ చరిత్ర",
24257
+ syncedFromGithub: "మీ GitHub ఖాతా నుండి స్వయంచాలకంగా సమకాలీకరించబడింది"
23800
24258
  },
23801
24259
  ta: {
23802
24260
  settings: "அமைப்புகள்",
@@ -23822,7 +24280,27 @@ const translations = {
23822
24280
  commitMessagePlaceholder: "Commit செய்தியை உள்ளிடவும்...",
23823
24281
  success: "வெற்றி",
23824
24282
  error: "பிழை",
23825
- aiFixFailed: "AI தானியங்கி சரிசெய்தல் தோல்வியடைந்தது. முரண்பாடுகளை நீங்களே சரிசெய்யவும்."
24283
+ aiFixFailed: "AI தானியங்கி சரிசெய்தல் தோல்வியடைந்தது. முரண்பாடுகளை நீங்களே சரிசெய்யவும்.",
24284
+ enableSpaceScene: "விண்வெளி காட்சியை இயக்கு",
24285
+ spaceSceneDesc: "பூட்டுத் திரைகளில் நேரடி நிகழ்வுகள் மற்றும் கேம்களைக் காட்டு",
24286
+ changeLockscreenPin: "பூட்டுத் திரை PIN ஐ மாற்றவும்",
24287
+ changePinDesc: "உங்கள் பூட்டுத் திரைக்கு புதிய 3 எழுத்து PIN ஐ அமைக்கவும்",
24288
+ savePin: "PIN ஐ சேமி",
24289
+ saved: "சேமிக்கப்பட்டது!",
24290
+ githubAccounts: "GitHub கணக்குகள்",
24291
+ manageAccounts: "உங்கள் அங்கீகரிக்கப்பட்ட கணக்குகளை நிர்வகிக்கவும்",
24292
+ addAccount: "+ கணக்கைச் சேர்",
24293
+ noAccountsLinked: "இன்னும் கணக்குகள் இணைக்கப்படவில்லை.",
24294
+ logout: "வெளியேறு",
24295
+ logoutDesc: "இந்தச் சாதனத்தில் உள்ள அனைத்து GitHub கணக்குகளிலிருந்தும் வெளியேறவும்",
24296
+ signOut: "வெளியேறு",
24297
+ newWindow: "புதிய சாளரம்",
24298
+ universalPush: "யுனிவர்சல் புஷ்",
24299
+ collaborationRepo: "ஒத்துழைப்பு ரெப்போ",
24300
+ localPath: "உள்ளூர் பாதை",
24301
+ repositorySetup: "களஞ்சிய அமைப்பு",
24302
+ commitHistory: "Commit வரலாறு",
24303
+ syncedFromGithub: "உங்கள் GitHub கணக்கிலிருந்து தானாக ஒத்திசைக்கப்பட்டது"
23826
24304
  }
23827
24305
  };
23828
24306
  const LANGUAGES = [
@@ -24247,11 +24725,6 @@ function App() {
24247
24725
  window.api.getCliRepo().then((cliRepoPath) => {
24248
24726
  if (cliRepoPath) {
24249
24727
  loadRepo(cliRepoPath);
24250
- } else {
24251
- const lastRepo = localStorage.getItem("gitelectron-last-repo");
24252
- if (lastRepo) {
24253
- loadRepo(lastRepo);
24254
- }
24255
24728
  }
24256
24729
  });
24257
24730
  }, []);
@@ -24352,6 +24825,19 @@ function App() {
24352
24825
  await refreshRepoState();
24353
24826
  setChangesTab("changes");
24354
24827
  };
24828
+ const handleCollabRefresh = async () => {
24829
+ showToast("Refreshing collaboration repositories...", "info");
24830
+ try {
24831
+ setIsRefreshing(true);
24832
+ const repos = await window.api.getCollaboratedRepos();
24833
+ setCollaboratedRepos(repos || []);
24834
+ showToast(`Loaded ${repos?.length || 0} collaboration repository(ies)`, "success");
24835
+ } catch (e) {
24836
+ showToast(`Failed to refresh: ${e.message || e}`, "error");
24837
+ } finally {
24838
+ setIsRefreshing(false);
24839
+ }
24840
+ };
24355
24841
  const handleRepoCardClick = async (repo) => {
24356
24842
  const savedPath = collabMappings[repo.full_name];
24357
24843
  if (savedPath) {
@@ -24400,15 +24886,21 @@ function App() {
24400
24886
  };
24401
24887
  const handleCollabClone = async () => {
24402
24888
  if (!showCollabActionModal) return;
24403
- const { url, name, fullName } = showCollabActionModal;
24889
+ const { url, name, fullName, repo } = showCollabActionModal;
24404
24890
  setShowCollabActionModal(null);
24891
+ const cloneUrl = url || repo?.clone_url || repo?.html_url || (fullName ? `https://github.com/${fullName}.git` : "");
24892
+ if (!cloneUrl) {
24893
+ showToast("Could not resolve clone URL for this repository", "error");
24894
+ return;
24895
+ }
24405
24896
  try {
24406
24897
  const result = await window.api.selectDirectory();
24407
24898
  if (!result) return;
24899
+ const repoName = name || repo?.name || (fullName ? fullName.split("/").pop() : "repository");
24408
24900
  const selectedBasename = result.path.replace(/\\/g, "/").split("/").pop();
24409
- const destPath = selectedBasename?.toLowerCase() === name.toLowerCase() ? result.path : `${result.path}\\${name}`;
24901
+ const destPath = selectedBasename?.toLowerCase() === repoName.toLowerCase() ? result.path : `${result.path}\\${repoName}`;
24410
24902
  setIsCloning(true);
24411
- const clonedPath = await window.api.cloneRepository(url, destPath);
24903
+ const clonedPath = await window.api.cloneRepository(cloneUrl, destPath);
24412
24904
  if (fullName) {
24413
24905
  saveMapping(fullName, clonedPath);
24414
24906
  }
@@ -24416,7 +24908,7 @@ function App() {
24416
24908
  showToast(`Repository successfully cloned into ${clonedPath}!`, "success");
24417
24909
  } catch (err) {
24418
24910
  console.error(err);
24419
- showToast(`Failed to clone repository: ${err.message || err}`, "error");
24911
+ showToast(`Failed to clone: ${err.message || err}`, "error");
24420
24912
  } finally {
24421
24913
  setIsCloning(false);
24422
24914
  }
@@ -24845,11 +25337,6 @@ function App() {
24845
25337
  setShowSettings(true);
24846
25338
  };
24847
25339
  const saveSettings = async () => {
24848
- try {
24849
- await window.api.setGitConfig("user.name", gitConfig.name);
24850
- await window.api.setGitConfig("user.email", gitConfig.email);
24851
- } catch (e) {
24852
- }
24853
25340
  setShowSettings(false);
24854
25341
  };
24855
25342
  const viewDiff = async (file, staged) => {
@@ -25097,8 +25584,8 @@ function App() {
25097
25584
  {
25098
25585
  type: "text",
25099
25586
  value: gitConfig.name,
25100
- onChange: (e) => setGitConfig({ ...gitConfig, name: e.target.value }),
25101
- className: "w-full bg-canvas border border-border rounded-md p-2 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all"
25587
+ readOnly: true,
25588
+ className: "w-full bg-canvas border border-border rounded-md p-2 text-primary opacity-60 cursor-not-allowed focus:outline-none"
25102
25589
  }
25103
25590
  )
25104
25591
  ] }),
@@ -25109,10 +25596,11 @@ function App() {
25109
25596
  {
25110
25597
  type: "email",
25111
25598
  value: gitConfig.email,
25112
- onChange: (e) => setGitConfig({ ...gitConfig, email: e.target.value }),
25113
- className: "w-full bg-canvas border border-border rounded-md p-2 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all"
25599
+ readOnly: true,
25600
+ className: "w-full bg-canvas border border-border rounded-md p-2 text-primary opacity-60 cursor-not-allowed focus:outline-none"
25114
25601
  }
25115
- )
25602
+ ),
25603
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[10px] text-brand mt-1", children: t("syncedFromGithub") })
25116
25604
  ] }),
25117
25605
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
25118
25606
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
@@ -25140,8 +25628,8 @@ function App() {
25140
25628
  ] }) }),
25141
25629
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
25142
25630
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25143
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: "Enable Space Scene" }),
25144
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: "Show live events and games on lockscreens" })
25631
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: t("enableSpaceScene") }),
25632
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("spaceSceneDesc") })
25145
25633
  ] }),
25146
25634
  /* @__PURE__ */ jsxRuntimeExports.jsx(
25147
25635
  "button",
@@ -25164,8 +25652,8 @@ function App() {
25164
25652
  ] }) }),
25165
25653
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border/50 pt-3 mt-1", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
25166
25654
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25167
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: "Change Lockscreen PIN" }),
25168
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: "Set a new 3-character PIN for your lockscreen" })
25655
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs font-semibold text-secondary", children: t("changeLockscreenPin") }),
25656
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("changePinDesc") })
25169
25657
  ] }),
25170
25658
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
25171
25659
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -25194,7 +25682,7 @@ function App() {
25194
25682
  },
25195
25683
  disabled: newPin.length !== 3,
25196
25684
  className: "px-3 py-1 bg-accent/10 text-accent text-xs font-semibold rounded hover:bg-accent/20 transition-colors disabled:opacity-50",
25197
- children: pinChangeSuccess ? "Saved!" : "Save PIN"
25685
+ children: pinChangeSuccess ? t("saved") : t("savePin")
25198
25686
  }
25199
25687
  )
25200
25688
  ] })
@@ -25202,8 +25690,8 @@ function App() {
25202
25690
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-border/50 pt-4 mt-2", children: [
25203
25691
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
25204
25692
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25205
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-secondary", children: "GitHub Accounts" }),
25206
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: "Manage your authenticated accounts" })
25693
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-secondary", children: t("githubAccounts") }),
25694
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("manageAccounts") })
25207
25695
  ] }),
25208
25696
  /* @__PURE__ */ jsxRuntimeExports.jsx(
25209
25697
  "button",
@@ -25214,11 +25702,11 @@ function App() {
25214
25702
  handleStartAuth();
25215
25703
  },
25216
25704
  className: "px-3 py-1.5 bg-brand/10 hover:bg-brand/20 text-brand text-xs font-semibold rounded-md border border-brand/20 transition-colors",
25217
- children: "+ Add Account"
25705
+ children: t("addAccount")
25218
25706
  }
25219
25707
  )
25220
25708
  ] }),
25221
- accounts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center p-4 border border-dashed border-border/50 rounded-lg bg-surface/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60", children: "No accounts linked yet." }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 max-h-32 overflow-y-auto pr-1 custom-scrollbar", children: accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
25709
+ accounts.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center p-4 border border-dashed border-border/50 rounded-lg bg-surface/50", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60", children: t("noAccountsLinked") }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2 max-h-32 overflow-y-auto pr-1 custom-scrollbar", children: accounts.map((acc) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
25222
25710
  "div",
25223
25711
  {
25224
25712
  className: "flex items-center justify-between p-2 border border-border rounded-lg bg-canvas",
@@ -25256,8 +25744,8 @@ function App() {
25256
25744
  ] }),
25257
25745
  authStatus.status === "Verified" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-danger/20 pt-4 mt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
25258
25746
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25259
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-danger", children: "Logout" }),
25260
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: "Sign out of all GitHub accounts on this device" })
25747
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-danger", children: t("logout") }),
25748
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary/60 mt-0.5", children: t("logoutDesc") })
25261
25749
  ] }),
25262
25750
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
25263
25751
  "button",
@@ -25280,7 +25768,7 @@ function App() {
25280
25768
  className: "px-4 py-1.5 bg-danger/10 hover:bg-danger/20 text-danger text-xs font-bold rounded-md border border-danger/30 hover:border-danger/50 transition-all flex items-center gap-2",
25281
25769
  children: [
25282
25770
  /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" }) }),
25283
- "Sign Out"
25771
+ t("signOut")
25284
25772
  ]
25285
25773
  }
25286
25774
  )
@@ -25292,7 +25780,7 @@ function App() {
25292
25780
  {
25293
25781
  onClick: () => setShowSettings(false),
25294
25782
  className: "px-4 py-2 bg-surface-hover border border-border rounded-md transition-colors font-medium text-sm",
25295
- children: "Cancel"
25783
+ children: t("cancel")
25296
25784
  }
25297
25785
  ),
25298
25786
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -25300,7 +25788,7 @@ function App() {
25300
25788
  {
25301
25789
  onClick: saveSettings,
25302
25790
  className: "px-4 py-2 bg-brand hover:bg-brand-hover border border-white/10 rounded-md transition-all font-medium text-white text-sm shadow-sm",
25303
- children: "Save"
25791
+ children: t("save")
25304
25792
  }
25305
25793
  )
25306
25794
  ] })
@@ -25643,11 +26131,11 @@ function App() {
25643
26131
  children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
25644
26132
  }
25645
26133
  ),
25646
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
25647
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-brand/10 border border-brand/20 flex items-center justify-center text-brand", 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: "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" }) }) }),
25648
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
25649
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-lg font-bold text-primary tracking-tight", children: "Collaboration Repository" }),
25650
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary font-mono truncate max-w-[300px]", children: showCollabActionModal.fullName || showCollabActionModal.name })
26134
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 pr-8 min-w-0", children: [
26135
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-brand/10 border border-brand/20 flex items-center justify-center text-brand flex-shrink-0", 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: "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" }) }) }),
26136
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
26137
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-bold text-primary tracking-tight truncate", children: "Collaboration Repository" }),
26138
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary font-mono truncate max-w-full", children: showCollabActionModal.fullName || showCollabActionModal.name })
25651
26139
  ] })
25652
26140
  ] }),
25653
26141
  showCollabActionModal.missingPreviousPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-3.5 bg-danger/10 border border-danger/30 rounded-xl text-danger text-xs flex items-start gap-2.5", children: [
@@ -25969,7 +26457,7 @@ function App() {
25969
26457
  )
25970
26458
  }
25971
26459
  ),
25972
- "New Window"
26460
+ t("newWindow")
25973
26461
  ]
25974
26462
  }
25975
26463
  ),
@@ -25980,13 +26468,14 @@ function App() {
25980
26468
  className: "w-full bg-gradient-to-r from-blue-600/20 to-purple-600/20 hover:from-blue-600/40 hover:to-purple-600/40 text-primary font-medium py-2 px-4 rounded-md transition-all border border-blue-500/30 text-sm flex items-center justify-center gap-2 shadow-sm",
25981
26469
  children: [
25982
26470
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-base", children: "🚀" }),
25983
- " Universal Push"
26471
+ " ",
26472
+ t("universalPush")
25984
26473
  ]
25985
26474
  }
25986
26475
  )
25987
26476
  ] }),
25988
26477
  collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-4", children: [
25989
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary font-semibold mb-2 uppercase tracking-wider px-1", children: "Collaboration Repo" }),
26478
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary font-semibold mb-2 uppercase tracking-wider px-1", children: t("collaborationRepo") }),
25990
26479
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 max-h-40 overflow-y-auto pr-1 custom-scrollbar", children: collaboratedRepos.map((repo) => {
25991
26480
  const saved = collabMappings[repo.full_name];
25992
26481
  const isMissing = saved && pathExistenceMap[repo.full_name] === false;
@@ -26012,7 +26501,7 @@ function App() {
26012
26501
  }) })
26013
26502
  ] }),
26014
26503
  repoPath && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-canvas p-3 rounded-md border border-border mb-4", children: [
26015
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary font-semibold mb-1", children: "LOCAL PATH" }),
26504
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-secondary font-semibold mb-1", children: t("localPath") }),
26016
26505
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs font-mono text-accent truncate", title: repoPath, children: repoPath.split("\\").pop() })
26017
26506
  ] }),
26018
26507
  repoPath && !isRepo && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -26020,7 +26509,7 @@ function App() {
26020
26509
  {
26021
26510
  onClick: () => setShowSetupWizard(true),
26022
26511
  className: "bg-brand hover:bg-brand-hover text-white font-semibold py-2 px-4 rounded-md transition-all mb-4 text-sm w-full border border-white/10",
26023
- children: "Repository Setup"
26512
+ children: t("repositorySetup")
26024
26513
  }
26025
26514
  ),
26026
26515
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-auto space-y-2", children: [
@@ -26048,7 +26537,7 @@ function App() {
26048
26537
  )
26049
26538
  }
26050
26539
  ),
26051
- "Collaboration Repo",
26540
+ t("collaborationRepo"),
26052
26541
  collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto bg-brand/20 text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
26053
26542
  ]
26054
26543
  }
@@ -26077,7 +26566,7 @@ function App() {
26077
26566
  )
26078
26567
  }
26079
26568
  ),
26080
- "Commit History"
26569
+ t("commitHistory")
26081
26570
  ]
26082
26571
  }
26083
26572
  ),
@@ -26579,165 +27068,286 @@ function App() {
26579
27068
  )
26580
27069
  ] })
26581
27070
  ] }),
26582
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden flex flex-col lg:flex-row gap-6 pb-2", children: [
26583
- /* @__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: [
26584
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b border-border px-4 pt-3 gap-1", children: [
26585
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26586
- "button",
26587
- {
26588
- onClick: () => setChangesTab("changes"),
26589
- className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "changes" ? "text-primary border-accent bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
26590
- children: [
26591
- "Changes",
26592
- status.not_added.length + status.modified.length + status.created.length + status.conflicted.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-accent/20 text-accent text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: status.not_added.length + status.modified.length + status.created.length + status.conflicted.length })
26593
- ]
26594
- }
26595
- ),
26596
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26597
- "button",
26598
- {
26599
- onClick: () => setChangesTab("deleted"),
26600
- className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "deleted" ? "text-primary border-danger bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
26601
- children: [
26602
- "Deleted",
26603
- status.deleted.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-danger/20 text-danger text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: status.deleted.length })
26604
- ]
26605
- }
26606
- ),
26607
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26608
- "button",
26609
- {
26610
- onClick: () => {
26611
- setChangesTab("collaboration-repo");
26612
- window.api.getCollaboratedRepos().then((repos) => setCollaboratedRepos(repos || [])).catch(() => {
26613
- });
26614
- },
26615
- className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "collaboration-repo" ? "text-primary border-brand bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
26616
- children: [
26617
- "Collaboration Repo",
26618
- collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-brand/20 text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
26619
- ]
26620
- }
26621
- ),
26622
- changesTab === "changes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-2 mb-1", children: [
27071
+ changesTab === "collaboration-repo" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 bg-surface/70 backdrop-blur-md rounded-2xl border border-border flex flex-col transition-colors duration-300 overflow-hidden p-4 sm:p-5 min-w-0", children: [
27072
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b border-border pb-3 mb-4 gap-2 flex-shrink-0", children: [
27073
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27074
+ "button",
27075
+ {
27076
+ onClick: () => setChangesTab("changes"),
27077
+ className: "text-xs font-semibold px-3 py-1.5 rounded-lg text-secondary hover:text-primary hover:bg-surface-hover transition-colors flex items-center gap-1.5",
27078
+ children: [
27079
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "←" }),
27080
+ " Changes"
27081
+ ]
27082
+ }
27083
+ ),
27084
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27085
+ "button",
27086
+ {
27087
+ onClick: () => setChangesTab("deleted"),
27088
+ className: "text-xs font-semibold px-3 py-1.5 rounded-lg text-secondary hover:text-primary hover:bg-surface-hover transition-colors",
27089
+ children: "Deleted"
27090
+ }
27091
+ ),
27092
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ml-auto text-xs font-bold text-brand bg-brand/10 border border-brand/20 px-3 py-1 rounded-full", children: "Collaboration Repo" })
27093
+ ] }),
27094
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27095
+ CollaborationRepoView,
27096
+ {
27097
+ collaboratedRepos,
27098
+ collabMappings,
27099
+ pathExistenceMap,
27100
+ collabSearch,
27101
+ setCollabSearch,
27102
+ currentRepoPath: repoPath,
27103
+ onRepoCardClick: handleRepoCardClick,
27104
+ onRefresh: handleCollabRefresh,
27105
+ isRefreshing,
27106
+ onOpenExternal: (url) => window.api.openExternal(url)
27107
+ }
27108
+ )
27109
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
27110
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-hidden flex flex-col lg:flex-row gap-6 pb-2", children: [
27111
+ /* @__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: [
27112
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center border-b border-border px-4 pt-3 gap-1", children: [
26623
27113
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
26624
27114
  "button",
26625
27115
  {
26626
- onClick: handleUploadFiles,
26627
- disabled: !repoPath || isUploading,
26628
- className: "text-xs bg-brand/10 hover:bg-brand/20 text-brand border border-brand/30 px-2.5 py-1 rounded-md transition-all flex items-center gap-1.5 font-medium shadow-sm disabled:opacity-50",
26629
- title: "Upload files directly into this repository",
27116
+ onClick: () => setChangesTab("changes"),
27117
+ className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "changes" ? "text-primary border-accent bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
26630
27118
  children: [
26631
- /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) }),
26632
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isUploading ? "Uploading..." : "Upload Files" })
27119
+ "Changes",
27120
+ status.not_added.length + status.modified.length + status.created.length + status.conflicted.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-accent/20 text-accent text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: status.not_added.length + status.modified.length + status.created.length + status.conflicted.length })
26633
27121
  ]
26634
27122
  }
26635
27123
  ),
26636
- /* @__PURE__ */ jsxRuntimeExports.jsx(
27124
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
26637
27125
  "button",
26638
27126
  {
26639
- onClick: handleStageAll,
26640
- className: "text-xs bg-surface-hover text-primary px-2.5 py-1 rounded-md transition-colors border border-border hover:brightness-110",
26641
- children: "Stage All"
27127
+ onClick: () => setChangesTab("deleted"),
27128
+ className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "deleted" ? "text-primary border-danger bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
27129
+ children: [
27130
+ "Deleted",
27131
+ status.deleted.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-danger/20 text-danger text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: status.deleted.length })
27132
+ ]
26642
27133
  }
26643
- )
26644
- ] })
26645
- ] }),
26646
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-auto p-4 custom-scrollbar", children: [
26647
- changesTab === "changes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
26648
- status.conflicted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26649
- "li",
27134
+ ),
27135
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27136
+ "button",
26650
27137
  {
26651
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27138
+ onClick: () => {
27139
+ setChangesTab("collaboration-repo");
27140
+ window.api.getCollaboratedRepos().then((repos) => setCollaboratedRepos(repos || [])).catch(() => {
27141
+ });
27142
+ },
27143
+ className: `text-xs font-semibold px-3 py-1.5 rounded-t-md transition-colors border-b-2 ${changesTab === "collaboration-repo" ? "text-primary border-brand bg-canvas/50" : "text-secondary border-transparent hover:text-primary"}`,
26652
27144
  children: [
26653
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26654
- "span",
26655
- {
26656
- onClick: () => viewDiff(f, false),
26657
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
26658
- children: [
26659
- /* @__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: "!" }),
26660
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
26661
- ]
26662
- }
26663
- ),
26664
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
26665
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26666
- "button",
27145
+ "Collaboration Repo",
27146
+ collaboratedRepos.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-1.5 bg-brand/20 text-brand text-[10px] font-bold px-1.5 py-0.5 rounded-full", children: collaboratedRepos.length })
27147
+ ]
27148
+ }
27149
+ ),
27150
+ changesTab === "changes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ml-auto flex items-center gap-2 mb-1", children: [
27151
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27152
+ "button",
27153
+ {
27154
+ onClick: handleUploadFiles,
27155
+ disabled: !repoPath || isUploading,
27156
+ className: "text-xs bg-brand/10 hover:bg-brand/20 text-brand border border-brand/30 px-2.5 py-1 rounded-md transition-all flex items-center gap-1.5 font-medium shadow-sm disabled:opacity-50",
27157
+ title: "Upload files directly into this repository",
27158
+ children: [
27159
+ /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" }) }),
27160
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: isUploading ? "Uploading..." : "Upload Files" })
27161
+ ]
27162
+ }
27163
+ ),
27164
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27165
+ "button",
27166
+ {
27167
+ onClick: handleStageAll,
27168
+ className: "text-xs bg-surface-hover text-primary px-2.5 py-1 rounded-md transition-colors border border-border hover:brightness-110",
27169
+ children: "Stage All"
27170
+ }
27171
+ )
27172
+ ] })
27173
+ ] }),
27174
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-auto p-4 custom-scrollbar", children: [
27175
+ changesTab === "changes" && /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
27176
+ status.conflicted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27177
+ "li",
27178
+ {
27179
+ className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27180
+ children: [
27181
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27182
+ "span",
26667
27183
  {
26668
- onClick: () => openEditor(f),
26669
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26670
- children: "Edit"
27184
+ onClick: () => viewDiff(f, false),
27185
+ className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27186
+ children: [
27187
+ /* @__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: "!" }),
27188
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27189
+ ]
26671
27190
  }
26672
27191
  ),
26673
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26674
- "button",
27192
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
27193
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27194
+ "button",
27195
+ {
27196
+ onClick: () => openEditor(f),
27197
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27198
+ children: "Edit"
27199
+ }
27200
+ ),
27201
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27202
+ "button",
27203
+ {
27204
+ onClick: () => handleStageSingle(f),
27205
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27206
+ children: "+"
27207
+ }
27208
+ )
27209
+ ] })
27210
+ ]
27211
+ },
27212
+ `c-${f}`
27213
+ )),
27214
+ status.not_added.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27215
+ "li",
27216
+ {
27217
+ className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27218
+ children: [
27219
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27220
+ "span",
26675
27221
  {
26676
- onClick: () => handleStageSingle(f),
26677
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26678
- children: "+"
27222
+ onClick: () => viewDiff(f, false),
27223
+ className: "text-xs text-success font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27224
+ children: [
27225
+ /* @__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" }),
27226
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27227
+ ]
26679
27228
  }
26680
- )
26681
- ] })
26682
- ]
26683
- },
26684
- `c-${f}`
26685
- )),
26686
- status.not_added.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26687
- "li",
26688
- {
26689
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
26690
- children: [
26691
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
26692
- "span",
26693
- {
26694
- onClick: () => viewDiff(f, false),
26695
- className: "text-xs text-success font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
26696
- children: [
26697
- /* @__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" }),
26698
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
26699
- ]
26700
- }
26701
- ),
26702
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
26703
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26704
- "button",
27229
+ ),
27230
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
27231
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27232
+ "button",
27233
+ {
27234
+ onClick: () => openEditor(f),
27235
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27236
+ children: "Edit"
27237
+ }
27238
+ ),
27239
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27240
+ "button",
27241
+ {
27242
+ onClick: () => handleStageSingle(f),
27243
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27244
+ children: "+"
27245
+ }
27246
+ )
27247
+ ] })
27248
+ ]
27249
+ },
27250
+ `u-${f}`
27251
+ )),
27252
+ status.modified.filter((f) => !status.conflicted.includes(f)).map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27253
+ "li",
27254
+ {
27255
+ className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
27256
+ children: [
27257
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
27258
+ "span",
26705
27259
  {
26706
- onClick: () => openEditor(f),
26707
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26708
- children: "Edit"
27260
+ onClick: () => viewDiff(f, false),
27261
+ className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
27262
+ children: [
27263
+ /* @__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" }),
27264
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27265
+ ]
26709
27266
  }
26710
27267
  ),
26711
- /* @__PURE__ */ jsxRuntimeExports.jsx(
27268
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
27269
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27270
+ "button",
27271
+ {
27272
+ onClick: () => openEditor(f),
27273
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27274
+ children: "Edit"
27275
+ }
27276
+ ),
27277
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27278
+ "button",
27279
+ {
27280
+ onClick: () => handleStageSingle(f),
27281
+ className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
27282
+ children: "+"
27283
+ }
27284
+ )
27285
+ ] })
27286
+ ]
27287
+ },
27288
+ `m-${f}`
27289
+ )),
27290
+ status.not_added.length + status.modified.length + status.created.length + status.conflicted.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No working tree changes" })
27291
+ ] }),
27292
+ changesTab === "deleted" && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
27293
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-1", children: status.deleted.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No locally deleted files" }) : status.deleted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27294
+ "li",
27295
+ {
27296
+ className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md transition-colors",
27297
+ children: [
27298
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-danger/70 font-mono flex-1 flex items-center gap-1.5 truncate", children: [
27299
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 text-[10px] font-bold bg-danger/20 text-danger border border-danger/30 px-1 rounded", children: "D" }),
27300
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
27301
+ ] }),
27302
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
26712
27303
  "button",
26713
27304
  {
26714
27305
  onClick: () => handleStageSingle(f),
26715
27306
  className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26716
27307
  children: "+"
26717
27308
  }
26718
- )
26719
- ] })
26720
- ]
26721
- },
26722
- `u-${f}`
26723
- )),
26724
- status.modified.filter((f) => !status.conflicted.includes(f)).map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
27309
+ ) })
27310
+ ]
27311
+ },
27312
+ `d-${f}`
27313
+ )) }),
27314
+ deletedHistory?.all && deletedHistory.all.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 pt-3 border-t border-border/50", children: [
27315
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-[11px] font-semibold text-secondary uppercase tracking-wider mb-2", children: "Recently Deleted in Repository" }),
27316
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-2", children: deletedHistory.all.map((commit) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "bg-surface/50 p-2 rounded-md border border-border/50", children: [
27317
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-start mb-1.5", children: [
27318
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-semibold text-primary truncate", title: commit.message, children: commit.message }),
27319
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] text-secondary whitespace-nowrap ml-2 flex-shrink-0", children: [
27320
+ new Date(commit.date).toLocaleDateString(),
27321
+ " ",
27322
+ new Date(commit.date).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
27323
+ ] })
27324
+ ] }),
27325
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-1", children: commit.diff?.files?.filter((f) => f.status === "D").map((f, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[11px] font-mono text-danger/80", children: [
27326
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 font-bold bg-danger/10 text-danger border border-danger/20 px-1 rounded", children: "D" }),
27327
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", title: f.file, children: f.file })
27328
+ ] }, i)) })
27329
+ ] }, commit.hash)) })
27330
+ ] })
27331
+ ] })
27332
+ ] })
27333
+ ] }),
27334
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 bg-surface/70 backdrop-blur-md rounded-xl p-4 border border-border flex flex-col transition-colors duration-300", children: [
27335
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "font-semibold mb-4 text-primary text-sm", children: "Staged Changes" }),
27336
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto pr-2 custom-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
27337
+ status.staged.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26725
27338
  "li",
26726
27339
  {
26727
27340
  className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
26728
27341
  children: [
26729
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
27342
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
26730
27343
  "span",
26731
27344
  {
26732
- onClick: () => viewDiff(f, false),
26733
- className: "text-xs text-warning font-mono cursor-pointer flex-1 flex items-center gap-1.5 truncate",
26734
- children: [
26735
- /* @__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" }),
26736
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
26737
- ]
27345
+ onClick: () => viewDiff(f, true),
27346
+ className: "text-xs text-success font-mono cursor-pointer flex-1",
27347
+ children: f
26738
27348
  }
26739
27349
  ),
26740
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: [
27350
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1", children: [
26741
27351
  /* @__PURE__ */ jsxRuntimeExports.jsx(
26742
27352
  "button",
26743
27353
  {
@@ -26749,251 +27359,76 @@ function App() {
26749
27359
  /* @__PURE__ */ jsxRuntimeExports.jsx(
26750
27360
  "button",
26751
27361
  {
26752
- onClick: () => handleStageSingle(f),
26753
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26754
- children: "+"
27362
+ onClick: () => handleUnstageSingle(f),
27363
+ className: "text-[10px] text-secondary hover:text-danger px-2 py-0.5 border border-border rounded bg-canvas",
27364
+ children: "-"
26755
27365
  }
26756
27366
  )
26757
27367
  ] })
26758
27368
  ]
26759
27369
  },
26760
- `m-${f}`
27370
+ f
26761
27371
  )),
26762
- status.not_added.length + status.modified.length + status.created.length + status.conflicted.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No working tree changes" })
26763
- ] }),
26764
- changesTab === "deleted" && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26765
- /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-1", children: status.deleted.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No locally deleted files" }) : status.deleted.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26766
- "li",
26767
- {
26768
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md transition-colors",
26769
- children: [
26770
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-danger/70 font-mono flex-1 flex items-center gap-1.5 truncate", children: [
26771
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 text-[10px] font-bold bg-danger/20 text-danger border border-danger/30 px-1 rounded", children: "D" }),
26772
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: f })
26773
- ] }),
26774
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1 flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
26775
- "button",
26776
- {
26777
- onClick: () => handleStageSingle(f),
26778
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26779
- children: "+"
26780
- }
26781
- ) })
26782
- ]
26783
- },
26784
- `d-${f}`
26785
- )) }),
26786
- deletedHistory?.all && deletedHistory.all.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 pt-3 border-t border-border/50", children: [
26787
- /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-[11px] font-semibold text-secondary uppercase tracking-wider mb-2", children: "Recently Deleted in Repository" }),
26788
- /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "space-y-2", children: deletedHistory.all.map((commit) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", { className: "bg-surface/50 p-2 rounded-md border border-border/50", children: [
26789
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-start mb-1.5", children: [
26790
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-semibold text-primary truncate", title: commit.message, children: commit.message }),
26791
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[10px] text-secondary whitespace-nowrap ml-2 flex-shrink-0", children: [
26792
- new Date(commit.date).toLocaleDateString(),
26793
- " ",
26794
- new Date(commit.date).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })
26795
- ] })
26796
- ] }),
26797
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-1", children: commit.diff?.files?.filter((f) => f.status === "D").map((f, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5 text-[11px] font-mono text-danger/80", children: [
26798
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0 font-bold bg-danger/10 text-danger border border-danger/20 px-1 rounded", children: "D" }),
26799
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", title: f.file, children: f.file })
26800
- ] }, i)) })
26801
- ] }, commit.hash)) })
26802
- ] })
26803
- ] }),
26804
- changesTab === "collaboration-repo" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
26805
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-4 bg-brand/10 border border-brand/30 rounded-xl", children: [
26806
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
26807
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-10 h-10 rounded-xl bg-brand/20 border border-brand/30 flex items-center justify-center text-brand", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-6 h-6", 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" }) }) }),
26808
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26809
- /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-base font-bold text-primary flex items-center gap-2", children: [
26810
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Collaboration Repositories" }),
26811
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs bg-brand/20 text-brand px-2 py-0.5 rounded-full font-semibold", children: collaboratedRepos.length })
26812
- ] }),
26813
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary", children: "All repositories you are collaborating on with teams & other developers" })
26814
- ] })
26815
- ] }),
26816
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
26817
- "button",
26818
- {
26819
- onClick: async () => {
26820
- showToast("Refreshing collaboration repositories...", "info");
26821
- try {
26822
- const repos = await window.api.getCollaboratedRepos();
26823
- setCollaboratedRepos(repos || []);
26824
- showToast(`Found ${repos?.length || 0} collaboration repository(ies)`, "success");
26825
- } catch (e) {
26826
- showToast(`Failed to refresh: ${e.message}`, "error");
26827
- }
26828
- },
26829
- className: "text-xs bg-surface border border-border hover:bg-surface-hover text-primary px-3 py-1.5 rounded-lg transition-colors flex items-center gap-1.5 font-medium shadow-sm",
26830
- title: "Refresh repositories from GitHub",
26831
- children: [
26832
- /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-3.5 h-3.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" }) }),
26833
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Refresh" })
26834
- ]
26835
- }
26836
- ) })
26837
- ] }),
26838
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
26839
- /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "w-4 h-4 text-secondary absolute left-3 top-2.5 pointer-events-none", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }),
26840
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26841
- "input",
26842
- {
26843
- type: "text",
26844
- value: collabSearch,
26845
- onChange: (e) => setCollabSearch(e.target.value),
26846
- placeholder: "Search collaboration repositories by name or owner...",
26847
- className: "w-full bg-surface border border-border rounded-lg pl-9 pr-3 py-2 text-xs text-primary placeholder-secondary focus:outline-none focus:border-brand focus:ring-1 focus:ring-brand transition-all"
26848
- }
26849
- )
26850
- ] }),
26851
- collaboratedRepos.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center py-12 border border-dashed border-border rounded-xl bg-surface/30 p-6", children: [
26852
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-3xl mb-2", children: "🤝" }),
26853
- /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold text-primary mb-1", children: "No Collaboration Repositories Found" }),
26854
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary max-w-sm mx-auto", children: "When someone invites you as a collaborator, you add collaborators to your repository, or you work on team repositories, they will appear here." })
26855
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2.5", children: collaboratedRepos.filter((r) => {
26856
- if (!collabSearch.trim()) return true;
26857
- const q = collabSearch.toLowerCase();
26858
- return r.name?.toLowerCase().includes(q) || r.full_name?.toLowerCase().includes(q) || r.owner?.login?.toLowerCase().includes(q) || r.description && r.description.toLowerCase().includes(q);
26859
- }).map((repo) => {
26860
- const savedPath = collabMappings[repo.full_name];
26861
- const isCurrentActive = repoPath && savedPath && repoPath.toLowerCase() === savedPath.toLowerCase();
26862
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
26863
- "div",
26864
- {
26865
- onClick: () => handleRepoCardClick(repo),
26866
- className: `p-3.5 rounded-xl border transition-all cursor-pointer flex flex-col sm:flex-row sm:items-center justify-between gap-3 ${isCurrentActive ? "bg-brand/10 border-brand shadow-sm" : "bg-surface/60 border-border hover:bg-surface-hover hover:border-border/80"}`,
26867
- children: [
26868
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3", children: [
26869
- repo.owner?.avatar_url && /* @__PURE__ */ jsxRuntimeExports.jsx(
26870
- "img",
26871
- {
26872
- src: repo.owner.avatar_url,
26873
- alt: repo.owner.login,
26874
- className: "w-9 h-9 rounded-lg border border-border flex-shrink-0 mt-0.5 object-cover"
26875
- }
26876
- ),
26877
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26878
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
26879
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-bold text-primary hover:text-brand transition-colors", children: repo.name }),
26880
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-xs text-secondary font-mono", children: [
26881
- "by @",
26882
- repo.owner?.login
26883
- ] }),
26884
- repo.private ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-amber-500/10 text-amber-400 border border-amber-500/20 px-1.5 py-0.2 rounded font-medium", children: "Private" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-emerald-500/10 text-emerald-400 border border-emerald-500/20 px-1.5 py-0.2 rounded font-medium", children: "Public" }),
26885
- isCurrentActive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-[10px] bg-brand text-white px-2 py-0.5 rounded font-bold uppercase tracking-wider", children: "Active" })
26886
- ] }),
26887
- repo.description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-secondary line-clamp-1 mt-0.5 max-w-md", children: repo.description }),
26888
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 mt-1.5 text-[11px] text-secondary", children: [
26889
- savedPath ? pathExistenceMap[repo.full_name] === false ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-danger font-mono flex items-center gap-1 truncate max-w-xs", title: `Local folder deleted or moved: ${savedPath}`, children: [
26890
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-danger animate-pulse" }),
26891
- "Deleted: ",
26892
- savedPath
26893
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-emerald-400 font-mono flex items-center gap-1 truncate max-w-xs", title: savedPath, children: [
26894
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-400" }),
26895
- savedPath
26896
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-secondary/70 italic flex items-center gap-1", children: [
26897
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-secondary/50" }),
26898
- "Not cloned yet"
26899
- ] }),
26900
- repo.default_branch && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
26901
- "Branch: ",
26902
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-mono text-primary", children: repo.default_branch })
26903
- ] })
26904
- ] })
26905
- ] })
26906
- ] }),
26907
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2 self-end sm:self-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
26908
- "button",
26909
- {
26910
- type: "button",
26911
- onClick: (e) => {
26912
- e.stopPropagation();
26913
- handleRepoCardClick(repo);
26914
- },
26915
- className: `px-3.5 py-1.5 text-xs font-semibold rounded-lg transition-all shadow-sm flex items-center gap-1.5 ${savedPath ? pathExistenceMap[repo.full_name] === false ? "bg-danger/20 hover:bg-danger/30 text-danger border border-danger/40" : "bg-brand hover:bg-brand-hover text-white" : "bg-surface hover:bg-surface-hover border border-border text-primary"}`,
26916
- children: [
26917
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: savedPath ? pathExistenceMap[repo.full_name] === false ? "Re-Clone" : "Open Repo" : "Connect / Clone" }),
26918
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: pathExistenceMap[repo.full_name] === false ? "☁️" : "→" })
26919
- ]
26920
- }
26921
- ) })
26922
- ]
26923
- },
26924
- repo.id
26925
- );
26926
- }) })
26927
- ] })
27372
+ status.staged.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No files staged for commit" })
27373
+ ] }) })
26928
27374
  ] })
26929
27375
  ] }),
26930
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 bg-surface/70 backdrop-blur-md rounded-xl p-4 border border-border flex flex-col transition-colors duration-300", children: [
26931
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "font-semibold mb-4 text-primary text-sm", children: "Staged Changes" }),
26932
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-auto pr-2 custom-scrollbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("ul", { className: "space-y-1", children: [
26933
- status.staged.map((f) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
26934
- "li",
26935
- {
26936
- className: "flex justify-between items-center hover:bg-surface-hover px-2 py-1.5 rounded-md group transition-colors",
26937
- children: [
26938
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26939
- "span",
26940
- {
26941
- onClick: () => viewDiff(f, true),
26942
- className: "text-xs text-success font-mono cursor-pointer flex-1",
26943
- children: f
26944
- }
26945
- ),
26946
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "opacity-0 group-hover:opacity-100 flex gap-1", children: [
26947
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26948
- "button",
26949
- {
26950
- onClick: () => openEditor(f),
26951
- className: "text-[10px] text-secondary hover:text-primary px-2 py-0.5 border border-border rounded bg-canvas",
26952
- children: "Edit"
26953
- }
26954
- ),
26955
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26956
- "button",
26957
- {
26958
- onClick: () => handleUnstageSingle(f),
26959
- className: "text-[10px] text-secondary hover:text-danger px-2 py-0.5 border border-border rounded bg-canvas",
26960
- children: "-"
26961
- }
26962
- )
26963
- ] })
26964
- ]
26965
- },
26966
- f
26967
- )),
26968
- status.staged.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { className: "text-xs text-secondary italic mt-2 text-center", children: "No files staged for commit" })
26969
- ] }) })
26970
- ] })
26971
- ] }),
26972
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 bg-surface/70 backdrop-blur-md p-4 rounded-xl border border-border flex gap-3 items-center transition-colors duration-300", children: [
26973
- /* @__PURE__ */ jsxRuntimeExports.jsx(
26974
- "input",
26975
- {
26976
- type: "text",
26977
- placeholder: "Commit message...",
26978
- className: "flex-1 bg-canvas border border-border rounded-md p-2.5 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all disabled:opacity-50 text-sm",
26979
- value: commitMessage,
26980
- disabled: !pushPermission,
26981
- onChange: (e) => setCommitMessage(e.target.value),
26982
- onKeyDown: (e) => {
26983
- if (e.key === "Enter") handleCommitClick();
27376
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 bg-surface/70 backdrop-blur-md p-4 rounded-xl border border-border flex gap-3 items-center transition-colors duration-300", children: [
27377
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27378
+ "input",
27379
+ {
27380
+ type: "text",
27381
+ placeholder: "Commit message...",
27382
+ className: "flex-1 bg-canvas border border-border rounded-md p-2.5 text-primary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent transition-all disabled:opacity-50 text-sm",
27383
+ value: commitMessage,
27384
+ disabled: !pushPermission,
27385
+ onChange: (e) => setCommitMessage(e.target.value),
27386
+ onKeyDown: (e) => {
27387
+ if (e.key === "Enter") handleCommitClick();
27388
+ }
26984
27389
  }
26985
- }
26986
- ),
26987
- /* @__PURE__ */ jsxRuntimeExports.jsx(
27390
+ ),
27391
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27392
+ "button",
27393
+ {
27394
+ onClick: handleCommitClick,
27395
+ disabled: status.staged.length === 0 || !commitMessage || !pushPermission,
27396
+ className: "px-6 py-2.5 bg-brand hover:bg-brand-hover border border-white/10 disabled:opacity-50 disabled:bg-surface-hover disabled:border-border text-white rounded-md font-semibold transition-all shadow-sm flex items-center justify-center gap-2 text-sm",
27397
+ children: "Commit & Push"
27398
+ }
27399
+ )
27400
+ ] })
27401
+ ] })
27402
+ ] }) : changesTab === "collaboration-repo" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 bg-surface/70 backdrop-blur-md rounded-2xl border border-border flex flex-col transition-colors duration-300 overflow-hidden p-4 sm:p-5 min-w-0", children: [
27403
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between border-b border-border pb-3 mb-4 gap-2 flex-shrink-0", children: [
27404
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
26988
27405
  "button",
26989
27406
  {
26990
- onClick: handleCommitClick,
26991
- disabled: status.staged.length === 0 || !commitMessage || !pushPermission,
26992
- className: "px-6 py-2.5 bg-brand hover:bg-brand-hover border border-white/10 disabled:opacity-50 disabled:bg-surface-hover disabled:border-border text-white rounded-md font-semibold transition-all shadow-sm flex items-center justify-center gap-2 text-sm",
26993
- children: "Commit & Push"
27407
+ onClick: () => setChangesTab("changes"),
27408
+ className: "text-xs font-semibold px-3.5 py-1.5 rounded-xl bg-surface hover:bg-surface-hover text-secondary hover:text-primary border border-border transition-colors flex items-center gap-1.5",
27409
+ children: [
27410
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "←" }),
27411
+ " Back to Workspace"
27412
+ ]
26994
27413
  }
26995
- )
26996
- ] })
27414
+ ),
27415
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-brand bg-brand/10 border border-brand/20 px-3 py-1 rounded-full", children: "Collaboration Hub" }) })
27416
+ ] }),
27417
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
27418
+ CollaborationRepoView,
27419
+ {
27420
+ collaboratedRepos,
27421
+ collabMappings,
27422
+ pathExistenceMap,
27423
+ collabSearch,
27424
+ setCollabSearch,
27425
+ currentRepoPath: repoPath,
27426
+ onRepoCardClick: handleRepoCardClick,
27427
+ onRefresh: handleCollabRefresh,
27428
+ isRefreshing,
27429
+ onOpenExternal: (url) => window.api.openExternal(url)
27430
+ }
27431
+ )
26997
27432
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center text-secondary relative z-10", children: [
26998
27433
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-24 h-24 mb-6 opacity-30 hover:opacity-50 transition-opacity", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, alt: "Logo", className: "w-full h-full drop-shadow-md" }) }),
26999
27434
  repoPath ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [