[feat] adapt steam store + adjust dark mode styles
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { Home, MonitorOne, Movie, Setting, Terminal, Toolkit } from "@icon-park/react"
|
||||
import { Button, cn } from "@heroui/react"
|
||||
import { usePathname, useRouter } from "next/navigation"
|
||||
import type { ReactNode } from "react"
|
||||
import { useEffect, type ReactNode } from "react"
|
||||
|
||||
// import { platform } from "@tauri-apps/plugin-os"
|
||||
import { appStore, setVersion } from "@/store/app"
|
||||
@@ -63,7 +63,11 @@ const Avatar = () => {
|
||||
}
|
||||
|
||||
const SideBar = () => {
|
||||
appStore.start()
|
||||
useEffect(() => {
|
||||
;async () => {
|
||||
appStore.start()
|
||||
}
|
||||
}, [])
|
||||
const { version } = useSnapshot(appStore.state)
|
||||
|
||||
return (
|
||||
@@ -104,7 +108,12 @@ const SideBar = () => {
|
||||
|
||||
<div className="mx-auto text-sm text-center text-zinc-500" data-tauri-drag-region>
|
||||
<p>版本号</p>
|
||||
<Button variant="light" size="sm" className="mt-0.5 text-zinc-600" onPress={() => setVersion("x.y.z")}>
|
||||
<Button
|
||||
variant="light"
|
||||
size="sm"
|
||||
className="mt-0.5 text-zinc-600"
|
||||
onPress={() => setVersion("x.y.z")}
|
||||
>
|
||||
{version}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user