- EditorMetaTree ahora obtiene glob, locales, defaultLocale, tags del contexto si no se pasan - Elimina PanelMeta.svelte (wrapper innecesario) - Actualiza CatalogLayout, PanelObject, PanelSection, PanelOptionDetail Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>glm
parent
02fdf3b4c9
commit
f4c8fb04ef
@ -1,34 +0,0 @@
|
||||
<script lang="ts">
|
||||
import type { Metadata } from '@/mtas/lib'
|
||||
import { getContext } from 'svelte'
|
||||
import type { EditorGlob } from '@/vcen-edit/lib/editor-glob.svelte.ts'
|
||||
import type { CatalogEditorStore } from '@/vcen-edit/stores/catalog-editor.svelte.js'
|
||||
import EditorMetaTree from './EditorMetaTree.svelte'
|
||||
|
||||
let {
|
||||
value = $bindable<Metadata | undefined>(undefined),
|
||||
onUpdate,
|
||||
}: {
|
||||
value?: Metadata
|
||||
onUpdate: (meta: Metadata | undefined) => void
|
||||
} = $props()
|
||||
|
||||
const glob = getContext<EditorGlob>('editor-glob')
|
||||
const editor = getContext<CatalogEditorStore>('catalog-editor')
|
||||
const meta = $derived(value ?? {})
|
||||
|
||||
const locales = $derived(editor.cat.langs as string[])
|
||||
const defaultLocale = $derived(editor.cat.lang as string)
|
||||
const tags = $derived((editor.cat as any).metaTags as string[] ?? [])
|
||||
</script>
|
||||
|
||||
<div class="h-full flex flex-col">
|
||||
<EditorMetaTree
|
||||
value={meta}
|
||||
{glob}
|
||||
{locales}
|
||||
{defaultLocale}
|
||||
{tags}
|
||||
onUpdate={(m) => onUpdate(Object.keys(m).filter(k => k !== 'order').length === 0 ? undefined : m)}
|
||||
/>
|
||||
</div>
|
||||
Loading…
Reference in new issue