Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat: improve document remove & title (#657)

Chi Zhang8e1bf90ebdaa
diff --git a/packages/app/src/components/header/header-right-items/editor-option-menu.tsx b/packages/app/src/components/header/header-right-items/editor-option-menu.tsx
index 24a07245ee..ea71aef757 100644
--- a/packages/app/src/components/header/header-right-items/editor-option-menu.tsx
+++ b/packages/app/src/components/header/header-right-items/editor-option-menu.tsx
@@ -87,7 +87,7 @@ const PopoverContent = () => {
confirmType: 'danger',
}).then(confirm => {
confirm && toggleDeletePage(id);
- toast('Moved to Trash');
+ confirm && toast('Moved to Trash');
});
}}
icon={<TrashIcon />}
diff --git a/packages/app/src/pages/workspace/[workspaceId]/[pageId].tsx b/packages/app/src/pages/workspace/[workspaceId]/[pageId].tsx
index 726a23b677..971e950f8b 100644
--- a/packages/app/src/pages/workspace/[workspaceId]/[pageId].tsx
+++ b/packages/app/src/pages/workspace/[workspaceId]/[pageId].tsx
@@ -68,6 +68,7 @@ const Page: NextPageWithLayout = () => {
}
}
+ document.title = currentPage?.meta.title || 'Untitled';
return ret;
}, [currentWorkspace, currentPage, createEditor, setEditor]);