From 38784b9d73c64254b29a7d50a529fe90b8743436 Mon Sep 17 00:00:00 2001 From: Kilu Date: Mon, 29 Jul 2024 22:41:32 +0800 Subject: [PATCH] fix: demond load outline --- .../components/global-comment/AddComment.tsx | 16 ++-- .../global-comment/actions/MoreActions.tsx | 42 ++++++----- .../components/publish/header/MoreActions.tsx | 74 ++++++++++--------- .../publish/header/PublishViewHeader.tsx | 2 +- 4 files changed, 71 insertions(+), 63 deletions(-) diff --git a/frontend/appflowy_web_app/src/components/global-comment/AddComment.tsx b/frontend/appflowy_web_app/src/components/global-comment/AddComment.tsx index 90efdd393b..e70ad41a0b 100644 --- a/frontend/appflowy_web_app/src/components/global-comment/AddComment.tsx +++ b/frontend/appflowy_web_app/src/components/global-comment/AddComment.tsx @@ -167,13 +167,15 @@ function AddComment() { )} - { - setLoginOpen(false); - }} - /> + {loginOpen && ( + { + setLoginOpen(false); + }} + /> + )} ); } diff --git a/frontend/appflowy_web_app/src/components/global-comment/actions/MoreActions.tsx b/frontend/appflowy_web_app/src/components/global-comment/actions/MoreActions.tsx index 1a5bc46038..e699f3ae56 100644 --- a/frontend/appflowy_web_app/src/components/global-comment/actions/MoreActions.tsx +++ b/frontend/appflowy_web_app/src/components/global-comment/actions/MoreActions.tsx @@ -125,26 +125,28 @@ function MoreActions({ comment }: { comment: GlobalComment }) { - { - setDeleteModalOpen(false); - }} - onClose={() => setDeleteModalOpen(false)} - open={deleteModalOpen} - title={
{t('globalComment.deleteComment')}
} - > -
- {t('globalComment.confirmDeleteDescription')} -
-
+ {deleteModalOpen && ( + { + setDeleteModalOpen(false); + }} + onClose={() => setDeleteModalOpen(false)} + open={deleteModalOpen} + title={
{t('globalComment.deleteComment')}
} + > +
+ {t('globalComment.confirmDeleteDescription')} +
+
+ )} ); } diff --git a/frontend/appflowy_web_app/src/components/publish/header/MoreActions.tsx b/frontend/appflowy_web_app/src/components/publish/header/MoreActions.tsx index 6dd3f6447a..eb88d1a710 100644 --- a/frontend/appflowy_web_app/src/components/publish/header/MoreActions.tsx +++ b/frontend/appflowy_web_app/src/components/publish/header/MoreActions.tsx @@ -76,47 +76,51 @@ function MoreActions() { - -
- {actions.map((action, index) => ( - + ))} +
{ - action.onClick(); - handleClose(); + window.open('https://appflowy.io', '_blank'); }} - key={index} className={ - 'flex items-center gap-2 rounded-[8px] p-1.5 text-sm hover:bg-content-blue-50 focus:bg-content-blue-50 focus:outline-none' + 'flex w-full cursor-pointer items-center justify-center py-2 text-sm text-text-title opacity-50' } > - - {action.label} - - ))} -
{ - window.open('https://appflowy.io', '_blank'); - }} - className={'flex w-full cursor-pointer items-center justify-center py-2 text-sm text-text-title opacity-50'} - > - Powered by - - + Powered by + + +
-
-
+ + )} ); } diff --git a/frontend/appflowy_web_app/src/components/publish/header/PublishViewHeader.tsx b/frontend/appflowy_web_app/src/components/publish/header/PublishViewHeader.tsx index df69423f8d..5064364772 100644 --- a/frontend/appflowy_web_app/src/components/publish/header/PublishViewHeader.tsx +++ b/frontend/appflowy_web_app/src/components/publish/header/PublishViewHeader.tsx @@ -67,7 +67,7 @@ export function PublishViewHeader({ onOpenDrawer, openDrawer }: { onOpenDrawer: >
- {!openDrawer && ( + {!openDrawer && openPopover && (