2021-10-23 10:48:11 +01:00
|
|
|
<template>
|
2025-02-09 11:13:23 +01:00
|
|
|
<modal-dialog-playable
|
2025-02-09 17:52:45 +01:00
|
|
|
:item="playable"
|
2025-02-09 11:13:23 +01:00
|
|
|
:show="show"
|
|
|
|
@close="$emit('close')"
|
2025-02-09 17:52:45 +01:00
|
|
|
/>
|
2021-10-23 10:48:11 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2025-02-09 11:13:23 +01:00
|
|
|
import ModalDialogPlayable from './ModalDialogPlayable.vue'
|
2021-10-23 10:48:11 +01:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'ModalDialogComposer',
|
2025-02-09 11:13:23 +01:00
|
|
|
components: { ModalDialogPlayable },
|
2024-03-26 03:13:17 +01:00
|
|
|
props: { item: { required: true, type: Object }, show: Boolean },
|
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,
|
2025-02-12 18:50:22 +01:00
|
|
|
handler: this.open_albums,
|
2025-02-09 17:52:45 +01:00
|
|
|
expression: `composer is "${this.item.name}" and media_kind is music`,
|
|
|
|
properties: [
|
|
|
|
{
|
2025-02-12 18:50:22 +01:00
|
|
|
label: 'property.albums',
|
2025-02-09 17:52:45 +01:00
|
|
|
value: this.item.album_count,
|
2025-02-12 18:50:22 +01:00
|
|
|
handler: this.open_albums
|
2025-02-09 17:52:45 +01:00
|
|
|
},
|
|
|
|
{
|
2025-02-12 18:50:22 +01:00
|
|
|
label: 'property.tracks',
|
2025-02-09 17:52:45 +01:00
|
|
|
value: this.item.track_count,
|
2025-02-12 18:50:22 +01:00
|
|
|
handler: this.open_tracks
|
2025-02-09 17:52:45 +01:00
|
|
|
},
|
|
|
|
{
|
2025-02-12 18:50:22 +01:00
|
|
|
label: 'property.duration',
|
2025-02-09 17:52:45 +01:00
|
|
|
value: this.$filters.durationInHours(this.item.length_ms)
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2025-02-08 14:27:54 +01:00
|
|
|
}
|
|
|
|
},
|
2021-10-23 10:48:11 +01:00
|
|
|
methods: {
|
2024-03-26 03:13:17 +01:00
|
|
|
open_albums() {
|
|
|
|
this.$emit('close')
|
|
|
|
this.$router.push({
|
|
|
|
name: 'music-composer-albums',
|
|
|
|
params: { name: this.item.name }
|
|
|
|
})
|
|
|
|
},
|
|
|
|
open_tracks() {
|
|
|
|
this.$router.push({
|
|
|
|
name: 'music-composer-tracks',
|
|
|
|
params: { name: this.item.name }
|
|
|
|
})
|
2021-10-23 10:48:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|