From 940432d28770f6cbae045feb1af86fa5348d708b Mon Sep 17 00:00:00 2001 From: byGalax Date: Sun, 17 May 2026 01:18:32 +0200 Subject: [PATCH] =?UTF-8?q?feat(P7.T3):=20composer=20toolbar=20=E2=80=94?= =?UTF-8?q?=205=20inline=20buttons=20+=20popover=20for=20Bild/Poll/Aktivit?= =?UTF-8?q?=C3=A4ten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/desktop/src/pages/ConversationPage.tsx | 105 ++++---------------- 1 file changed, 20 insertions(+), 85 deletions(-) diff --git a/apps/desktop/src/pages/ConversationPage.tsx b/apps/desktop/src/pages/ConversationPage.tsx index 63b11b7..54a6e5e 100644 --- a/apps/desktop/src/pages/ConversationPage.tsx +++ b/apps/desktop/src/pages/ConversationPage.tsx @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { Virtuoso, type VirtuosoHandle } from 'react-virtuoso'; +import { ComposerActionsMenu } from '../components/ComposerActionsMenu'; import { ConversationHeader } from '../components/ConversationHeader'; import { EmojiPicker } from '../components/EmojiPicker'; import { EmptyState } from '../components/EmptyState'; @@ -16,10 +17,8 @@ import { ArrowRightIcon, ChevronDownIcon, ChevronUpIcon, - EyeOffIcon, PencilIcon, PlusIcon, - PollIcon, ReplyIcon, SearchIcon, SendIcon, @@ -237,6 +236,8 @@ export function ConversationPage() { const [mentionState, setMentionState] = useState<{ query: string; start: number } | null>(null); const [emojiOpen, setEmojiOpen] = useState(false); const [gifPickerOpen, setGifPickerOpen] = useState(false); + const [actionsMenuOpen, setActionsMenuOpen] = useState(false); + const actionsMenuAnchorRef = useRef(null); // Sticky toggle: when on, the next image(s) sent are marked view-once. // Auto-clears on a successful send so the composer doesn't accidentally // burn the message-after-next. @@ -1243,55 +1244,32 @@ export function ConversationPage() { className="hidden" onChange={(e) => handleFilesChosen(e.target.files)} /> + {/* [+] popover trigger — opens ComposerActionsMenu (file/poll/whiteboard/watch/game) */} - - - - + onCreateWhiteboard={() => void handleCreateWhiteboard()} + onStartWatchTogether={() => setWatchDialogOpen(true)} + onStartGame={() => setGameDialogOpen(true)} + canStartGame={conversation?.members?.length === 2} + />
- { @@ -1898,32 +1862,3 @@ function AttachmentPreview({ ); } -function WhiteboardIcon(props: React.SVGProps) { - return ( - - - - - ); -} - -function PlayBoxIcon(props: React.SVGProps) { - return ( - - - - - ); -} - -function GameIcon(props: React.SVGProps) { - return ( - - - - - ); -}