File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 11<template >
22 <teleport :to =" teleportTarget" >
3- <nav class =" side-tool-bar-container" >
3+ <nav : class =" ' side-tool-bar-container' + (isSmall ? ' small-sidebar' : '') " >
44 <SideBarIcon
55 v-for =" tab in tabs"
66 :key =" tab.id"
@@ -55,6 +55,10 @@ const teleportTarget = computed(() =>
5555 : ' .comfyui-body-right'
5656)
5757
58+ const isSmall = computed (
59+ () => settingStore .get (' Comfy.SideBar.Size' ) === ' small'
60+ )
61+
5862const tabs = computed (() => workspaceStore .getSidebarTabs ())
5963const selectedTab = computed <SidebarTabExtension | null >(() => {
6064 const tabId = workspaceStore .activeSidebarTab
@@ -82,6 +86,10 @@ onBeforeUnmount(() => {
8286 --sidebar-width : 64px ;
8387 --sidebar-icon-size : 1.5rem ;
8488}
89+ :root .small-sidebar {
90+ --sidebar-width : 40px ;
91+ --sidebar-icon-size : 1rem ;
92+ }
8593 </style >
8694
8795<style scoped>
Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ export const useSettingStore = defineStore('setting', {
8989 options : [ 'left' , 'right' ] ,
9090 defaultValue : 'left'
9191 } )
92+
93+ app . ui . settings . addSetting ( {
94+ id : 'Comfy.SideBar.Size' ,
95+ name : 'Sidebar size' ,
96+ type : 'combo' ,
97+ options : [ 'normal' , 'small' ] ,
98+ defaultValue : window . innerWidth < 1600 ? 'small' : 'normal'
99+ } )
92100 } ,
93101
94102 set ( key : string , value : any ) {
You can’t perform that action at this time.
0 commit comments