diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 6fd82595..ac9115e5 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -4,7 +4,7 @@ "beforeBuildCommand": "npm run build", "devPath": "http://localhost:1420", "distDir": "../dist", - "withGlobalTauri": false + "withGlobalTauri": true }, "package": { "productName": "tauri-genshin", @@ -13,6 +13,10 @@ "tauri": { "allowlist": { "all": true, + "fs": { + "all": true, + "scope": ["**", "**/*"] + }, "http": { "all": true, "request": true, @@ -26,7 +30,7 @@ "bundle": { "active": true, "icon": ["icons/icon.png", "icons/icon.ico"], - "identifier": "com.tauri.dev", + "identifier": "tauri-genshin", "targets": "all" }, "security": { diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index 41abd76b..960e32d6 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -1,6 +1,6 @@ import { defineStore } from "pinia"; -export const useAppStore = defineStore({ +const useAppStore = defineStore({ id: "app", state: () => { return { @@ -8,7 +8,15 @@ export const useAppStore = defineStore({ sidebar: { expand: true, }, + dataPath: "", }; }, + actions: { + setDataPath(path: string) { + this.dataPath = path; + }, + }, persist: true, }); + +export default useAppStore;