From 2ccec85e5618922adbf752463571106e605d0f2e Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Fri, 30 Aug 2024 22:48:17 +0200 Subject: [PATCH] enable reply link and post menu for description and rules posts --- src/components/post-desktop/post-desktop.tsx | 2 +- .../post-desktop/post-menu-desktop/post-menu-desktop.tsx | 4 ++-- .../post-mobile/post-menu-mobile/post-menu-mobile.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/post-desktop/post-desktop.tsx b/src/components/post-desktop/post-desktop.tsx index 8050c11d..395dfc81 100644 --- a/src/components/post-desktop/post-desktop.tsx +++ b/src/components/post-desktop/post-desktop.tsx @@ -190,7 +190,7 @@ const PostInfo = ({ openReplyModal, post, postReplyCount = 0, roles, isHidden }: [ !cid && e.preventDefault()} + onClick={(e) => !cid && !isDescription && !isRules && e.preventDefault()} > {_.capitalize(t('reply'))} diff --git a/src/components/post-desktop/post-menu-desktop/post-menu-desktop.tsx b/src/components/post-desktop/post-menu-desktop/post-menu-desktop.tsx index 6e53427f..aef8c46d 100644 --- a/src/components/post-desktop/post-menu-desktop/post-menu-desktop.tsx +++ b/src/components/post-desktop/post-menu-desktop/post-menu-desktop.tsx @@ -180,13 +180,13 @@ const PostMenuDesktop = ({ post }: { post: Comment }) => { className={isInCatalogView ? styles.postMenuBtnCatalog : styles.postMenuBtn} title='Post menu' onClick={handleMenuClick} - style={{ transform: menuBtnRotated && cid ? 'rotate(90deg)' : 'rotate(0deg)' }} + style={{ transform: menuBtnRotated && (cid || isDescription || isRules) ? 'rotate(90deg)' : 'rotate(0deg)' }} > ▶ {menuBtnRotated && - cid && + (cid || isDescription || isRules) && createPortal(
diff --git a/src/components/post-mobile/post-menu-mobile/post-menu-mobile.tsx b/src/components/post-mobile/post-menu-mobile/post-menu-mobile.tsx index 9764cbb8..6d7a5193 100644 --- a/src/components/post-mobile/post-menu-mobile/post-menu-mobile.tsx +++ b/src/components/post-mobile/post-menu-mobile/post-menu-mobile.tsx @@ -164,7 +164,7 @@ const PostMenuMobile = ({ post }: { post: Comment }) => { ... {isMenuOpen && - cid && + (cid || isDescription || isRules) && createPortal(