修复画布聊天面板收起与单按钮展开交互
This commit is contained in:
parent
d565e01a46
commit
00735ec0cd
@ -531,23 +531,20 @@ export default function CanvasEditorPage({ params }: PageProps) {
|
||||
|
||||
{/* 3. Floating Actions (Top Right) */}
|
||||
{!isPanelOpen && (
|
||||
<div className="absolute top-4 right-4 z-20 flex items-center gap-2">
|
||||
<div className="bg-background/80 backdrop-blur-md border rounded-xl p-1.5 shadow-sm flex items-center gap-1">
|
||||
{/* Panel Toggle */}
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
onClick={() => setIsPanelOpen(!isPanelOpen)}
|
||||
className="rounded-lg h-8 w-8"
|
||||
>
|
||||
<PanelRight className="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>显示面板</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
<div className="absolute top-4 right-4 z-20">
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="icon"
|
||||
onClick={() => setIsPanelOpen(true)}
|
||||
className="h-10 w-10 rounded-full border bg-background/90 shadow-sm backdrop-blur-md"
|
||||
>
|
||||
<PanelRight className="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>打开聊天面板</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@ -1532,21 +1532,17 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
|
||||
>
|
||||
<LayoutGrid className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-8 w-8 rounded-full hover:bg-muted">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8 rounded-full hover:bg-muted"
|
||||
onClick={onClose}
|
||||
disabled={!onClose}
|
||||
title="收起聊天面板"
|
||||
>
|
||||
<Maximize2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{onClose && (
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
onClick={onClose}
|
||||
className="h-7 px-3 text-xs rounded-full bg-muted/80 backdrop-blur-sm hover:bg-muted shadow-sm"
|
||||
>
|
||||
收起
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 消息列表 */}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user