mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 14:54:37 +00:00
[fix] remove erroneous test code
This commit is contained in:
@@ -48,7 +48,7 @@ export const Default: Story = {
|
||||
nodeType: 'CheckpointLoaderSimple',
|
||||
inputName: 'ckpt_name',
|
||||
currentValue: '',
|
||||
showLeftPanel: undefined
|
||||
showLeftPanel: false
|
||||
},
|
||||
render: (args) => ({
|
||||
components: { AssetBrowserModal },
|
||||
|
||||
@@ -46,7 +46,6 @@ import type { AssetDisplayItem } from '@/platform/assets/composables/useAssetBro
|
||||
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
|
||||
|
||||
import { useAssetBrowser } from '../composables/useAssetBrowser'
|
||||
import { mockAssets } from '../fixtures/ui-mock-assets'
|
||||
import AssetGrid from './AssetGrid.vue'
|
||||
|
||||
// Props
|
||||
@@ -65,9 +64,6 @@ const emit = defineEmits<{
|
||||
close: []
|
||||
}>()
|
||||
|
||||
// Use provided assets or fallback to mock data
|
||||
const assetsToUse = props.assets !== undefined ? props.assets : mockAssets
|
||||
|
||||
// Use AssetBrowser composable for all business logic
|
||||
const {
|
||||
searchQuery,
|
||||
@@ -76,7 +72,7 @@ const {
|
||||
contentTitle,
|
||||
filteredAssets,
|
||||
selectAsset
|
||||
} = useAssetBrowser(assetsToUse)
|
||||
} = useAssetBrowser(props.assets)
|
||||
|
||||
// Dialog controls panel visibility via prop
|
||||
const shouldShowLeftPanel = computed(() => {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { Meta, StoryObj } from '@storybook/vue3-vite'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import AssetBrowserModal from '../components/AssetBrowserModal.vue'
|
||||
import AssetBrowserModal from '@/platform/assets/components/AssetBrowserModal.vue'
|
||||
import { mockAssets } from '@/platform/assets/fixtures/ui-mock-assets'
|
||||
|
||||
// Component that simulates the useAssetBrowserDialog functionality with working close
|
||||
const DialogDemoComponent = {
|
||||
@@ -49,7 +50,8 @@ const DialogDemoComponent = {
|
||||
handleOpenDialog,
|
||||
handleOpenWithCurrentValue,
|
||||
handleCloseDialog,
|
||||
handleAssetSelected
|
||||
handleAssetSelected,
|
||||
mockAssets
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@@ -116,6 +118,7 @@ const DialogDemoComponent = {
|
||||
>
|
||||
<div class="w-[80vw] h-[80vh] max-w-[80vw] max-h-[80vh] rounded-2xl overflow-hidden">
|
||||
<AssetBrowserModal
|
||||
:assets="mockAssets"
|
||||
:node-type="currentNodeType"
|
||||
:input-name="currentInputName"
|
||||
:current-value="currentValue"
|
||||
|
||||
Reference in New Issue
Block a user