[feat] fully reset button

This commit is contained in:
Purp1e
2025-03-20 01:57:51 +08:00
parent c28cd23b5c
commit 60782669ea

View File

@@ -9,10 +9,12 @@ import { /* relaunch, */ exit } from "@tauri-apps/plugin-process"
import { useTheme } from "next-themes" import { useTheme } from "next-themes"
import { usePathname, useRouter } from "next/navigation" import { usePathname, useRouter } from "next/navigation"
import { saveAllNow } from "@tauri-store/valtio" import { saveAllNow } from "@tauri-store/valtio"
import { useSteamStore } from "@/store/steam"
const Nav = () => { const Nav = () => {
const app = useAppStore() const app = useAppStore()
const tool = useToolStore() const tool = useToolStore()
const steam = useSteamStore()
const { theme, setTheme } = useTheme() const { theme, setTheme } = useTheme()
const setAppTheme = async (theme: Theme) => { const setAppTheme = async (theme: Theme) => {
setTheme(theme) setTheme(theme)
@@ -50,11 +52,13 @@ const Nav = () => {
onClick={() => { onClick={() => {
app.resetAppStore() app.resetAppStore()
tool.resetToolStore() tool.resetToolStore()
steam.resetSteamStore()
addToast({ addToast({
title: "重置成功", title: "重置成功",
color: "success", color: "success",
// description: "已重置所有设置", // description: "已重置所有设置",
}) })
router.push("/")
}} }}
> >
<Refresh size={16} /> <Refresh size={16} />