mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-21 16:03:26 +00:00
fix: align sidebar home with the header when ai sessions is off (#11882)
* fix: align sidebar home with the header when ai sessions is off Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * refactor: share the sidebar switch row condition Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
35b250e767
commit
1874808470
@@ -331,6 +331,8 @@
|
||||
const sessionsSwitchShown = $derived(
|
||||
globalAiEnabled && sessionsAllowed && !$copilotInfo.workspaceDisabled
|
||||
)
|
||||
// The rail's top row; the nav below it pads to the page header's height when it is absent.
|
||||
const switchRowShown = $derived(!embedded && sessionsSwitchShown)
|
||||
const askAiShown = $derived(
|
||||
(!globalAiEnabled || !sessionsAllowed) && !$copilotInfo.workspaceDisabled
|
||||
)
|
||||
@@ -1255,7 +1257,7 @@ outside this layout, and their shortcut must reopen the URL that is their creden
|
||||
<!-- Top row: the workspace ⇄ sessions switch, level with the page header's own
|
||||
row so the two read as one band. The workspace picker itself lives in that
|
||||
header, which is why nothing names the workspace here. -->
|
||||
{#if !embedded && sessionsSwitchShown}
|
||||
{#if switchRowShown}
|
||||
<div
|
||||
class="flex-shrink-0 px-2 gap-1 flex {collapsed
|
||||
? 'flex-col items-center py-2'
|
||||
@@ -1284,8 +1286,10 @@ outside this layout, and their shortcut must reopen the URL that is their creden
|
||||
Search / workspace items / instance settings) are spaced by the
|
||||
scroll area's gap rather than each scrolling on its own. -->
|
||||
<SidebarScrollArea color={darkMode ? SIDEBAR_BG_DARK : SIDEBAR_BG}>
|
||||
<!-- Section 1: Home/Runs + Favorites + Search -->
|
||||
<div class="px-2 pt-1 flex flex-col gap-1">
|
||||
<!-- Section 1: Home/Runs + Favorites + Search. Without the switch row above,
|
||||
Home is the top row and pt-2 centers its h-8 in the page header's h-12
|
||||
beside the docked rail. -->
|
||||
<div class="px-2 flex flex-col gap-1 {switchRowShown ? 'pt-1' : 'pt-2'}">
|
||||
{@render quickLinks(collapsed)}
|
||||
<Menubar class="flex flex-col gap-1">
|
||||
{#snippet children({ createMenu })}
|
||||
|
||||
Reference in New Issue
Block a user