[feat] use heroui + setup persistore + setup toast
todo: fix launchoption problem
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import Header from "@/components/window/Header"
|
||||
import Nav from "@/components/window/Nav"
|
||||
import SideBar from "@/components/window/SideBar"
|
||||
import clsx from "clsx"
|
||||
import { cn } from "@heroui/react"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
export default function BaseLayout({
|
||||
@@ -11,7 +11,7 @@ export default function BaseLayout({
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div className="w-full h-full bg-transparent">
|
||||
<div className="w-full h-full p-0 m-0 bg-transparent">
|
||||
{/* bg-[#f1f0f2] */}
|
||||
<Nav />
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function BaseLayout({
|
||||
<SideBar />
|
||||
|
||||
<main
|
||||
className={clsx(
|
||||
className={cn(
|
||||
"flex flex-col h-full pb-5 pr-5 ml-20 overflow-hidden",
|
||||
// platform() === "windows" ? "ml-20" : "ml-[4.25rem]"
|
||||
)}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
"use client"
|
||||
import useAppStore from "@/store/app"
|
||||
import { appStore } from "@/store/app"
|
||||
import { useSnapshot } from "valtio"
|
||||
|
||||
export default function Page() {
|
||||
const app = useAppStore()
|
||||
const app = useSnapshot(appStore.state)
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-start gap-3 pt-2 pb-1">
|
||||
<div className="flex flex-col gap-3 items-start pt-2 pb-1">
|
||||
<p>版本号:{app.version}</p>
|
||||
<p>是否有更新:{app.hasUpdate ? "有" : "无"}</p>
|
||||
<p>初始化:{app.inited ? "是" : "否"}</p>
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
UploadOne,
|
||||
Videocamera,
|
||||
} from "@icon-park/react"
|
||||
import clsx from "clsx"
|
||||
import { cn } from "@heroui/react"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
|
||||
@@ -30,21 +30,21 @@ export default function PreferenceLayout({
|
||||
<CardIcon
|
||||
type="menu"
|
||||
onClick={() => router.push("/preference/general")}
|
||||
className={clsx(pathname === "/preference/general" && "bg-black/5")}
|
||||
className={cn(pathname === "/preference/general" && "bg-black/5")}
|
||||
>
|
||||
<SettingConfig /> 通用
|
||||
</CardIcon>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
onClick={() => router.push("/preference/path")}
|
||||
className={clsx(pathname === "/preference/path" && "bg-black/5")}
|
||||
className={cn(pathname === "/preference/path" && "bg-black/5")}
|
||||
>
|
||||
<AssemblyLine /> 路径
|
||||
</CardIcon>
|
||||
<CardIcon
|
||||
type="menu"
|
||||
onClick={() => router.push("/preference/replay")}
|
||||
className={clsx(pathname === "/preference/replay" && "bg-black/5")}
|
||||
className={cn(pathname === "/preference/replay" && "bg-black/5")}
|
||||
>
|
||||
<Videocamera /> 录像
|
||||
</CardIcon>
|
||||
|
||||
Reference in New Issue
Block a user