[fix] modal layout

This commit is contained in:
Arjan Singh
2025-09-16 14:42:32 -07:00
committed by Arjan Singh
parent c1b5e00a7a
commit f7fe476cd4
3 changed files with 25 additions and 43 deletions

View File

@@ -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

View File

@@ -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'
}
}
}