Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix navigation: Don't redirect users do dashboard home page if operation is canceled

Smaug6739fda5121edac8
diff --git a/frontend/app/pages/dashboard/docs/_components/DocumentCardHeaderActionRow.vue b/frontend/app/pages/dashboard/docs/_components/DocumentCardHeaderActionRow.vue
index 17f972e5..ff54d076 100644
--- a/frontend/app/pages/dashboard/docs/_components/DocumentCardHeaderActionRow.vue
+++ b/frontend/app/pages/dashboard/docs/_components/DocumentCardHeaderActionRow.vue
@@ -41,7 +41,15 @@ const router = useRouter();
const print = () => window.print();
const openDeleteModal = () =>
- useModal().add(new Modal(shallowRef(DeleteNodeModal), { props: { node: props.doc }, onClose: () => router.push('/dashboard'), size: 'small' }));
+ useModal().add(
+ new Modal(shallowRef(DeleteNodeModal), {
+ props: { node: props.doc },
+ size: 'small',
+ onClose: r => {
+ if (r === 'success') router.push('/dashboard');
+ },
+ }),
+ );
const openEditModal = () => useModal().add(new Modal(shallowRef(DocumentMeta), { props: { doc: props.doc }, size: 'small' }));
const openPermissionsModal = () => useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: props.doc }, size: 'small' }));
const openRemoveShareModal = () => useModal().add(new Modal(shallowRef(RemoveSharedNode), { props: { nodeId: props.doc.id }, size: 'small' }));