webui: fix chat header width when sidebar is closed

This commit is contained in:
Kim Simonsen 2025-12-13 01:19:01 +01:00
parent 2aa45ef9e3
commit 5979b853b5
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,9 @@
import { Settings } from '@lucide/svelte'; import { Settings } from '@lucide/svelte';
import { DialogChatSettings } from '$lib/components/app'; import { DialogChatSettings } from '$lib/components/app';
import { Button } from '$lib/components/ui/button'; import { Button } from '$lib/components/ui/button';
import { useSidebar } from '$lib/components/ui/sidebar';
const sidebar = useSidebar();
let settingsOpen = $state(false); let settingsOpen = $state(false);
@ -11,7 +14,9 @@
</script> </script>
<header <header
class="md:background-transparent pointer-events-none fixed top-0 right-0 left-0 z-50 flex items-center justify-end bg-background/40 p-4 backdrop-blur-xl md:left-[var(--sidebar-width)]" class="md:background-transparent pointer-events-none fixed top-0 right-0 left-0 z-50 flex items-center justify-end bg-background/40 p-4 backdrop-blur-xl duration-200 ease-linear {sidebar.open
? 'md:left-[var(--sidebar-width)]'
: ''}"
> >
<div class="pointer-events-auto flex items-center space-x-2"> <div class="pointer-events-auto flex items-center space-x-2">
<Button variant="ghost" size="sm" onclick={toggleSettings}> <Button variant="ghost" size="sm" onclick={toggleSettings}>