feat(M5): FR-A3/A4 主题CSS变量全接线——25 文件 168 处硬编码色替换为 var(--accent/--glow/--accent-text/--text-primary/--text-secondary/--text-tertiary/--control-border/--bg-secondary); 语义色(错误红/确认/警告/成功)保留; hljs 语法色保留; typecheck+E2E 21/21 绿

This commit is contained in:
hunter-dev
2026-08-26 14:07:48 +08:00
parent bd60a8d920
commit 9a89a73518
25 changed files with 118 additions and 118 deletions
@@ -14,22 +14,22 @@ export function TabBar() {
if (tabs.length === 0) return null;
return (
<div data-testid="tabbar" style={{ display: 'flex', borderBottom: '1px solid #2a2a3a', background: '#161620', overflowX: 'auto' }}>
<div data-testid="tabbar" style={{ display: 'flex', borderBottom: '1px solid var(--control-border)', background: 'var(--bg-secondary)', overflowX: 'auto' }}>
{tabs.map(t => (
<div key={t.id} onClick={() => setActive(t.id)}
style={{ display: 'flex', alignItems: 'center', gap: 6, padding: '4px 10px', cursor: 'pointer',
borderBottom: activeId === t.id ? '2px solid #4a9eff' : '2px solid transparent',
background: activeId === t.id ? '#1a1a28' : 'transparent', fontSize: 12, color: activeId === t.id ? '#ddd' : '#888', whiteSpace: 'nowrap' }}>
{t.pinned && <span style={{ color: '#ffd54a' }}>★</span>}
borderBottom: activeId === t.id ? '2px solid var(--accent)' : '2px solid transparent',
background: activeId === t.id ? 'var(--bg-secondary)' : 'transparent', fontSize: 12, color: activeId === t.id ? 'var(--text-primary)' : 'var(--text-tertiary)', whiteSpace: 'nowrap' }}>
{t.pinned && <span style={{ color: 'var(--accent)' }}>★</span>}
<span>{t.path.split('/').pop()?.replace(/\.md$/, '')}</span>
{t.pinned ? (
<span style={{ color: '#888', fontSize: 10 }}>📌</span>
<span style={{ color: 'var(--text-tertiary)', fontSize: 10 }}>📌</span>
) : (
<span onClick={e => { e.stopPropagation(); closeTab(t.id); }} style={{ color: '#888', cursor: 'pointer', fontSize: 12 }} onMouseEnter={e => (e.currentTarget.style.color = '#f88')} onMouseLeave={e => (e.currentTarget.style.color = '#888')}>×</span>
<span onClick={e => { e.stopPropagation(); closeTab(t.id); }} style={{ color: 'var(--text-tertiary)', cursor: 'pointer', fontSize: 12 }} onMouseEnter={e => (e.currentTarget.style.color = '#f88')} onMouseLeave={e => (e.currentTarget.style.color = 'var(--text-tertiary)')}>×</span>
)}
<span onClick={e => { e.stopPropagation(); togglePin(t.id); }} style={{ color: t.pinned ? '#ffd54a' : '#666', cursor: 'pointer', fontSize: 10 }} title={t.pinned ? '取消固定' : '固定'}>●</span>
<span onClick={e => { e.stopPropagation(); togglePin(t.id); }} style={{ color: t.pinned ? 'var(--accent)' : 'var(--text-tertiary)', cursor: 'pointer', fontSize: 10 }} title={t.pinned ? '取消固定' : '固定'}>●</span>
</div>
))}
</div>
);
}
}