diff --git a/src/lib/components/TitleBar.svelte b/src/lib/components/TitleBar.svelte index 8f431085..7b8ba9bb 100644 --- a/src/lib/components/TitleBar.svelte +++ b/src/lib/components/TitleBar.svelte @@ -30,6 +30,15 @@ let maximized = $state(false); let fullscreen = $state(false); + let barWidth = $state(0); + let brandWidth = $state(0); + let actionsWidth = $state(0); + let centeredWidth = $state(0); + + const compact = $derived( + barWidth > 0 && barWidth < centeredWidth + 2 * Math.max(brandWidth, actionsWidth), + ); + const hasUnread = $derived(Boolean(app.user?.unreadWhispers)); const label = $derived( @@ -49,19 +58,29 @@ }); onDestroy(() => unlisten?.()); + + function measureCenter(width: number) { + if (!compact) centeredWidth = width; + }
Hyperion logo @@ -69,7 +88,14 @@
{#if app.user} -
+
{/if} -
+
{#if updater.ready}