From 88e55fa8effaa888eb30af0c68172a89b7ba2b69 Mon Sep 17 00:00:00 2001 From: Purp1e <47248616+Purple-CSGO@users.noreply.github.com> Date: Sun, 23 Mar 2025 22:53:09 +0800 Subject: [PATCH] [feat] common dir: local cfg --- src-tauri/tauri.conf.json | 2 +- src/components/cstb/CommonDir.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 1e30f4e..2e7d58a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -42,7 +42,7 @@ }, "productName": "CS工具箱", "mainBinaryName": "cstb", - "version": "0.0.3", + "version": "0.0.4", "identifier": "upup.cool", "plugins": { "deep-link": { diff --git a/src/components/cstb/CommonDir.tsx b/src/components/cstb/CommonDir.tsx index 3afe97d..f523c7b 100644 --- a/src/components/cstb/CommonDir.tsx +++ b/src/components/cstb/CommonDir.tsx @@ -78,9 +78,13 @@ const CommonDir = () => { { + const user = steam.currentUser() + if (!user) { + addToast({ title: "请先选择用户", color: "danger" }) + return + } await invoke("open_path", { - // TODO 导航到 steamid32/730/local/cfg - path: path.resolve(steam.state.steamDir, "userdata"), + path: path.resolve(steam.state.steamDir, "userdata", user.steam_id32.toString(), "730", "local", "cfg"), }) addToast({ title: "个人CFG" }) }}