From eaf739d7b4a6941e64ee44796f01647c6bb37236 Mon Sep 17 00:00:00 2001 From: biast12 Date: Sat, 25 Oct 2025 20:26:23 +0200 Subject: [PATCH] Add NoPermissionModal for dashboard access guidance Introduces a NoPermissionModal component to provide users with information on how to gain dashboard access when they lack permissions. Updates Guild.svelte and Index.svelte to use the modal, replacing direct links with interactive help buttons and improving the user experience for permission-related issues. --- frontend/src/components/Guild.svelte | 67 ++++- .../src/components/NoPermissionModal.svelte | 273 ++++++++++++++++++ frontend/src/views/Index.svelte | 54 +++- 3 files changed, 382 insertions(+), 12 deletions(-) create mode 100644 frontend/src/components/NoPermissionModal.svelte diff --git a/frontend/src/components/Guild.svelte b/frontend/src/components/Guild.svelte index 0cc5c2c..5041205 100644 --- a/frontend/src/components/Guild.svelte +++ b/frontend/src/components/Guild.svelte @@ -1,9 +1,12 @@
No permission - - - + + {/if}
+{#if showNoPermissionModal} + +{/if} + diff --git a/frontend/src/components/NoPermissionModal.svelte b/frontend/src/components/NoPermissionModal.svelte new file mode 100644 index 0000000..6b26513 --- /dev/null +++ b/frontend/src/components/NoPermissionModal.svelte @@ -0,0 +1,273 @@ + + + + + + + + + diff --git a/frontend/src/views/Index.svelte b/frontend/src/views/Index.svelte index 450629c..37c00cd 100644 --- a/frontend/src/views/Index.svelte +++ b/frontend/src/views/Index.svelte @@ -8,10 +8,13 @@ import Card from "../components/Card.svelte"; import InviteBadge from "../components/InviteBadge.svelte"; import Button from "../components/Button.svelte"; + import NoPermissionModal from "../components/NoPermissionModal.svelte"; import { loadingScreen, permissionLevelCache } from "../js/stores"; setDefaultHeaders(); + let showNoPermissionModal = false; + let guilds = window.localStorage.getItem("guilds") ? JSON.parse(window.localStorage.getItem("guilds")) : []; @@ -44,6 +47,14 @@ }); } + function openNoPermissionModal() { + showNoPermissionModal = true; + } + + function closeNoPermissionModal() { + showNoPermissionModal = false; + } + loadingScreen.set(false); @@ -53,7 +64,7 @@ Servers
- +

Your Servers

@@ -67,9 +78,15 @@

- +

Other Servers

- You do not have access to managing these servers. + You do not have access to managing these servers. .
@@ -80,7 +97,7 @@ {/each}
-
+
@@ -90,6 +107,12 @@
+{#if showNoPermissionModal} + +{/if} +