feat(chat): меню трёх точек в композере обычного чата — как в чате задачи

Кнопки «Прикрепить файл» и «Создать опрос» в мессенджере спрятаны за иконку
MoreVertical (DropdownMenu) — единый вид композера в обоих чатах (в чате задачи
сделано ранее, f6e3e19).
This commit is contained in:
2026-09-30 14:10:40 +03:00
parent 5aebcd1308
commit d5d95e2f53

View File

@@ -10,7 +10,14 @@ import {
MessageSquare, Plus, Send, Reply, X, Check,
Users, Link2, Paperclip, Loader2,
ChevronLeft, ChevronDown, Bell, BellOff, BarChart2,
MoreVertical,
} from 'lucide-react';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { PendingAttachmentList } from '@/components/chat/ChatAttachments';
import { cn } from '@/lib/utils';
import { PollCreateDialog } from '@/components/chat/PollCreateDialog';
@@ -634,26 +641,31 @@ export default function ChatPage() {
minRows={1}
maxRows={5}
/>
<Button
size="sm"
variant="ghost"
className="h-8 px-2 shrink-0"
onClick={() => fileInputRef.current?.click()}
title="Прикрепить файл"
aria-label="Прикрепить файл"
>
<Paperclip className="w-3.5 h-3.5" />
</Button>
<Button
size="sm"
variant="ghost"
className="h-8 px-2 shrink-0"
onClick={() => setPollDialogOpen(true)}
title="Создать опрос"
aria-label="Создать опрос"
>
<BarChart2 className="w-3.5 h-3.5" />
</Button>
{/* Кнопки «Прикрепить файл» и «Создать опрос» — за меню трёх
точек, как в чате задачи (единый вид композера) */}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
size="sm"
variant="ghost"
className="h-8 px-2 shrink-0"
title="Дополнительно"
aria-label="Дополнительно"
>
<MoreVertical className="w-4 h-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => fileInputRef.current?.click()}>
<Paperclip className="w-3.5 h-3.5 mr-2" />
Прикрепить файл
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setPollDialogOpen(true)}>
<BarChart2 className="w-3.5 h-3.5 mr-2" />
Создать опрос
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<Button
size="sm"
className="h-8"