fix: fix tsc linter
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2307>
This commit is contained in:
parent
91c6935e2d
commit
d7255bf293
|
@ -213,7 +213,7 @@ const uploadedFilesById = computed(() => uploadedFiles.value.reduce((acc: Record
|
||||||
//
|
//
|
||||||
// Metadata
|
// Metadata
|
||||||
//
|
//
|
||||||
type Metadata = Pick<Track, 'title' | 'description' | 'position' | 'tags'> & { cover: string }
|
type Metadata = Pick<Track, 'title' | 'position' | 'tags'> & { cover: string | null, description: string }
|
||||||
const uploadImportData = reactive({} as Record<string, Metadata>)
|
const uploadImportData = reactive({} as Record<string, Metadata>)
|
||||||
const audioMetadata = reactive({} as Record<string, Record<string, string>>)
|
const audioMetadata = reactive({} as Record<string, Record<string, string>>)
|
||||||
const uploadData = reactive({} as Record<string, { import_metadata: Metadata }>)
|
const uploadData = reactive({} as Record<string, { import_metadata: Metadata }>)
|
||||||
|
|
|
@ -6,14 +6,14 @@ import { reactive, computed, watch } from 'vue'
|
||||||
import TagsSelector from '~/components/library/TagsSelector.vue'
|
import TagsSelector from '~/components/library/TagsSelector.vue'
|
||||||
import AttachmentInput from '~/components/common/AttachmentInput.vue'
|
import AttachmentInput from '~/components/common/AttachmentInput.vue'
|
||||||
|
|
||||||
type Values = Pick<Track, 'title' | 'description' | 'position' | 'tags'> & { cover: string }
|
type Values = Pick<Track, 'title' | 'position' | 'tags'> & { cover: string | null, description: string }
|
||||||
interface Events {
|
interface Events {
|
||||||
(e: 'update:values', values: Values): void
|
(e: 'update:values', values: Values): void
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
upload: Upload
|
upload: Upload
|
||||||
values: Values | null
|
values: Partial<Values> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const emit = defineEmits<Events>()
|
const emit = defineEmits<Events>()
|
||||||
|
@ -23,7 +23,10 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
||||||
const newValues = reactive<Values>({
|
const newValues = reactive<Values>({
|
||||||
description: '',
|
description: '',
|
||||||
...(props.values ?? props.upload.import_metadata ?? {}) as Values
|
title: '',
|
||||||
|
tags: [],
|
||||||
|
cover: null,
|
||||||
|
...(props.values ?? props.upload.import_metadata ?? {})
|
||||||
})
|
})
|
||||||
|
|
||||||
const isLoading = computed(() => !props.upload)
|
const isLoading = computed(() => !props.upload)
|
||||||
|
|
Loading…
Reference in New Issue