mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 23:50:08 +00:00
[fix] modal layout
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
<template #content>
|
||||
<AssetGrid
|
||||
:class="{ 'max-w-5xl': !shouldShowLeftPanel }"
|
||||
:assets="filteredAssets"
|
||||
@asset-select="handleAssetSelectAndEmit"
|
||||
/>
|
||||
@@ -78,9 +79,9 @@ const {
|
||||
selectAsset
|
||||
} = useAssetBrowser(assetsToUse)
|
||||
|
||||
// Compute whether to show left panel
|
||||
// Dialog controls panel visibility via prop
|
||||
const shouldShowLeftPanel = computed(() => {
|
||||
return props.showLeftPanel ?? availableCategories.value.length >= 3
|
||||
return props.showLeftPanel ?? true
|
||||
})
|
||||
|
||||
// Handle close button - call both the prop callback and emit the event
|
||||
|
||||
@@ -38,14 +38,13 @@ export const useAssetBrowserDialog = () => {
|
||||
closable: false,
|
||||
pt: {
|
||||
root: {
|
||||
class:
|
||||
'rounded-2xl overflow-hidden h-[80vh] w-[80vw] max-h-[80vh] max-w-[80vw]'
|
||||
class: 'rounded-2xl overflow-hidden'
|
||||
},
|
||||
header: {
|
||||
class: 'p-0! hidden'
|
||||
class: 'p-0 hidden'
|
||||
},
|
||||
content: {
|
||||
class: 'p-0! m-0! h-full w-full'
|
||||
class: 'p-0 m-0 h-full w-full'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user