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

48 lines
1.1 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>
import ModalDialogPlayable from '@/components/ModalDialogPlayable.vue'
export default {
name: 'ModalDialogArtist',
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-09 17:52:45 +01:00
computed: {
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
properties: [
2025-02-12 18:50:22 +01:00
{ label: 'property.albums', value: this.item.album_count },
{ label: 'property.tracks', value: this.item.track_count },
2025-02-09 17:52:45 +01:00
{
2025-02-12 18:50:22 +01:00
label: 'property.type',
2025-02-09 17:52:45 +01:00
value: this.$t(`data.kind.${this.item.data_kind}`)
},
{
2025-02-12 18:50:22 +01:00
label: 'property.added-on',
2025-02-09 17:52:45 +01:00
value: this.$filters.datetime(this.item.time_added)
}
]
}
}
},
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: 'music-artist',
2024-03-26 03:13:17 +01:00
params: { id: this.item.id }
2024-03-26 01:17:07 +01:00
})
}
}
}
</script>