diff --git a/core/tauri.conf.json b/core/tauri.conf.json index b8aaed9..8289666 100644 --- a/core/tauri.conf.json +++ b/core/tauri.conf.json @@ -11,7 +11,10 @@ }, "tauri": { "allowlist": { - "all": true + "all": true, + "fs": { + "scope": ["$CONFIG/Levminer/*"] + } }, "bundle": { "active": true, diff --git a/interface/components/navigation.svelte b/interface/components/navigation.svelte index d2717df..3862bb2 100644 --- a/interface/components/navigation.svelte +++ b/interface/components/navigation.svelte @@ -1,4 +1,4 @@ -
+
diff --git a/interface/layout/app.svelte b/interface/layout/app.svelte index d7b8253..f96a69d 100644 --- a/interface/layout/app.svelte +++ b/interface/layout/app.svelte @@ -3,7 +3,9 @@
- + {#if $state.authenticated} + + {/if}
@@ -22,10 +24,14 @@ diff --git a/interface/layout/app.ts b/interface/layout/app.ts index f1c3f8c..641012e 100644 --- a/interface/layout/app.ts +++ b/interface/layout/app.ts @@ -1,5 +1,23 @@ import App from "./app.svelte" import "../styles/index.css" +import { fs, path, window } from "@tauri-apps/api" + +const getSettingsPath = async () => { + const folderPath = await path.join(await path.configDir(), "Levminer", "Authme 4") + fs.createDir(folderPath, { recursive: true }) + + const settingsPath = await path.join(folderPath, "settings") + fs.createDir(settingsPath, { recursive: true }) + + const codesPath = await path.join(folderPath, "codes") + fs.createDir(codesPath, { recursive: true }) +} + +getSettingsPath() + +const mainWindow = new window.WindowManager("Authme") + +console.log(mainWindow) const app = new App({ target: document.body,