2018-12-15 09:56:09 +01:00
|
|
|
<template>
|
2025-02-09 17:52:45 +01:00
|
|
|
<modal-dialog-playable
|
|
|
|
:item="playable"
|
|
|
|
:show="show"
|
|
|
|
@close="$emit('close')"
|
|
|
|
/>
|
2018-12-15 09:56:09 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2025-02-09 17:52:45 +01:00
|
|
|
import ModalDialogPlayable from '@/components/ModalDialogPlayable.vue'
|
2018-12-15 09:56:09 +01:00
|
|
|
|
|
|
|
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'],
|
2025-02-08 14:27:54 +01:00
|
|
|
computed: {
|
2025-02-09 17:52:45 +01:00
|
|
|
playable() {
|
|
|
|
return {
|
|
|
|
name: this.item.name,
|
|
|
|
action: this.open,
|
|
|
|
uris: this.uris,
|
|
|
|
properties: [
|
|
|
|
{ label: 'dialog.playlist.tracks', value: this.item.item_count },
|
2025-02-08 14:27:54 +01:00
|
|
|
{
|
2025-02-09 17:52:45 +01:00
|
|
|
label: 'dialog.playlist.type',
|
|
|
|
value: this.$t(`playlist.type.${this.item.type}`)
|
2025-02-08 14:27:54 +01:00
|
|
|
},
|
2025-02-09 17:52:45 +01:00
|
|
|
{ label: 'dialog.playlist.path', value: this.item.path }
|
2025-02-08 14:27:54 +01:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2018-12-15 09:56:09 +01:00
|
|
|
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
|
|
|
})
|
2018-12-15 09:56:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|