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