Add repo filters, UI tabs and dev docs
Enhance UI and dev workflow: add main/right tabbed panels (Repositories/Local and Clone/Settings/Servers), repository owner filter pills (All/Personal/Organizations), org-grouped listing, repo cards, git output and empty-state styling. Introduce new state vars (activeMainTab, activeRightTab, repoOwnerFilter, currentUserLogin) and update event bindings to toggle tabs/filters and focus appropriate panels on actions. Add fetchCurrentUser to gitea-api and use it when loading repositories to distinguish personal vs organization repos (falls back to mock user on error). Update README with development/prerequisites and build instructions and rename npm script "tauri:dev" -> "dev" for running the Tauri dev process.
This commit is contained in:
+215
-1
@@ -15,14 +15,21 @@
|
||||
.rightbar {
|
||||
background: rgba(13, 21, 34, 0.88);
|
||||
border-right: 1px solid var(--border);
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
padding: 16px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.rightbar {
|
||||
border-right: 0;
|
||||
border-left: 1px solid var(--border);
|
||||
padding: 0 12px 12px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
.main {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
@@ -69,6 +76,54 @@
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
}
|
||||
|
||||
.repo-filter-pills {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.pill-btn {
|
||||
padding: 4px 14px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--border);
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.pill-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.pill-btn.active {
|
||||
background: var(--accent);
|
||||
border-color: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.org-group {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.org-group-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.org-badge {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
@@ -131,6 +186,165 @@
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
/* ── Tabs ─────────────────────────────────────────── */
|
||||
.tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 0 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-radius: 0;
|
||||
padding: 10px 14px;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: color 0.15s ease, border-color 0.15s ease;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.tab-btn:hover {
|
||||
transform: none;
|
||||
color: var(--text-main);
|
||||
border-color: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.tab-btn.active {
|
||||
color: var(--text-main);
|
||||
border-bottom-color: var(--accent);
|
||||
}
|
||||
|
||||
.tab-spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.tab-search {
|
||||
width: 180px !important;
|
||||
padding: 6px 10px !important;
|
||||
font-size: 13px;
|
||||
margin: 4px 4px 4px 0;
|
||||
}
|
||||
|
||||
.main-tabs {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.right-tabs {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
margin: 0 -12px;
|
||||
padding: 0 12px;
|
||||
background: rgba(13, 21, 34, 0.96);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* ── Sidebar ──────────────────────────────────────── */
|
||||
.sidebar-brand .title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.sidebar .server-chip {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar .server-chip > div {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sidebar-nav {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.sidebar-btn {
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
padding: 7px 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar-recents {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.recent-item {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
color: var(--text-muted);
|
||||
padding: 3px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.recent-item:hover {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* ── Git output ───────────────────────────────────── */
|
||||
.git-output {
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 12px 14px;
|
||||
font-size: 12px;
|
||||
font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
|
||||
color: var(--success);
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.git-output-placeholder {
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.commit-note {
|
||||
font-size: 11px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* ── Local repo indicator ─────────────────────────── */
|
||||
.selected-repo {
|
||||
font-size: 13px;
|
||||
padding: 7px 10px;
|
||||
background: rgba(79, 157, 255, 0.08);
|
||||
border: 1px solid rgba(79, 157, 255, 0.18);
|
||||
border-radius: var(--radius-md);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* ── Empty state ──────────────────────────────────── */
|
||||
.empty-state {
|
||||
grid-column: 1 / -1;
|
||||
text-align: center;
|
||||
padding: 40px 16px;
|
||||
}
|
||||
|
||||
.empty-state > div:first-child {
|
||||
font-size: 15px;
|
||||
color: var(--text-main);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* ── Responsive ───────────────────────────────────── */
|
||||
@media (max-width: 1180px) {
|
||||
.layout {
|
||||
grid-template-columns: 220px 1fr;
|
||||
|
||||
Reference in New Issue
Block a user