From 08a6bfe9decf64f02584b201b2963b97085b74d1 Mon Sep 17 00:00:00 2001 From: Purp1e <47248616+Purple-CSGO@users.noreply.github.com> Date: Sat, 22 Mar 2025 17:50:35 +0800 Subject: [PATCH] [feat] home page notification and styles --- src-tauri/src/cmds.rs | 4 +--- src/components/cstb/CommonDir.tsx | 26 ++++++++++++++++------- src/components/cstb/FastLaunch.tsx | 6 +++--- src/components/cstb/ForceQuit.tsx | 6 +++--- src/components/cstb/PowerPlan.tsx | 34 ++++++++++++++++++++++++++++-- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/src-tauri/src/cmds.rs b/src-tauri/src/cmds.rs index 343dc59..7679d2e 100644 --- a/src-tauri/src/cmds.rs +++ b/src-tauri/src/cmds.rs @@ -63,9 +63,7 @@ pub fn set_powerplan(plan: &str) -> Result { Ok(format!("Set powerplan to {}", plan)) } -// TODO get_cs_path -// TODO get_powerplan -// TODO set_powerplan + // TODO watch_steam_users // TODO watch_video_settings // TODO watch + cancel diff --git a/src/components/cstb/CommonDir.tsx b/src/components/cstb/CommonDir.tsx index 7b868d0..a31167a 100644 --- a/src/components/cstb/CommonDir.tsx +++ b/src/components/cstb/CommonDir.tsx @@ -42,10 +42,10 @@ const CommonDir = () => { await invoke("open_path", { path: steam.state.steamDir, }) - addToast({ title: "Steam安装位置" }) + addToast({ title: "Steam安装目录" }) }} > - Steam安装位置 + Steam安装目录 { @@ -62,20 +62,20 @@ const CommonDir = () => { await invoke("open_path", { path: path.resolve(steam.cs2BaseDir(), "game", "csgo", "maps"), }) - addToast({ title: "地图文件" }) + addToast({ title: "地图目录" }) }} > - 地图文件 + 地图目录 { await invoke("open_path", { path: path.resolve(steam.cs2BaseDir(), "game", "csgo", "cfg"), }) - addToast({ title: "游戏CFG目录" }) + addToast({ title: "游戏CFG" }) }} > - 游戏CFG目录 + 游戏CFG { @@ -83,10 +83,20 @@ const CommonDir = () => { // TODO 导航到 steamid32/730/local/cfg path: path.resolve(steam.state.steamDir, "userdata"), }) - addToast({ title: "个人CFG目录" }) + addToast({ title: "个人CFG" }) }} > - 个人CFG目录 + 个人CFG + + { + await invoke("open_path", { + path: path.resolve(steam.cs2BaseDir(), "game", "csgo", "replays"), + }) + addToast({ title: "官匹录像" }) + }} + > + 官匹录像 { diff --git a/src/components/cstb/FastLaunch.tsx b/src/components/cstb/FastLaunch.tsx index 3037fb9..ac3f85b 100644 --- a/src/components/cstb/FastLaunch.tsx +++ b/src/components/cstb/FastLaunch.tsx @@ -10,7 +10,7 @@ const FastLaunch = () => { const tool = useToolStore() return ( - + 快捷启动 @@ -19,7 +19,7 @@ const FastLaunch = () => {
-
+ */} + + {PowerPlans.map((item) => ( + + ))} +
)