[feat] solve common dir
todo: local cfg dir after resolving steam users
This commit is contained in:
@@ -50,7 +50,7 @@ const CommonDir = () => {
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
await invoke("open_path", {
|
||||
path: path.join(steam.state.cs2Dir, "game", "csgo", "cfg"),
|
||||
path: steam.cs2BaseDir(),
|
||||
})
|
||||
addToast({ title: "CS2游戏目录" })
|
||||
}}
|
||||
@@ -60,7 +60,7 @@ const CommonDir = () => {
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
await invoke("open_path", {
|
||||
path: path.join(steam.state.cs2Dir, "game", "csgo", "maps"),
|
||||
path: path.resolve(steam.cs2BaseDir(), "game", "csgo", "maps"),
|
||||
})
|
||||
addToast({ title: "地图文件" })
|
||||
}}
|
||||
@@ -70,7 +70,7 @@ const CommonDir = () => {
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
await invoke("open_path", {
|
||||
path: path.join(steam.state.cs2Dir, "game", "csgo", "cfg"),
|
||||
path: path.resolve(steam.cs2BaseDir(), "game", "csgo", "cfg"),
|
||||
})
|
||||
addToast({ title: "游戏CFG目录" })
|
||||
}}
|
||||
@@ -80,7 +80,8 @@ const CommonDir = () => {
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
await invoke("open_path", {
|
||||
path: path.join(steam.state.steamDir, "userdata"),
|
||||
// TODO 导航到 steamid32/730/local/cfg
|
||||
path: path.resolve(steam.state.steamDir, "userdata"),
|
||||
})
|
||||
addToast({ title: "个人CFG目录" })
|
||||
}}
|
||||
@@ -89,8 +90,7 @@ const CommonDir = () => {
|
||||
</RoundedButton>
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
const appDataDirPath = await configDir()
|
||||
await invoke("open_path", { path: `${appDataDirPath}/Wmpvp/demo` })
|
||||
await invoke("open_path", { path: `%appdata%/Wmpvp/demo` })
|
||||
addToast({ title: "完美平台录像" })
|
||||
}}
|
||||
>
|
||||
@@ -98,8 +98,7 @@ const CommonDir = () => {
|
||||
</RoundedButton>
|
||||
<RoundedButton
|
||||
onClick={async () => {
|
||||
const appDataDirPath = await configDir()
|
||||
await invoke("open_path", { path: `${appDataDirPath}/5E对战平台/demo` })
|
||||
await invoke("open_path", { path: `%appdata%/5E对战平台/demo` })
|
||||
addToast({ title: "5E平台录像" })
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -66,7 +66,7 @@ const Avatar = () => {
|
||||
const SideBar = () => {
|
||||
const app = useAppStore()
|
||||
|
||||
getVersion().then((Value) => {
|
||||
void getVersion().then((Value) => {
|
||||
app.setVersion(Value)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user