Skip to content

Commit 98b5cdb

Browse files
authored
style(dashboard): 将页签导航移至头部栏,优化为胶囊样式; (#226)
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist)
1 parent 70f200e commit 98b5cdb

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

‎src/coding/proxy/server/dashboard.py‎

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -515,28 +515,28 @@ def _build_favicon() -> bytes:
515515
/* ── Tabs ─────────────────────────────────────────────────── */
516516
.tabs {
517517
display: flex;
518-
gap: 4px;
519-
margin-bottom: 16px;
520-
border-bottom: 1px solid var(--border);
521-
padding: 0 2px;
518+
gap: 2px;
519+
padding: 0;
522520
}
523521
.tab-btn {
524522
appearance: none;
525523
background: transparent;
526-
border: none;
527-
border-bottom: 2px solid transparent;
524+
border: 1px solid transparent;
528525
color: var(--text-secondary);
529526
cursor: pointer;
530527
font-family: inherit;
531-
font-size: 14px;
528+
font-size: 13px;
532529
font-weight: 500;
533-
padding: 10px 16px;
534-
margin-bottom: -1px;
535-
transition: color .15s ease, border-color .15s ease, background .15s ease;
536-
border-radius: 6px 6px 0 0;
530+
padding: 4px 12px;
531+
transition: color .15s ease, background .15s ease, border-color .15s ease;
532+
border-radius: var(--radius-sm);
537533
}
538534
.tab-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
539-
.tab-btn.active { color: var(--text-primary); border-bottom-color: var(--accent-blue); }
535+
.tab-btn.active {
536+
color: var(--text-primary);
537+
background: rgba(88,166,255,.1);
538+
border-color: rgba(88,166,255,.2);
539+
}
540540
.tab-btn:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
541541
.tab-pane { display: none; }
542542
.tab-pane.active { display: block; }
@@ -550,18 +550,16 @@ def _build_favicon() -> bytes:
550550
<span class="badge" id="version-badge">v-.-.-</span>
551551
</div>
552552
<div class="header-right">
553+
<nav class="tabs" role="tablist" aria-label="Dashboard sections">
554+
<button type="button" class="tab-btn active" id="tab-btn-overview" role="tab" aria-controls="tab-pane-overview" aria-selected="true" data-tab="overview" onclick="switchTab('overview')">Overview</button>
555+
<button type="button" class="tab-btn" id="tab-btn-sessions" role="tab" aria-controls="tab-pane-sessions" aria-selected="false" data-tab="sessions" onclick="switchTab('sessions')">Sessions</button>
556+
</nav>
553557
<span class="refresh-time" id="refresh-time">正在加载…</span>
554558
<button class="btn-refresh" onclick="refresh()">⟳ 刷新</button>
555559
</div>
556560
</header>
557561
558562
<main>
559-
<!-- 页签导航 -->
560-
<nav class="tabs" role="tablist" aria-label="Dashboard sections">
561-
<button type="button" class="tab-btn active" id="tab-btn-overview" role="tab" aria-controls="tab-pane-overview" aria-selected="true" data-tab="overview" onclick="switchTab('overview')">Overview</button>
562-
<button type="button" class="tab-btn" id="tab-btn-sessions" role="tab" aria-controls="tab-pane-sessions" aria-selected="false" data-tab="sessions" onclick="switchTab('sessions')">Sessions</button>
563-
</nav>
564-
565563
<!-- Overview 页签 -->
566564
<section class="tab-pane active" id="tab-pane-overview" role="tabpanel" aria-labelledby="tab-btn-overview" data-tab="overview">
567565
<!-- 时间区间选择器 -->

0 commit comments

Comments
 (0)