update: preference page layout
This commit is contained in:
12
src/app/(main)/preference/general/page.tsx
Normal file
12
src/app/(main)/preference/general/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
"use client"
|
||||
import useAppStore from "@/store/app"
|
||||
|
||||
export default function Page () {
|
||||
const { version } = useAppStore()
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-start gap-3">
|
||||
<button>版本号:{version}</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
37
src/app/(main)/preference/layout.tsx
Normal file
37
src/app/(main)/preference/layout.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
"use client"
|
||||
import { Card, CardHeader, CardIcon, CardTool, CardBody } from "@/components/window/Card"
|
||||
import { ToolButton } from "@/components/window/ToolButton"
|
||||
import { SettingConfig, UploadOne, HardDisk } from "@icon-park/react"
|
||||
import { useRouter } from "next/navigation"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
export default function PreferenceLayout({ children }: { children: React.ReactNode }) {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Card className="max-w-full overflow-y-scroll">
|
||||
<CardHeader>
|
||||
<CardIcon onClick={() => router.push("/preference/general")}>
|
||||
<SettingConfig /> 通用
|
||||
</CardIcon>
|
||||
<CardIcon onClick={() => router.push("/preference/path")}>
|
||||
<SettingConfig /> 路径
|
||||
</CardIcon>
|
||||
<CardIcon onClick={() => router.push("/preference/replay")}>
|
||||
<SettingConfig /> 录像
|
||||
</CardIcon>
|
||||
|
||||
<CardTool>
|
||||
<ToolButton>
|
||||
<UploadOne />
|
||||
云同步
|
||||
</ToolButton>
|
||||
<ToolButton>
|
||||
<HardDisk />
|
||||
保存
|
||||
</ToolButton>
|
||||
</CardTool>
|
||||
</CardHeader>
|
||||
<CardBody>{children}</CardBody>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
"use client"
|
||||
import { redirect } from "next/navigation"
|
||||
|
||||
export default function Page() {
|
||||
return <div>Preference</div>;
|
||||
redirect("/preference/general")
|
||||
}
|
||||
|
||||
4
src/app/(main)/preference/path/page.tsx
Normal file
4
src/app/(main)/preference/path/page.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
"use client"
|
||||
export default function Page() {
|
||||
return <>Path</>
|
||||
}
|
||||
4
src/app/(main)/preference/replay/page.tsx
Normal file
4
src/app/(main)/preference/replay/page.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
"use client"
|
||||
export default function Page() {
|
||||
return <>Replay</>
|
||||
}
|
||||
Reference in New Issue
Block a user