diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 45a2cc1..dedc186 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -42,7 +42,7 @@ }, "productName": "CS工具箱", "mainBinaryName": "cstb", - "version": "0.0.5-beta.4", + "version": "0.0.5-beta.5", "identifier": "upup.cool", "plugins": { "deep-link": { diff --git a/src/components/cstb/VideoSetting.tsx b/src/components/cstb/VideoSetting.tsx index f6e29b0..0739a90 100644 --- a/src/components/cstb/VideoSetting.tsx +++ b/src/components/cstb/VideoSetting.tsx @@ -325,7 +325,10 @@ const VideoSetting = () => { { if (steam.state.steamDirValid && steam.currentUser()) { - void tool.getVideoConfig(steam.state.steamDir, steam.currentUser()?.steam_id32 || 0) + await tool.getVideoConfig( + steam.state.steamDir, + steam.currentUser()?.steam_id32 || 0 + ) addToast({ title: "读取成功" }) } else addToast({ title: "请先选择用户", color: "danger" }) }} @@ -366,7 +369,7 @@ const VideoSetting = () => { 10 )} onValueChange={(value) => { - edit + const _ = edit ? setVconfig({ ...vconfig, defaultres: value.toString(), @@ -407,14 +410,15 @@ const VideoSetting = () => { fullWidth selectedKey={vid.value} onSelectionChange={(key) => { - console.log(vid.type, key) + // console.log(vid.type, key) // 修改 vconfig 名为 vid.type 的 value为 key - edit && key - ? setVconfig({ - ...vconfig, - [vid.type]: vid.mapping?.(key.toString()), - }) - : null + const _ = + edit && key + ? setVconfig({ + ...vconfig, + [vid.type]: vid.mapping(key.toString()), + }) + : null }} > {vid.options.map((opt, _) => (