Add unified sidebar width setting (#3605)

Co-authored-by: Benjamin Lu <templu1107@proton.me>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Benjamin Lu
2025-04-24 16:41:46 -04:00
committed by GitHub
parent 9c2300d780
commit ba3e2edb8a
10 changed files with 40 additions and 2 deletions

View File

@@ -1,9 +1,9 @@
<template>
<Splitter
:key="activeSidebarTabId ?? undefined"
:key="sidebarStateKey"
class="splitter-overlay-root splitter-overlay"
:pt:gutter="sidebarPanelVisible ? '' : 'hidden'"
:state-key="activeSidebarTabId ?? undefined"
:state-key="sidebarStateKey"
state-storage="local"
>
<SplitterPanel
@@ -59,6 +59,10 @@ const sidebarLocation = computed<'left' | 'right'>(() =>
settingStore.get('Comfy.Sidebar.Location')
)
const unifiedWidth = computed(() =>
settingStore.get('Comfy.Sidebar.UnifiedWidth')
)
const sidebarPanelVisible = computed(
() => useSidebarTabStore().activeSidebarTab !== null
)
@@ -68,6 +72,10 @@ const bottomPanelVisible = computed(
const activeSidebarTabId = computed(
() => useSidebarTabStore().activeSidebarTabId
)
const sidebarStateKey = computed(() => {
return unifiedWidth.value ? 'unified-sidebar' : activeSidebarTabId.value ?? ''
})
</script>
<style scoped>