mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 08:45:54 -04:00
[web] Streamline title bar of modal dialogs
This commit is contained in:
parent
7e8672917e
commit
6481d6f0ee
@ -1,8 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="title is-4">
|
|
||||||
<a v-if="item.handler" @click="item.handler" v-text="item.name"></a>
|
|
||||||
<span v-else v-text="item.name" />
|
|
||||||
</div>
|
|
||||||
<control-image
|
<control-image
|
||||||
v-if="item.image"
|
v-if="item.image"
|
||||||
:url="item.image"
|
:url="item.image"
|
||||||
|
@ -4,8 +4,13 @@
|
|||||||
<div class="modal-background" @click="$emit('close')" />
|
<div class="modal-background" @click="$emit('close')" />
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="card is-shadowless">
|
<div class="card is-shadowless">
|
||||||
|
<div class="card-header">
|
||||||
|
<div v-if="title" class="card-header-title" v-text="title" />
|
||||||
|
<div class="card-header-icon">
|
||||||
|
<button class="delete" @click="$emit('close')"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<p v-if="title" class="title is-4" v-text="title" />
|
|
||||||
<slot name="content" />
|
<slot name="content" />
|
||||||
</div>
|
</div>
|
||||||
<footer v-if="actions.length" class="card-footer">
|
<footer v-if="actions.length" class="card-footer">
|
||||||
|
@ -38,7 +38,6 @@ export default {
|
|||||||
},
|
},
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
image: this.item.artwork_url,
|
image: this.item.artwork_url,
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
@ -79,22 +78,6 @@ export default {
|
|||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
if (this.media_kind_resolved === 'podcast') {
|
|
||||||
this.$router.push({ name: 'podcast', params: { id: this.item.id } })
|
|
||||||
} else if (this.media_kind_resolved === 'audiobook') {
|
|
||||||
this.$router.push({
|
|
||||||
name: 'audiobooks-album',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$router.push({
|
|
||||||
name: 'music-album',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
openArtist() {
|
openArtist() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
if (this.media_kind_resolved === 'audiobook') {
|
if (this.media_kind_resolved === 'audiobook') {
|
||||||
|
@ -17,7 +17,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
image: this.item?.images?.[0]?.url || '',
|
image: this.item?.images?.[0]?.url || '',
|
||||||
name: this.item.name || '',
|
name: this.item.name || '',
|
||||||
properties: [
|
properties: [
|
||||||
@ -37,13 +36,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'music-spotify-album',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
openArtist() {
|
openArtist() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
|
@ -17,7 +17,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{ key: 'property.albums', value: this.item.album_count },
|
{ key: 'property.albums', value: this.item.album_count },
|
||||||
@ -34,15 +33,6 @@ export default {
|
|||||||
uri: this.item.uri
|
uri: this.item.uri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'music-artist',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,7 +17,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{
|
{
|
||||||
@ -31,15 +30,6 @@ export default {
|
|||||||
uri: this.item.uri
|
uri: this.item.uri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'music-spotify-artist',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -18,7 +18,6 @@ export default {
|
|||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
expression: `composer is "${this.item.name}" and media_kind is music`,
|
expression: `composer is "${this.item.name}" and media_kind is music`,
|
||||||
handler: this.openAlbums,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@ export default {
|
|||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
expression: `genre is "${this.item.name}" and media_kind is ${this.media_kind}`,
|
expression: `genre is "${this.item.name}" and media_kind is ${this.media_kind}`,
|
||||||
handler: this.open,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{ key: 'property.albums', value: this.item.album_count },
|
{ key: 'property.albums', value: this.item.album_count },
|
||||||
@ -34,16 +33,6 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'genre-albums',
|
|
||||||
params: { name: this.item.name },
|
|
||||||
query: { media_kind: this.media_kind }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal-dialog :actions="actions" :show="show" @close="$emit('close')">
|
<modal-dialog
|
||||||
|
:actions="actions"
|
||||||
|
:show="show"
|
||||||
|
:title="item.name"
|
||||||
|
@close="$emit('close')"
|
||||||
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-properties :item="item">
|
<list-properties :item="item">
|
||||||
<template v-if="buttons.length" #buttons>
|
<template v-if="buttons.length" #buttons>
|
||||||
|
@ -21,7 +21,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{ key: 'property.tracks', value: this.item.item_count },
|
{ key: 'property.tracks', value: this.item.item_count },
|
||||||
@ -35,15 +34,6 @@ export default {
|
|||||||
uris: this.uris
|
uris: this.uris
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'playlist',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,7 +17,6 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
playable() {
|
playable() {
|
||||||
return {
|
return {
|
||||||
handler: this.open,
|
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
properties: [
|
properties: [
|
||||||
{ key: 'property.owner', value: this.item.owner?.display_name },
|
{ key: 'property.owner', value: this.item.owner?.display_name },
|
||||||
@ -27,15 +26,6 @@ export default {
|
|||||||
uri: this.item.uri
|
uri: this.item.uri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
open() {
|
|
||||||
this.$emit('close')
|
|
||||||
this.$router.push({
|
|
||||||
name: 'playlist-spotify',
|
|
||||||
params: { id: this.item.id }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<modal-dialog :actions="actions" :show="show" @close="$emit('close')">
|
<modal-dialog
|
||||||
|
:actions="actions"
|
||||||
|
:show="show"
|
||||||
|
:title="item.title"
|
||||||
|
@close="$emit('close')"
|
||||||
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<list-properties :item="playable" />
|
<list-properties :item="playable" />
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user