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