From 8845bb9b4b4d36a26a9624fc81050a4c20619c99 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Sat, 2 Sep 2023 03:28:16 +0800 Subject: [PATCH] chore: optimized style (#4098) --- .../operation-menu.tsx | 4 +++- .../pure/trash-button-group/index.tsx | 1 + .../WorkspaceSelector/loading-icon.tsx | 21 +++++++++++------- .../WorkspaceSelector/workspace-selector.tsx | 22 +++++++++++++------ apps/core/src/hooks/use-datasource-sync.ts | 21 ++++++++++-------- .../components/block-suite-editor/index.tsx | 5 ++++- .../operation-menu-items/move-to-trash.tsx | 1 + .../component/src/ui/button/styles.css.ts | 2 ++ .../e2e/local-first-trash-page.spec.ts | 19 ++++++++++++++++ 9 files changed, 70 insertions(+), 26 deletions(-) diff --git a/apps/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx b/apps/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx index 18cf04e27b..5eff34ee68 100644 --- a/apps/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx +++ b/apps/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx @@ -171,7 +171,9 @@ export const PageMenu = ({ rename, pageId }: PageMenuProps) => { /> ); - + if (pageMeta.trash) { + return null; + } return ( <> diff --git a/apps/core/src/components/pure/trash-button-group/index.tsx b/apps/core/src/components/pure/trash-button-group/index.tsx index 068968ebde..6a47a9c04d 100644 --- a/apps/core/src/components/pure/trash-button-group/index.tsx +++ b/apps/core/src/components/pure/trash-button-group/index.tsx @@ -35,6 +35,7 @@ export const TrashButtonGroup = () => {