[web] Fix modal dialogs not closing when opening artist or album page and renaming of views

Whenever an artist or album page is opened from a modal dialog, the latter is properly closed. Moreover, the views have been renamed for better maintainability.
This commit is contained in:
Alain Nussbaumer
2023-07-18 15:19:24 +02:00
parent 34ea8115a8
commit 9d62c94d86
12 changed files with 81 additions and 76 deletions

View File

@@ -23,7 +23,7 @@
<script>
export default {
name: 'SpotifyListItemAlbum',
name: 'ListItemAlbumSpotify',
props: ['album']
}
</script>

View File

@@ -11,7 +11,7 @@
<script>
export default {
name: 'SpotifyListItemArtist',
name: 'ListItemArtistSpotify',
props: ['artist'],
methods: {

View File

@@ -43,7 +43,7 @@
import webapi from '@/webapi'
export default {
name: 'SpotifyListItemTrack',
name: 'ListItemTrackSpotify',
props: ['track', 'position', 'context_uri'],
methods: {
play() {

View File

@@ -92,7 +92,7 @@ import CoverArtwork from '@/components/CoverArtwork.vue'
import webapi from '@/webapi'
export default {
name: 'SpotifyModalDialogAlbum',
name: 'ModalDialogAlbumSpotify',
components: { CoverArtwork },
props: ['show', 'album'],
emits: ['close'],
@@ -129,6 +129,7 @@ export default {
},
open_album() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-album',
params: { id: this.album.id }
@@ -136,6 +137,7 @@ export default {
},
open_artist() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-artist',
params: { id: this.album.artists[0].id }

View File

@@ -74,7 +74,7 @@
import webapi from '@/webapi'
export default {
name: 'SpotifyModalDialogArtist',
name: 'ModalDialogArtistSpotify',
props: ['show', 'artist'],
emits: ['close'],
@@ -95,6 +95,7 @@ export default {
},
open_artist() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-artist',
params: { id: this.artist.id }

View File

@@ -109,7 +109,7 @@
import webapi from '@/webapi'
export default {
name: 'SpotifyModalDialogTrack',
name: 'ModalDialogTrackSpotify',
props: ['show', 'track', 'album'],
emits: ['close'],
@@ -130,6 +130,7 @@ export default {
},
open_album() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-album',
params: { id: this.album.id }
@@ -137,6 +138,7 @@ export default {
},
open_artist() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-artist',
params: { id: this.album.artists[0].id }