From e68ea9de5a40b007dcc45a996686b2c13a8a9183 Mon Sep 17 00:00:00 2001 From: Felicio Mununga Date: Tue, 19 Jul 2022 12:51:52 +0200 Subject: [PATCH] Hide unimplemented context menus (#299) --- .../components/channels/channel-item.tsx | 12 +- .../chat/components/chat-message/index.tsx | 103 +++++++++--------- 2 files changed, 56 insertions(+), 59 deletions(-) diff --git a/packages/status-react/src/components/main-sidebar/components/channels/channel-item.tsx b/packages/status-react/src/components/main-sidebar/components/channels/channel-item.tsx index 230bb450..f34e5440 100644 --- a/packages/status-react/src/components/main-sidebar/components/channels/channel-item.tsx +++ b/packages/status-react/src/components/main-sidebar/components/channels/channel-item.tsx @@ -1,7 +1,7 @@ import React from 'react' -import { ChatMenu } from '../../../../components/chat-menu' -import { ContextMenuTrigger } from '../../../../system' +// import { ChatMenu } from '../../../../components/chat-menu' +// import { ContextMenuTrigger } from '../../../../system' import { SidebarItem } from '../sidebar-item' import type { SidebarItemProps } from '../sidebar-item' @@ -14,9 +14,9 @@ export const ChannelItem = (props: Props) => { const { children, ...sidebarItemProps } = props return ( - - #{children} - - + // + #{children} + // + // ) } diff --git a/packages/status-react/src/routes/chat/components/chat-message/index.tsx b/packages/status-react/src/routes/chat/components/chat-message/index.tsx index 98a18641..445743da 100644 --- a/packages/status-react/src/routes/chat/components/chat-message/index.tsx +++ b/packages/status-react/src/routes/chat/components/chat-message/index.tsx @@ -12,8 +12,8 @@ import { Avatar, Box, Button, - ContextMenu, - ContextMenuTrigger, + // ContextMenu, + // ContextMenuTrigger, // DropdownMenu, // DropdownMenuTrigger, // EmojiHash, @@ -171,20 +171,20 @@ export const ChatMessage = (props: Props) => { return ( <> - - - {responseTo && } - - - {/* + {/* */} + + {responseTo && } + + + {/* */} - {/* + + {/* */} + {/* {member!.username} @@ -212,55 +212,52 @@ export const ChatMessage = (props: Props) => { */} - + - - {/* {pinned && ( + + {/* {pinned && ( Pinned by {contact.name} )} */} - - - {member!.username} - - - {new Date(Number(clock)).toLocaleTimeString([], { - hour: '2-digit', - minute: '2-digit', - })} - - + + + {member!.username} + + + {new Date(Number(clock)).toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + })} + + - {renderMessage()} + {renderMessage()} - - - + + + - setEditing(true)} - onReplyClick={handleReplyClick} - onPinClick={handlePinClick} - onDeleteClick={handleMessageDelete} - onReactionClick={handleReaction} - reacting={reacting} - onReactingChange={setReacting} - reactions={reactions} - /> - - + setEditing(true)} + onReplyClick={handleReplyClick} + onPinClick={handlePinClick} + onDeleteClick={handleMessageDelete} + onReactionClick={handleReaction} + reacting={reacting} + onReactingChange={setReacting} + reactions={reactions} + /> + + {/* Reply - {/* Pin */} - - + Pin + */} + {/* */} ) }