feat(ui): 构建 dashboard 基础布局与路由重定向
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { LayoutGrid, Wallet, ArrowLeftRight } from 'lucide-react';
|
||||
import { ThemeToggle } from '@/components/theme-toggle';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
export default function DashboardLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<div className="min-h-screen flex">
|
||||
<aside className="w-64 border-r border-border bg-card p-4 flex flex-col">
|
||||
<div className="flex items-center gap-2 mb-8">
|
||||
<span className="text-xl font-bold">Omniledger</span>
|
||||
</div>
|
||||
|
||||
<nav className="flex flex-col gap-2 flex-1">
|
||||
<Button variant="ghost" className="justify-start gap-2">
|
||||
<LayoutGrid className="h-4 w-4" />
|
||||
总览 (Overview)
|
||||
</Button>
|
||||
<Button variant="ghost" className="justify-start gap-2">
|
||||
<Wallet className="h-4 w-4" />
|
||||
资产 (Assets)
|
||||
</Button>
|
||||
<Button variant="ghost" className="justify-start gap-2">
|
||||
<ArrowLeftRight className="h-4 w-4" />
|
||||
流水 (Transactions)
|
||||
</Button>
|
||||
</nav>
|
||||
|
||||
<div className="mt-auto flex justify-end">
|
||||
<ThemeToggle />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main className="flex-1 p-6">{children}</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<Card className="max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle>欢迎来到 Omniledger</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-muted-foreground">您的跨界记账中枢。</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user