diff --git a/front/src/components/channels/UploadForm.vue b/front/src/components/channels/UploadForm.vue index 1d5ea25cf..e849282da 100644 --- a/front/src/components/channels/UploadForm.vue +++ b/front/src/components/channels/UploadForm.vue @@ -213,7 +213,7 @@ const uploadedFilesById = computed(() => uploadedFiles.value.reduce((acc: Record // // Metadata // -type Metadata = Pick & { cover: string } +type Metadata = Pick & { cover: string | null, description: string } const uploadImportData = reactive({} as Record) const audioMetadata = reactive({} as Record>) const uploadData = reactive({} as Record) diff --git a/front/src/components/channels/UploadMetadataForm.vue b/front/src/components/channels/UploadMetadataForm.vue index 236f0d7c3..589cf1495 100644 --- a/front/src/components/channels/UploadMetadataForm.vue +++ b/front/src/components/channels/UploadMetadataForm.vue @@ -6,14 +6,14 @@ import { reactive, computed, watch } from 'vue' import TagsSelector from '~/components/library/TagsSelector.vue' import AttachmentInput from '~/components/common/AttachmentInput.vue' -type Values = Pick & { cover: string } +type Values = Pick & { cover: string | null, description: string } interface Events { (e: 'update:values', values: Values): void } interface Props { upload: Upload - values: Values | null + values: Partial | null } const emit = defineEmits() @@ -23,7 +23,10 @@ const props = withDefaults(defineProps(), { const newValues = reactive({ description: '', - ...(props.values ?? props.upload.import_metadata ?? {}) as Values + title: '', + tags: [], + cover: null, + ...(props.values ?? props.upload.import_metadata ?? {}) }) const isLoading = computed(() => !props.upload)