diff --git a/packages/core/src/client/webcomponents/components/dock/DockEdge.vue b/packages/core/src/client/webcomponents/components/dock/DockEdge.vue index 25401fc6..13dae73f 100644 --- a/packages/core/src/client/webcomponents/components/dock/DockEdge.vue +++ b/packages/core/src/client/webcomponents/components/dock/DockEdge.vue @@ -22,6 +22,12 @@ const isVertical = computed(() => store.position === 'left' || store.position == const groupedEntries = computed(() => context.docks.groupedEntries) const selectedEntry = computed(() => context.docks.selected) +const hasPanelContent = computed(() => { + const entry = selectedEntry.value + return context.panel.store.open + && !!entry + && entry.type !== 'action' +}) const positions = ['top', 'right', 'bottom', 'left'] as const const positionIcons: Record = { @@ -114,33 +120,41 @@ const panelStyle = computed(() => { style.left = '0' style.right = '0' style.bottom = '0' - style.height = `${store.height}vh` - style.minHeight = '150px' style.borderRadius = '8px 8px 0 0' + if (hasPanelContent.value) { + style.height = `${store.height}vh` + style.minHeight = '150px' + } break case 'top': style.left = '0' style.right = '0' style.top = '0' - style.height = `${store.height}vh` - style.minHeight = '150px' style.borderRadius = '0 0 8px 8px' + if (hasPanelContent.value) { + style.height = `${store.height}vh` + style.minHeight = '150px' + } break case 'left': style.top = '0' style.bottom = '0' style.left = '0' - style.width = `${store.width}vw` - style.minWidth = '200px' style.borderRadius = '0 8px 8px 0' + if (hasPanelContent.value) { + style.width = `${store.width}vw` + style.minWidth = '200px' + } break case 'right': style.top = '0' style.bottom = '0' style.right = '0' - style.width = `${store.width}vw` - style.minWidth = '200px' style.borderRadius = '8px 0 0 8px' + if (hasPanelContent.value) { + style.width = `${store.width}vw` + style.minWidth = '200px' + } break } @@ -167,7 +181,7 @@ const contentClass = computed(() => { :class="`flex ${isVertical ? 'flex-row' : 'flex-col'}`" :style="panelStyle" > - +
@@ -214,25 +228,14 @@ const contentClass = computed(() => {
-
- -
-
-
- {{ selectedEntry ? 'Action executed' : 'Select a dock entry' }} -
-
+
+