feat: 一键部署脚本 + Dashboard按钮移至标题下方 + 修复演示模式退出

This commit is contained in:
selfrelease
2026-08-01 23:35:49 +08:00
parent df89bcab7f
commit cdf100206a
3 changed files with 156 additions and 3 deletions
+6
View File
@@ -19,6 +19,12 @@ export function TopBar({ pageTitle, onMenuToggle }: TopBarProps) {
const handleLogout = () => {
if (isAuthenticated) {
logout()
} else {
// 演示模式:清除 auth_role 退出到登录页
localStorage.removeItem('auth_role')
localStorage.removeItem('auth_name')
localStorage.removeItem('auth_station')
window.location.reload()
}
}
+5 -3
View File
@@ -139,13 +139,15 @@ export function Dashboard({ records, onNavigate, onCreate, onSelect }: Dashboard
<span>{role === 'reporter' ? '这是你的个人工作概况。' : role === 'station' ? '这是本站今日运行概况。' : '这里是全国记者站今日运行概况。'}</span>
</div>
</div>
{role !== 'headquarters' && (
</div>
{role !== 'headquarters' && (
<div style={{ marginBottom: 16 }}>
<button className="primary-button" onClick={onCreate}>
<Plus size={18} />
</button>
)}
</div>
</div>
)}
<div className="metric-grid">
<div onClick={() => setDrillDown('pending')} style={{ cursor: 'pointer' }}>