polish admin reset and branding

This commit is contained in:
2026-05-03 15:23:17 +08:00
parent 0d0a881555
commit 83a9bdcbf4
3 changed files with 16 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -9,7 +9,6 @@ import {
Check,
Download,
Layers,
ActivitySquare,
MonitorPlay,
Save,
LayoutDashboard,
@@ -562,7 +561,7 @@ export default function App() {
setIsResettingDemo(true);
try {
const data = await apiRequest('/api/demo/reset', { method: 'POST' }) as { items?: LibraryItem[] };
const items = data.items || [];
const items = data.items?.length ? data.items : await loadLibrary();
setLibraryData(items);
setSelectedLibraryId(items[0]?.id || '');
setLibraryInfo(null);
@@ -976,8 +975,8 @@ export default function App() {
<div className="w-screen h-screen bg-[#f1f5f9] flex items-center justify-center">
<div className="w-[450px] bg-white p-10 rounded-2xl shadow-xl border border-slate-200">
<div className="flex flex-col items-center mb-8">
<div className="w-16 h-16 bg-blue-600 rounded-xl flex items-center justify-center mb-4">
<ActivitySquare className="text-white w-9 h-9" />
<div className="w-20 h-20 rounded-2xl flex items-center justify-center mb-4 overflow-hidden">
<img src="/logo_square.png" alt="头颈CT变形平台" className="w-full h-full object-contain" />
</div>
<h1 className="text-xl font-bold text-slate-800 text-center">CT影像智慧变形平台</h1>
<p className="text-slate-400 text-sm mt-2">CT变形平台</p>
@@ -1032,7 +1031,7 @@ export default function App() {
{/* Sidebar */}
<aside className={`${isSidebarCollapsed ? 'w-20' : 'w-72'} bg-white border-r p-6 flex flex-col shrink-0 transition-all duration-300 ease-in-out`}>
<div className={`flex items-center ${isSidebarCollapsed ? 'justify-center' : 'gap-3'} mb-10 transition-all`}>
<ActivitySquare className="text-blue-600 shrink-0" size={28} />
<img src="/logo_square.png" alt="头颈CT变形平台" className="w-9 h-9 object-contain shrink-0" />
{!isSidebarCollapsed && <h2 className="text-base font-bold tracking-tight whitespace-nowrap overflow-hidden">CT变形平台</h2>}
</div>
@@ -1053,8 +1052,17 @@ export default function App() {
</div>
)}
</div>
<button onClick={handleLogout} className={`w-full flex items-center gap-3 px-4 py-3 text-slate-400 hover:text-red-500 text-sm transition-all ${isSidebarCollapsed ? 'justify-center px-0' : ''}`}>
<LogOut size={18} />
<button
onClick={handleLogout}
title="退出登录"
aria-label="退出登录"
className={`w-full flex items-center gap-3 text-sm transition-all ${
isSidebarCollapsed
? 'justify-center w-10 h-10 mx-auto rounded-2xl bg-slate-50 text-slate-500 hover:bg-red-50 hover:text-red-500'
: 'px-4 py-3 text-slate-400 hover:text-red-500'
}`}
>
<LogOut size={isSidebarCollapsed ? 20 : 18} className="shrink-0" />
{!isSidebarCollapsed && <span>退</span>}
</button>
</div>
@@ -1079,12 +1087,6 @@ export default function App() {
{currentPage === 'users' && '系统管理工作区'}
</h3>
</div>
<div className="flex items-center gap-6">
<div className="flex items-center gap-2 text-[10px] font-extrabold text-slate-400 uppercase tracking-tighter">
<div className="w-2 h-2 rounded-full bg-green-500 animate-pulse"></div>
::
</div>
</div>
</header>
<div className="flex-1 p-8 overflow-y-auto">

View File

@@ -441,7 +441,7 @@ def reset_demo_environment():
return {
"ok": True,
"message": "演示环境已恢复出厂设置。",
"items": list_library(),
"items": [record],
}