feat(web): drag page to trash folder (#2385)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Doma
2023-05-30 13:14:10 +08:00
committed by Himself65
parent f7487ad037
commit 2ed8d63d8a
11 changed files with 385 additions and 138 deletions

View File

@@ -41,6 +41,8 @@ export function useBlockSuiteMetaHelper(
[getPageMeta, setPageMeta]
);
// TODO-Doma
// "Remove" may cause ambiguity here. Consider renaming as "moveToTrash".
const removeToTrash = useCallback(
(pageId: string, isRoot = true) => {
const parentMeta = metas.find(m => m.subpageIds?.includes(pageId));