From 6bff163f0970cac37ef9850cccce2949ef449b54 Mon Sep 17 00:00:00 2001 From: byGalax Date: Sat, 16 May 2026 17:47:39 +0200 Subject: [PATCH] feat(desktop): pinned-messages side panel --- .../src/components/PinnedMessagesPanel.tsx | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 apps/desktop/src/components/PinnedMessagesPanel.tsx diff --git a/apps/desktop/src/components/PinnedMessagesPanel.tsx b/apps/desktop/src/components/PinnedMessagesPanel.tsx new file mode 100644 index 0000000..7bd0d17 --- /dev/null +++ b/apps/desktop/src/components/PinnedMessagesPanel.tsx @@ -0,0 +1,68 @@ +import type { PinnedMessage } from '@chat-app/shared/chat'; + +import { PinIcon, XIcon } from './icons'; + +interface Props { + open: boolean; + pins: PinnedMessage[]; + onClose: () => void; + onJump: (messageId: string) => void; + onUnpin: (messageId: string) => void; + // Optional preview-renderer: parent resolves messageId → short text/snippet + // since the panel itself doesn't decrypt. If absent, the panel just shows + // the message-id stub. + renderPreview?: (messageId: string) => React.ReactNode; +} + +export function PinnedMessagesPanel({ open, pins, onClose, onJump, onUnpin, renderPreview }: Props) { + if (!open) return null; + return ( + + ); +}