Add repo modal tabs and grouped repo lists

Introduce a tabbed repository modal with new styling and grouped lists. Adds CSS for modal tabs and repo-owner group/divider visuals. In JS, add activeReposTab state, helper functions to infer repo owners and match remotes, and utilities to group server and local repos. Replace flat lists with serverRepoListTemplate/recentLocalReposTemplate and group local scan results; update reposModalContent to render tabbed local/server panels and bind tab click events.
This commit is contained in:
Andrew Zambazos
2026-05-13 18:36:21 +12:00
parent 37fc1dc626
commit 19f7631263
2 changed files with 203 additions and 37 deletions
+72
View File
@@ -1233,6 +1233,43 @@
min-height: 0;
}
.gd-modal-tabs {
display: flex;
gap: 6px;
padding: 10px 12px;
border-bottom: 1px solid var(--border);
background: var(--bg-panel-alt);
}
.gd-modal-tab {
flex: 1;
justify-content: center;
padding: 7px 10px;
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: transparent;
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
}
.gd-modal-tab:hover {
background: var(--bg-hover);
color: var(--text-main);
}
.gd-modal-tab.active {
border-color: transparent;
background: var(--accent-strong);
color: #fff;
}
.gd-modal-tab-panel {
min-height: 430px;
display: flex;
flex-direction: column;
}
.gd-modal-two-col {
display: grid;
grid-template-columns: 1fr 1fr;
@@ -1252,6 +1289,10 @@
border-left: 1px solid var(--border);
}
.gd-modal-tab-panel .gd-modal-section-alt {
border-left: 0;
}
.gd-modal-section-header {
display: flex;
align-items: center;
@@ -1318,6 +1359,10 @@
max-height: 300px;
}
.gd-modal-tab-panel .gd-modal-scroll-list {
max-height: none;
}
.gd-modal-scan-list {
display: flex;
flex-direction: column;
@@ -1435,6 +1480,33 @@
color: #fff;
}
.repo-owner-group {
padding-bottom: 6px;
}
.repo-owner-group + .repo-owner-group {
margin-top: 10px;
}
.repo-owner-divider {
display: flex;
align-items: center;
gap: 10px;
margin: 2px 0 4px;
color: var(--text-muted);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.repo-owner-divider::after {
content: "";
flex: 1;
height: 1px;
background: var(--border);
}
/* ── Branch dialog ────────────────────────────────────────────────────────── */
.modal-backdrop {