style(frontend): redesign with Miuix HyperOS design language
- Color system: Miuix dark tokens (primary #277AF7, bg #242424, surface #000) - Components: rounded-full buttons, squircle cards (18px), glass header - Messages: blue user bubbles, dark AI bubbles with typing animation - Admin dashboard: stat cards with real-time service status - Login: centered logo with gradient shadow, HyperOS input fields - Smooth transitions and scale-on-press interactions
This commit is contained in:
1 parent
17ef73bcbe
commit
bea29d3b73
9 files changed
+312
-99
No files matched your search
@@ -1,18 +1,47 @@
|
||||
import { ReactNode } from 'react'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
import { useAuthStore } from '../../store/authStore'
|
||||
import Header from './Header'
|
||||
import Sidebar from './Sidebar'
|
||||
|
||||
export default function AppLayout({ children }: { children: ReactNode }) {
|
||||
const { username, logout } = useAuthStore()
|
||||
const location = useLocation()
|
||||
|
||||
return (
|
||||
<div className="h-screen flex flex-col bg-gray-950 text-gray-100">
|
||||
<Header username={username} onLogout={logout} />
|
||||
<div className="flex-1 flex overflow-hidden">
|
||||
<Sidebar />
|
||||
<main className="flex-1 overflow-auto">{children}</main>
|
||||
</div>
|
||||
<div className="h-screen flex flex-col bg-[#242424] text-[#F2F2F2]">
|
||||
{/* Header */}
|
||||
<header className="h-14 shrink-0 flex items-center justify-between px-4 border-b border-[#393939] bg-[#000]">
|
||||
<Link to="/chat" className="flex items-center gap-2">
|
||||
<div className="w-7 h-7 rounded-lg bg-[#277AF7] flex items-center justify-center">
|
||||
<span className="text-sm font-bold text-white">C</span>
|
||||
</div>
|
||||
<span className="font-semibold text-base">Cyrene</span>
|
||||
</Link>
|
||||
|
||||
<nav className="flex items-center gap-1">
|
||||
<Link to="/chat"
|
||||
className={`px-3 py-1.5 rounded-full text-sm transition-colors ${
|
||||
location.pathname.startsWith('/chat')
|
||||
? 'bg-[#277AF7]/15 text-[#4788FF]'
|
||||
: 'text-white/50 hover:text-white/80'
|
||||
}`}
|
||||
>聊天</Link>
|
||||
<Link to="/admin/dashboard"
|
||||
className={`px-3 py-1.5 rounded-full text-sm transition-colors ${
|
||||
location.pathname.startsWith('/admin')
|
||||
? 'bg-[#277AF7]/15 text-[#4788FF]'
|
||||
: 'text-white/50 hover:text-white/80'
|
||||
}`}
|
||||
>管理</Link>
|
||||
<div className="w-px h-4 bg-[#393939] mx-1" />
|
||||
<span className="text-xs text-white/40">{username}</span>
|
||||
<button onClick={logout}
|
||||
className="px-3 py-1.5 rounded-full text-sm text-white/40 hover:text-[#F12522] transition-colors"
|
||||
>退出</button>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
{/* Content */}
|
||||
<main className="flex-1 overflow-hidden">{children}</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user