π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
fix: delete account only close the highest modal (not the settings modal)
Smaug673957d316308dbe
diff --git a/frontend/app/composables/useModal.ts b/frontend/app/composables/useModal.tsindex a3215bff..44b8135a 100644--- a/frontend/app/composables/useModal.ts+++ b/frontend/app/composables/useModal.ts@@ -29,8 +29,17 @@ function closeLast(reason?: string) {close(lastModal, reason);}+/** Close all modals in the stack */+function closeAll(reason?: string) {+ while (modals.value.length > 0) {+ const modal = modals.value.pop()!;+ modal.options.onClose?.(reason);+ }+ document.body.classList.remove('modal-open');+}+export function useModal() {- return { add, close, closeLast, modals };+ return { add, close, closeLast, closeAll, modals };}interface ModalOptions {diff --git a/frontend/app/pages/dashboard/settings/_modals/DeleteAccountModal.vue b/frontend/app/pages/dashboard/settings/_modals/DeleteAccountModal.vueindex b45bab9d..35a3f257 100644--- a/frontend/app/pages/dashboard/settings/_modals/DeleteAccountModal.vue+++ b/frontend/app/pages/dashboard/settings/_modals/DeleteAccountModal.vue@@ -32,7 +32,7 @@ function deleteAccount() {.deleteAccount().then(() => {useNotifications().add({ type: 'success', title: 'Account deleted' });- emit('close');+ useModal().closeAll();setTimeout(() => {useUserStore().post_logout();useRouter().push('/');