[feat] adapt steam store + adjust dark mode styles
This commit is contained in:
@@ -9,7 +9,7 @@ const RoundedButton = ({ children }: RoundedButtonProps) => {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center justify-center px-3 py-1 transition rounded-full min-w-fit active:scale-95 hover:bg-black/10 text-zinc-700 bg-black/5"
|
||||
className="flex items-center justify-center px-3 py-1 transition rounded-full min-w-fit active:scale-95 hover:bg-black/10 text-zinc-700 dark:text-zinc-100 bg-black/5"
|
||||
>
|
||||
{children}
|
||||
</button>
|
||||
|
||||
@@ -3,8 +3,14 @@ import { appStore } from "@/store/app"
|
||||
import { Refresh, VolumeNotice } from "@icon-park/react"
|
||||
import { ToolButton } from "../window/ToolButton"
|
||||
import { useSnapshot } from "valtio"
|
||||
import { useEffect } from "react"
|
||||
|
||||
const Notice = () => {
|
||||
useEffect(() => {
|
||||
;async () => {
|
||||
appStore.start()
|
||||
}
|
||||
}, [])
|
||||
appStore.start()
|
||||
const app = useSnapshot(appStore.state)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ const CardTool = ({ children }: CardProps) => {
|
||||
|
||||
const CardBody = ({ children }: CardProps) => {
|
||||
return (
|
||||
<div className="w-full h-full text-sm tracking-wide text-zinc-800">
|
||||
<div className="w-full h-full text-sm tracking-wide text-zinc-800 dark:text-white">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -50,7 +50,8 @@ const Nav = () => {
|
||||
resetToolStore()
|
||||
addToast({
|
||||
title: "重置成功",
|
||||
description: "已重置所有设置,请重新启动程序",
|
||||
color: 'success'
|
||||
// description: "已重置所有设置",
|
||||
})
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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