From 9d4af9a8176c40b961dae5093426cc4bd6be062c Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Mon, 27 Apr 2026 21:04:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=9E=84=E5=BB=BA=20dashboard=20?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=B8=83=E5=B1=80=E4=B8=8E=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/dashboard/layout.tsx | 40 +++++++++++++++++++ app/dashboard/page.tsx | 14 +++++++ app/page.tsx | 69 ++------------------------------- src/components/theme-toggle.tsx | 21 ++++++++++ 4 files changed, 79 insertions(+), 65 deletions(-) create mode 100644 app/dashboard/layout.tsx create mode 100644 app/dashboard/page.tsx create mode 100644 src/components/theme-toggle.tsx diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx new file mode 100644 index 0000000..82749c5 --- /dev/null +++ b/app/dashboard/layout.tsx @@ -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 ( +
+ + +
{children}
+
+ ); +} \ No newline at end of file diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx new file mode 100644 index 0000000..1fa1f12 --- /dev/null +++ b/app/dashboard/page.tsx @@ -0,0 +1,14 @@ +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; + +export default function DashboardPage() { + return ( + + + 欢迎来到 Omniledger + + +

您的跨界记账中枢。

+
+
+ ); +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 7b947a2..e94329c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,66 +1,5 @@ -import Image from "next/image"; -import styles from "./page.module.css"; +import { redirect } from 'next/navigation'; -export default function Home() { - return ( -
-
- Next.js logo -
-

To get started, edit the page.tsx file.

-

- Looking for a starting point or more instructions? Head over to{" "} - - Templates - {" "} - or the{" "} - - Learning - {" "} - center. -

-
-
- - Vercel logomark - Deploy Now - - - Documentation - -
-
-
- ); -} +export default function HomePage() { + redirect('/dashboard'); +} \ No newline at end of file diff --git a/src/components/theme-toggle.tsx b/src/components/theme-toggle.tsx new file mode 100644 index 0000000..a5d75aa --- /dev/null +++ b/src/components/theme-toggle.tsx @@ -0,0 +1,21 @@ +'use client'; + +import { useTheme } from 'next-themes'; +import { Moon, Sun } from 'lucide-react'; +import { Button } from '@/components/ui/button'; + +export function ThemeToggle() { + const { theme, setTheme } = useTheme(); + + return ( + + ); +} \ No newline at end of file