feat(v0.3): M3 themes/font settings + M7 session dashboard

- M3: settings.ts (⚙ panel: dark/light/solarized theme + font size A-/A+),
  persisted to localStorage; terminal-session.applyTheme; TabApp.applySettings
  applies to all + new tabs
- M7: dashboard.ts (▦ overlay listing every tab with connection dot + folder +
  Claude status; click a row to focus; live re-render while open);
  TabApp.snapshot()/focusTab()
- Browser-verified: light theme renders + persists; dashboard lists tabs and
  focuses on click. 208 tests green, typechecks + build ok.
This commit is contained in:
Yaojia Wang
2026-06-18 05:40:35 +02:00
parent dcb1bf4845
commit f79f14b89d
6 changed files with 384 additions and 0 deletions

View File

@@ -153,6 +153,106 @@ html, body {
font: inherit;
}
/* Settings panel (M3) */
#settingspanel {
position: fixed;
top: calc(var(--tabbar-h) + 6px);
right: 8px;
z-index: 1100;
background: #2a2a2a;
border: 1px solid #3a3a3a;
border-radius: 6px;
padding: 10px;
min-width: 210px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
color: #ddd;
}
.settings-row {
display: flex;
align-items: center;
gap: 6px;
margin: 6px 0;
}
.settings-label {
width: 48px;
color: #aaa;
font-size: 13px;
}
.settings-opt {
background: #333;
border: 1px solid #444;
color: #ddd;
border-radius: 4px;
padding: 4px 9px;
cursor: pointer;
font: inherit;
font-size: 12px;
}
.settings-opt.active {
background: #4a9eff;
color: #fff;
border-color: #4a9eff;
}
.settings-size {
min-width: 22px;
text-align: center;
}
/* Dashboard (M7) */
#dashboard {
position: fixed;
inset: 0;
z-index: 1200;
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 56px;
background: rgba(0, 0, 0, 0.6);
}
.dash-card {
background: #222;
border: 1px solid #3a3a3a;
border-radius: 10px;
min-width: 320px;
max-width: 90vw;
max-height: 70vh;
overflow-y: auto;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.dash-title {
padding: 12px 16px;
font-weight: 600;
color: #fff;
border-bottom: 1px solid #3a3a3a;
}
.dash-row {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 16px;
cursor: pointer;
color: #ddd;
border-bottom: 1px solid #2a2a2a;
}
.dash-row:hover {
background: #2a2a2a;
}
.dash-row.active {
background: #1a1a1a;
box-shadow: inset 3px 0 0 #4a9eff;
}
.dash-name {
flex: 1;
}
.dash-claude {
color: #aaa;
font-size: 13px;
}
.dash-claude.pending {
color: #ffcf8f;
font-weight: 600;
}
.tab {
display: flex;
align-items: center;