@@ -22,6 +22,12 @@ const isVertical = computed(() => store.position === 'left' || store.position ==
2222
2323const groupedEntries = computed (() => context .docks .groupedEntries )
2424const selectedEntry = computed (() => context .docks .selected )
25+ const hasPanelContent = computed (() => {
26+ const entry = selectedEntry .value
27+ return context .panel .store .open
28+ && !! entry
29+ && entry .type !== ' action'
30+ })
2531
2632const positions = [' top' , ' right' , ' bottom' , ' left' ] as const
2733const positionIcons: Record <string , string > = {
@@ -114,33 +120,41 @@ const panelStyle = computed<CSSProperties>(() => {
114120 style .left = ' 0'
115121 style .right = ' 0'
116122 style .bottom = ' 0'
117- style .height = ` ${store .height }vh `
118- style .minHeight = ' 150px'
119123 style .borderRadius = ' 8px 8px 0 0'
124+ if (hasPanelContent .value ) {
125+ style .height = ` ${store .height }vh `
126+ style .minHeight = ' 150px'
127+ }
120128 break
121129 case ' top' :
122130 style .left = ' 0'
123131 style .right = ' 0'
124132 style .top = ' 0'
125- style .height = ` ${store .height }vh `
126- style .minHeight = ' 150px'
127133 style .borderRadius = ' 0 0 8px 8px'
134+ if (hasPanelContent .value ) {
135+ style .height = ` ${store .height }vh `
136+ style .minHeight = ' 150px'
137+ }
128138 break
129139 case ' left' :
130140 style .top = ' 0'
131141 style .bottom = ' 0'
132142 style .left = ' 0'
133- style .width = ` ${store .width }vw `
134- style .minWidth = ' 200px'
135143 style .borderRadius = ' 0 8px 8px 0'
144+ if (hasPanelContent .value ) {
145+ style .width = ` ${store .width }vw `
146+ style .minWidth = ' 200px'
147+ }
136148 break
137149 case ' right' :
138150 style .top = ' 0'
139151 style .bottom = ' 0'
140152 style .right = ' 0'
141- style .width = ` ${store .width }vw `
142- style .minWidth = ' 200px'
143153 style .borderRadius = ' 8px 0 0 8px'
154+ if (hasPanelContent .value ) {
155+ style .width = ` ${store .width }vw `
156+ style .minWidth = ' 200px'
157+ }
144158 break
145159 }
146160
@@ -167,7 +181,7 @@ const contentClass = computed(() => {
167181 :class =" `flex ${isVertical ? 'flex-row' : 'flex-col'}`"
168182 :style =" panelStyle"
169183 >
170- <DockPanelResizer :panel =" context.panel" edge-mode />
184+ <DockPanelResizer v-if = " hasPanelContent " :panel =" context.panel" edge-mode />
171185
172186 <!-- Toolbar -->
173187 <div class =" flex items-center shrink-0 select-none py1" :class =" toolbarClass" >
@@ -214,25 +228,14 @@ const contentClass = computed(() => {
214228 </div >
215229
216230 <!-- Content -->
217- <div class =" relative" :class =" contentClass" >
218- <template v-if =" selectedEntry && selectedEntry .type !== ' action' " >
219- <ViewEntry
220- v-if =" viewsContainer"
221- :key =" selectedEntry.id"
222- :context
223- :entry =" selectedEntry"
224- :persisted-doms =" persistedDoms"
225- />
226- </template >
227- <div
228- v-else
229- class =" absolute inset-0 flex items-center justify-center op40 select-none"
230- >
231- <div class =" flex flex-col items-center gap-2" >
232- <div class =" i-ph-layout-duotone w-8 h-8" />
233- <span class =" text-sm" >{{ selectedEntry ? 'Action executed' : 'Select a dock entry' }}</span >
234- </div >
235- </div >
231+ <div v-show =" hasPanelContent" class =" relative" :class =" contentClass" >
232+ <ViewEntry
233+ v-if =" hasPanelContent && viewsContainer && selectedEntry"
234+ :key =" selectedEntry.id"
235+ :context
236+ :entry =" selectedEntry"
237+ :persisted-doms =" persistedDoms"
238+ />
236239 <div
237240 id =" vite-devtools-views-container"
238241 ref =" viewsContainer"
0 commit comments