feat: 新增主页(Home)和通用导航(Navigation)组件。

This commit is contained in:
2026-01-30 16:59:52 +08:00
parent 43c33658e0
commit 51391a1195
2 changed files with 3 additions and 2 deletions

View File

@@ -75,12 +75,14 @@ const navItems: NavItem[] = [
label: '汇率', label: '汇率',
ariaLabel: '汇率管理 - 管理货币汇率', ariaLabel: '汇率管理 - 管理货币汇率',
}, },
/*
{ {
path: '/ledgers/manage', path: '/ledgers/manage',
icon: 'solar:notebook-bold-duotone', icon: 'solar:notebook-bold-duotone',
label: '账本', label: '账本',
ariaLabel: '账本管理 - 切换和管理账本', ariaLabel: '账本管理 - 切换和管理账本',
}, },
*/
{ {
path: '/settings', path: '/settings',
icon: 'solar:settings-bold-duotone', icon: 'solar:settings-bold-duotone',

View File

@@ -279,10 +279,9 @@ function Home() {
<header className="home-header"> <header className="home-header">
<div className="home-greeting"> <div className="home-greeting">
<div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem', marginBottom: '0.25rem' }}> <div style={{ display: 'flex', alignItems: 'center', gap: '0.75rem', marginBottom: '0.25rem' }}>
<div className="greeting-pill" onClick={() => setLedgerSelectorOpen(true)} style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', background: 'rgba(255,255,255,0.4)', padding: '4px 10px', borderRadius: '20px', fontSize: '0.8rem', cursor: 'pointer', border: '1px solid rgba(255,255,255,0.5)' }}> <div className="greeting-pill" style={{ display: 'inline-flex', alignItems: 'center', gap: '6px', background: 'rgba(255,255,255,0.4)', padding: '4px 10px', borderRadius: '20px', fontSize: '0.8rem', border: '1px solid rgba(255,255,255,0.5)' }}>
<Icon icon="solar:notebook-minimalistic-bold-duotone" width="14" /> <Icon icon="solar:notebook-minimalistic-bold-duotone" width="14" />
<span style={{ fontWeight: 600 }}>{currentLedger?.name || '默认账本'}</span> <span style={{ fontWeight: 600 }}>{currentLedger?.name || '默认账本'}</span>
<Icon icon="solar:alt-arrow-down-bold" width="10" />
</div> </div>
<span className="home-date">{new Date().toLocaleDateString('zh-CN', { weekday: 'short', month: 'long', day: 'numeric' })}</span> <span className="home-date">{new Date().toLocaleDateString('zh-CN', { weekday: 'short', month: 'long', day: 'numeric' })}</span>
</div> </div>