Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/components/LiteGraphCanvasSplitterOverlay.vue
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
)
Expand All @@ -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>
Expand Down
8 changes: 8 additions & 0 deletions src/constants/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ export const CORE_SETTINGS: SettingParams[] = [
// Default to small if the window is less than 1536px(2xl) wide.
defaultValue: () => (window.innerWidth < 1536 ? 'small' : 'normal')
},
{
id: 'Comfy.Sidebar.UnifiedWidth',
category: ['Appearance', 'Sidebar', 'UnifiedWidth'],
name: 'Unified sidebar width',
type: 'boolean',
defaultValue: true,
versionAdded: '1.18.1'
},
{
id: 'Comfy.TextareaWidget.FontSize',
category: ['Appearance', 'Node Widget', 'TextareaWidget', 'FontSize'],
Expand Down
3 changes: 3 additions & 0 deletions src/locales/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "small"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "Unified sidebar width"
},
"Comfy_SnapToGrid_GridSize": {
"name": "Snap to grid size",
"tooltip": "When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid."
Expand Down
3 changes: 3 additions & 0 deletions src/locales/es/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "pequeña"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "Ancho unificado de la barra lateral"
},
"Comfy_SnapToGrid_GridSize": {
"name": "Tamaño de la cuadrícula para ajustar",
"tooltip": "Al arrastrar y redimensionar nodos mientras se mantiene presionada la tecla shift, se alinearán a la cuadrícula, esto controla el tamaño de esa cuadrícula."
Expand Down
3 changes: 3 additions & 0 deletions src/locales/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "petit"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "Largeur unifiée de la barre latérale"
},
"Comfy_SnapToGrid_GridSize": {
"name": "Taille de la grille d'alignement",
"tooltip": "Lors du déplacement et du redimensionnement des nœuds tout en maintenant shift, ils seront alignés sur la grille, cela contrôle la taille de cette grille."
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ja/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "小"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "サイドバーの幅を統一"
},
"Comfy_SnapToGrid_GridSize": {
"name": "グリッドサイズにスナップ",
"tooltip": "シフトを押しながらノードをドラッグおよびサイズ変更すると、グリッドに整列されます。これにより、そのグリッドのサイズが制御されます。"
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ko/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "작음"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "통합 사이드바 너비"
},
"Comfy_SnapToGrid_GridSize": {
"name": "그리드 크기에 스냅",
"tooltip": "Shift 키를 누른 상태에서 노드를 드래그하거나 크기를 조절하면 그리드에 맞춰 정렬됩니다. 이 설정은 그리드의 크기를 제어합니다."
Expand Down
3 changes: 3 additions & 0 deletions src/locales/ru/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "маленький"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "Унифицированная ширина боковой панели"
},
"Comfy_SnapToGrid_GridSize": {
"name": "Размер сетки привязки",
"tooltip": "При перетаскивании и изменении размера нод, удерживая shift, они будут выровнены по сетке, это контролирует размер этой сетки."
Expand Down
3 changes: 3 additions & 0 deletions src/locales/zh/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
"small": "小"
}
},
"Comfy_Sidebar_UnifiedWidth": {
"name": "统一侧边栏宽度"
},
"Comfy_SnapToGrid_GridSize": {
"name": "吸附网格大小",
"tooltip": "在按住shift拖动和调整节点大小时,节点将对齐到网格,该选项控制网格。"
Expand Down
1 change: 1 addition & 0 deletions src/schemas/apiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ const zSettings = z.object({
'Comfy.PromptFilename': z.boolean(),
'Comfy.Sidebar.Location': z.enum(['left', 'right']),
'Comfy.Sidebar.Size': z.enum(['small', 'normal']),
'Comfy.Sidebar.UnifiedWidth': z.boolean(),
'Comfy.SwitchUser': z.any(),
'Comfy.SnapToGrid.GridSize': z.number(),
'Comfy.TextareaWidget.FontSize': z.number(),
Expand Down
Loading