2020-02-23 14:31:03 +00:00
|
|
|
<template>
|
|
|
|
<div :class="['ui', {loading: isLoading}, 'form']">
|
|
|
|
<div class="ui required field">
|
|
|
|
<label for="upload-title">
|
|
|
|
<translate translate-context="*/*/*/Noun">Title</translate>
|
|
|
|
</label>
|
2021-12-06 10:35:20 +00:00
|
|
|
<input
|
|
|
|
v-model="newValues.title"
|
|
|
|
type="text"
|
|
|
|
>
|
2020-02-23 14:31:03 +00:00
|
|
|
</div>
|
|
|
|
<attachment-input
|
|
|
|
v-model="newValues.cover"
|
|
|
|
:required="false"
|
2021-12-06 10:35:20 +00:00
|
|
|
@delete="newValues.cover = null"
|
|
|
|
>
|
|
|
|
<translate
|
|
|
|
slot="label"
|
|
|
|
translate-context="Content/Channel/*"
|
|
|
|
>
|
|
|
|
Track Picture
|
|
|
|
</translate>
|
2020-02-23 14:31:03 +00:00
|
|
|
</attachment-input>
|
2021-12-06 10:35:20 +00:00
|
|
|
<div class="ui small hidden divider" />
|
2020-02-23 14:31:03 +00:00
|
|
|
<div class="ui two fields">
|
|
|
|
<div class="ui field">
|
|
|
|
<label for="upload-tags">
|
|
|
|
<translate translate-context="*/*/*/Noun">Tags</translate>
|
|
|
|
</label>
|
|
|
|
<tags-selector
|
|
|
|
id="upload-tags"
|
2021-12-06 10:35:20 +00:00
|
|
|
v-model="newValues.tags"
|
|
|
|
:required="false"
|
|
|
|
/>
|
2020-02-23 14:31:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="ui field">
|
|
|
|
<label for="upload-position">
|
|
|
|
<translate translate-context="*/*/*/Short, Noun">Position</translate>
|
|
|
|
</label>
|
2021-12-06 10:35:20 +00:00
|
|
|
<input
|
|
|
|
v-model="newValues.position"
|
|
|
|
type="number"
|
|
|
|
min="1"
|
|
|
|
step="1"
|
|
|
|
>
|
2020-02-23 14:31:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui field">
|
|
|
|
<label for="upload-description">
|
|
|
|
<translate translate-context="*/*/*">Description</translate>
|
|
|
|
</label>
|
2021-12-06 10:35:20 +00:00
|
|
|
<content-form
|
|
|
|
v-model="newValues.description"
|
|
|
|
field-id="upload-description"
|
|
|
|
/>
|
2020-02-23 14:31:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-02-21 16:27:00 +00:00
|
|
|
import TagsSelector from '@/components/library/TagsSelector.vue'
|
|
|
|
import AttachmentInput from '@/components/common/AttachmentInput.vue'
|
2020-02-23 14:31:03 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
TagsSelector,
|
|
|
|
AttachmentInput
|
|
|
|
},
|
2021-12-06 10:35:20 +00:00
|
|
|
props: {
|
|
|
|
upload: { type: Object, required: true },
|
|
|
|
values: { type: Object, required: true }
|
|
|
|
},
|
2020-02-23 14:31:03 +00:00
|
|
|
data () {
|
|
|
|
return {
|
2021-12-06 10:35:20 +00:00
|
|
|
newValues: { ...this.values } || this.upload.import_metadata
|
2020-02-23 14:31:03 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
2021-12-06 10:35:20 +00:00
|
|
|
isLoading () {
|
2020-02-23 14:31:03 +00:00
|
|
|
return !!this.metadata
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
newValues: {
|
|
|
|
handler (v) {
|
|
|
|
this.$emit('values', v)
|
|
|
|
},
|
|
|
|
immediate: true
|
2021-12-06 10:35:20 +00:00
|
|
|
}
|
2020-02-23 14:31:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|