feat: improve document remove & title (#657)

* fix: cancel delete, do not show toast
* feat: support document title sync page title
This commit is contained in:
Chi Zhang
2023-01-03 13:39:24 +08:00
committed by GitHub
parent c840251886
commit 8e1bf90ebd
2 changed files with 2 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ const PopoverContent = () => {
confirmType: 'danger',
}).then(confirm => {
confirm && toggleDeletePage(id);
toast('Moved to Trash');
confirm && toast('Moved to Trash');
});
}}
icon={<TrashIcon />}

View File

@@ -68,6 +68,7 @@ const Page: NextPageWithLayout = () => {
}
}
document.title = currentPage?.meta.title || 'Untitled';
return ret;
}, [currentWorkspace, currentPage, createEditor, setEditor]);