feat(SPA): media field type

This commit is contained in:
Florian Sylvain committed 2026-10-21 15:17:15 +02:00
1 parent a2d596f4ca
commit 3e7fc9a4a5
57 files changed
+6109 -75

No files matched your search

+13 -2
View File
@@ -5,7 +5,12 @@ import { computed } from 'vue'
import DirectoryDialog from '@/components/DirectoryDialog.vue'
import SchemaChangeList from '@/components/SchemaChangeList.vue'
import { entriesLine } from '@/lib/schemaEntries'
import { summaryLine, type FieldChange } from '@/lib/schemaBuilderDiff'
import {
hasRefusedChange,
isMediaOnlyClean,
summaryLine,
type FieldChange,
} from '@/lib/schemaBuilderDiff'
const props = defineProps<{
name: string
@@ -19,6 +24,8 @@ defineEmits<{ apply: []; close: [] }>()
const summary = computed(() => summaryLine(props.changes))
const entries = computed(() => entriesLine(props.name, props.total))
const refused = computed(() => hasRefusedChange(props.changes))
const mediaOnlyClean = computed(() => isMediaOnlyClean(props.changes))
</script>
<template>
@@ -32,6 +39,7 @@ const entries = computed(() => entriesLine(props.name, props.total))
wide
:pending="applying"
:confirm-disabled="offline"
:confirm-blocked="refused"
@confirm="$emit('apply')"
@close="$emit('close')"
>
@@ -42,7 +50,10 @@ const entries = computed(() => entriesLine(props.name, props.total))
<span class="text-muted">{{ entries }}</span>
</div>
<SchemaChangeList :changes="changes" test-id="review-changes" />
<p v-if="!applying" class="text-xs/4.5 text-muted">
<p v-if="refused" class="text-xs/4.5 text-muted">
{{ t('Back to editing keeps your other changes.') }}
</p>
<p v-else-if="!mediaOnlyClean && !applying" class="text-xs/4.5 text-muted">
{{
t(
"Flagged changes can be refused if existing entries don't fit. If that happens, nothing is changed.",