diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 47f4bc8..cf4c1d2 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,6 +11,7 @@ "@microsoft/fetch-event-source": "^2.0.1", "filesize": "^10.1.0", "qrcode-svg": "^1.1.0", + "svelte-spa-router": "^3.3.0", "tailwind-merge": "^1.14.0" }, "devDependencies": { @@ -2619,6 +2620,14 @@ "node": ">=8.10.0" } }, + "node_modules/regexparam": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexparam/-/regexparam-2.0.1.tgz", + "integrity": "sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw==", + "engines": { + "node": ">=8" + } + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -3037,6 +3046,17 @@ "node": ">=12" } }, + "node_modules/svelte-spa-router": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz", + "integrity": "sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ==", + "dependencies": { + "regexparam": "2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ItalyPaleAle" + } + }, "node_modules/svg.draggable.js": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index b0dee6c..86acc00 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -35,6 +35,7 @@ "@microsoft/fetch-event-source": "^2.0.1", "filesize": "^10.1.0", "qrcode-svg": "^1.1.0", + "svelte-spa-router": "^3.3.0", "tailwind-merge": "^1.14.0" } } diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index e3dc2df..2e1d75b 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,37 +1,24 @@
@@ -49,43 +36,22 @@ Working {/if} - + MFileserver + {#if $token != null} -
+
{#if $s?.sudo} Leave sudo {/if} - {#if $s?.admin} Admin {/if} - Files - Profile + {#if $s?.admin} Admin {/if} + Files + Profile Logout
{/if} - {#if $state.s === StateE.LOGIN } - {:else if $state.s === StateE.SIGNUP} - {:else if $state.s === StateE.RESET_PASSWORD} - {:else if $state.s === StateE.PROFILE} - {:else if $state.s === StateE.TFA_SETUP} - {:else if $state.s === StateE.ADMIN} - {:else if $state.s === StateE.VIEW} - {:else} You are in state {$state.s}, which should not be possible, please report this. - {/if} +
- - diff --git a/frontend/src/components/A.svelte b/frontend/src/components/A.svelte new file mode 100644 index 0000000..7be8861 --- /dev/null +++ b/frontend/src/components/A.svelte @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/components/DeleteModal.svelte b/frontend/src/components/DeleteModal.svelte index 4f4c4e2..a7b7bd3 100644 --- a/frontend/src/components/DeleteModal.svelte +++ b/frontend/src/components/DeleteModal.svelte @@ -1,7 +1,7 @@