feat(front): description for playlists
This commit is contained in:
parent
c4bcceb358
commit
5323669c57
|
@ -16,6 +16,7 @@ import Alert from '~/components/ui/Alert.vue'
|
|||
import Button from '~/components/ui/Button.vue'
|
||||
import Input from '~/components/ui/Input.vue'
|
||||
import Slider from '~/components/ui/Slider.vue'
|
||||
import Textarea from '~/components/ui/Textarea.vue'
|
||||
|
||||
interface Events {
|
||||
(e: 'update:playlist', value: Playlist): void
|
||||
|
@ -44,6 +45,7 @@ const success = ref(false)
|
|||
const store = useStore()
|
||||
const name = ref(playlist.value?.name ?? '')
|
||||
const privacyLevel = ref(playlist.value?.privacy_level ?? store.state.auth.profile?.privacy_level ?? 'me')
|
||||
const description = ref(playlist.value?.description ?? '')
|
||||
|
||||
const { t } = useI18n()
|
||||
const labels = computed(() => ({
|
||||
|
@ -71,7 +73,8 @@ const submit = async () => {
|
|||
|
||||
const data = {
|
||||
name: name.value,
|
||||
privacy_level: privacyLevel.value
|
||||
privacy_level: privacyLevel.value,
|
||||
description: description.value
|
||||
}
|
||||
|
||||
const response = await axios.request({ method, url, data })
|
||||
|
@ -154,9 +157,8 @@ const submit = async () => {
|
|||
</div>
|
||||
<!-- TODO: Add description to model and types -->
|
||||
<div class="field">
|
||||
<Textarea
|
||||
v-model="playlist?.description"
|
||||
:label="t('components.playlists.Form.label.description')"
|
||||
<ContentForm
|
||||
v-model="description"
|
||||
:placeholder="t('components.playlists.Form.placeholder.description')"
|
||||
:rows="3"
|
||||
:max-length="500"
|
||||
|
|
Loading…
Reference in New Issue