mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
hide Chat header in GlobalChatPane when mobile toggle is present
The header is redundant in mobile view since context is clear from the toggle button
This commit is contained in:
1 parent
093423ea0b
commit
ee784b149e
1 file changed
+25
-20
@@ -210,29 +210,34 @@ export function GlobalChatPane({ embedded = false, mobileChatMode, onMobileChatM
|
||||
|
||||
// Embedded mode: Render inline without fixed positioning
|
||||
if (embedded) {
|
||||
// Hide header when there's a mode toggle (mobile view with switching)
|
||||
const showHeader = !mobileChatMode;
|
||||
|
||||
return (
|
||||
<div className="h-full flex flex-col bg-background">
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between px-4 py-3 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<h2 className="font-semibold text-lg">{t('globalChat')}</h2>
|
||||
<div className="flex items-center gap-1">
|
||||
{messages.length > 0 && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
onClick={clearMessages}
|
||||
>
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{t('clearChat')}</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* Header - hidden when mobile toggle is present */}
|
||||
{showHeader && (
|
||||
<div className="flex items-center justify-between px-4 py-3 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<h2 className="font-semibold text-lg">{t('globalChat')}</h2>
|
||||
<div className="flex items-center gap-1">
|
||||
{messages.length > 0 && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="h-8 w-8"
|
||||
onClick={clearMessages}
|
||||
>
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{t('clearChat')}</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Messages */}
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user