mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-09 00:02:30 +00:00
fix: improve drawers zindex positioning
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
loadFolders()
|
||||
</script>
|
||||
|
||||
<Drawer bind:this={newFolder}>
|
||||
<Drawer bind:this={newFolder} name="newFolder">
|
||||
<DrawerContent
|
||||
title="New Folder"
|
||||
on:close={() => {
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
if (openedDrawers.val.includes(id)) {
|
||||
return
|
||||
}
|
||||
offset = openedDrawers.val.length - 1
|
||||
openedDrawers.val.push(id)
|
||||
offset = initialOffset + openedDrawers.val.length
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
|
||||
if (open) {
|
||||
openedDrawers.val.push(id)
|
||||
offset = initialOffset + openedDrawers.val.length
|
||||
}
|
||||
|
||||
let wasEverOpen = false
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
disableChatOffset?: boolean
|
||||
class?: string | undefined
|
||||
positionClass?: string | undefined
|
||||
name?: string
|
||||
children?: import('svelte').Snippet<[any]>
|
||||
}
|
||||
|
||||
@@ -32,6 +33,7 @@
|
||||
disableChatOffset = false,
|
||||
class: clazz = '',
|
||||
positionClass = undefined,
|
||||
name = undefined,
|
||||
children: children_render
|
||||
}: Props = $props()
|
||||
|
||||
@@ -85,6 +87,7 @@
|
||||
|
||||
$effect(() => {
|
||||
open
|
||||
console.log('open', open)
|
||||
untrack(() => {
|
||||
open ? openDrawer() : closeDrawer()
|
||||
})
|
||||
@@ -112,9 +115,8 @@
|
||||
>
|
||||
{#snippet children({ handleClickAway, zIndex, isTop })}
|
||||
<aside
|
||||
class="drawer windmill-app windmill-drawer {clazz ?? ''} {positionClass ?? ''} {aiChatOpen
|
||||
? 'respect-global-chat'
|
||||
: ''}"
|
||||
class="drawer windmill-app windmill-drawer {name ? `windmill-drawer-${name}` : ''} {clazz ??
|
||||
''} {positionClass ?? ''} {aiChatOpen ? 'respect-global-chat' : ''}"
|
||||
class:open
|
||||
class:close={!open && timeout}
|
||||
class:global-chat-open={aiChatOpen}
|
||||
|
||||
Reference in New Issue
Block a user