fix(ui): sidebar footer in one row, no user name
This commit is contained in:
@@ -80,23 +80,20 @@
|
||||
</nav>
|
||||
<div
|
||||
class={cn(
|
||||
"flex flex-col gap-2 border-t",
|
||||
open ? "p-3" : "items-center p-2"
|
||||
"flex items-center gap-1 border-t",
|
||||
open ? "px-3 py-2" : "flex-col px-1 py-2"
|
||||
)}
|
||||
>
|
||||
<span title="event stream from the gateway (SSE)">
|
||||
<span
|
||||
class={cn(open && "mr-auto")}
|
||||
title="event stream from the gateway (SSE)"
|
||||
>
|
||||
<LiveDot
|
||||
detail={gateway.live.detail}
|
||||
label={open}
|
||||
state={gateway.live.state}
|
||||
/>
|
||||
</span>
|
||||
{#if open}
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<span class="truncate text-muted-foreground text-xs">
|
||||
{session.user}
|
||||
</span>
|
||||
<div class="flex items-center">
|
||||
<ThemeToggle />
|
||||
<Button
|
||||
aria-label="Sign out"
|
||||
@@ -107,23 +104,8 @@
|
||||
>
|
||||
<LogOutIcon class="size-4" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<ThemeToggle />
|
||||
<Button
|
||||
aria-label="Sign out"
|
||||
onclick={signOut}
|
||||
size="icon-sm"
|
||||
title="Sign out"
|
||||
variant="ghost"
|
||||
>
|
||||
<LogOutIcon class="size-4" />
|
||||
</Button>
|
||||
{/if}
|
||||
<Button
|
||||
aria-label={open ? "Collapse sidebar" : "Expand sidebar"}
|
||||
class={open ? "self-end" : ""}
|
||||
onclick={() => ui.toggleNav()}
|
||||
size="icon-sm"
|
||||
title="{open ? 'Collapse' : 'Expand'} sidebar (⌘B)"
|
||||
|
||||
Reference in New Issue
Block a user