owntone-server/web-src/src/components/ModalDialogPlaylist.vue

49 lines
1.0 KiB
Vue
Raw Normal View History

<template>
2025-02-09 17:52:45 +01:00
<modal-dialog-playable
:item="playable"
:show="show"
@close="$emit('close')"
/>
</template>
<script>
2025-02-09 17:52:45 +01:00
import ModalDialogPlayable from '@/components/ModalDialogPlayable.vue'
export default {
name: 'ModalDialogPlaylist',
2025-02-09 17:52:45 +01:00
components: { ModalDialogPlayable },
2024-02-28 13:10:08 +01:00
props: {
2024-03-26 03:13:17 +01:00
item: { required: true, type: Object },
2024-02-28 13:10:08 +01:00
show: Boolean,
uris: { default: '', type: String }
},
2022-02-19 07:05:59 +01:00
emits: ['close'],
computed: {
2025-02-09 17:52:45 +01:00
playable() {
return {
name: this.item.name,
2025-02-12 18:50:22 +01:00
handler: this.open,
2025-02-09 17:52:45 +01:00
uris: this.uris,
properties: [
2025-02-12 18:50:22 +01:00
{ label: 'property.tracks', value: this.item.item_count },
{
2025-02-12 18:50:22 +01:00
label: 'property.type',
2025-02-09 17:52:45 +01:00
value: this.$t(`playlist.type.${this.item.type}`)
},
2025-02-12 18:50:22 +01:00
{ label: 'property.path', value: this.item.path }
]
}
}
},
methods: {
2024-03-26 03:13:17 +01:00
open() {
2024-03-26 01:17:07 +01:00
this.$emit('close')
this.$router.push({
name: 'playlist',
2024-03-26 03:13:17 +01:00
params: { id: this.item.id }
2024-03-26 01:17:07 +01:00
})
}
}
}
</script>