[web] Use named route for Spotify playlists

Switching to named routes in order to reduce future maintenance.
This commit is contained in:
Alain Nussbaumer 2023-07-10 15:46:49 +02:00
parent 4b62e85c95
commit c8488f999b
3 changed files with 16 additions and 16 deletions

View File

@ -216,7 +216,7 @@
<p class="title is-4" v-text="$t('page.spotify.search.playlists')" /> <p class="title is-4" v-text="$t('page.spotify.search.playlists')" />
</template> </template>
<template #content> <template #content>
<spotify-list-item-playlist <list-item-playlist-spotify
v-for="playlist in playlists.items" v-for="playlist in playlists.items"
:key="playlist.id" :key="playlist.id"
:playlist="playlist" :playlist="playlist"
@ -230,7 +230,7 @@
/> />
</a> </a>
</template> </template>
</spotify-list-item-playlist> </list-item-playlist-spotify>
<VueEternalLoading <VueEternalLoading
v-if="query.type === 'playlist'" v-if="query.type === 'playlist'"
:load="search_playlists_next" :load="search_playlists_next"
@ -272,11 +272,11 @@ import * as types from '@/store/mutation_types'
import ContentText from '@/templates/ContentText.vue' import ContentText from '@/templates/ContentText.vue'
import ContentWithHeading from '@/templates/ContentWithHeading.vue' import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import CoverArtwork from '@/components/CoverArtwork.vue' import CoverArtwork from '@/components/CoverArtwork.vue'
import ListItemPlaylistSpotify from '@/components/ListItemPlaylistSpotify.vue'
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue' import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
import SpotifyListItemAlbum from '@/components/SpotifyListItemAlbum.vue' import SpotifyListItemAlbum from '@/components/SpotifyListItemAlbum.vue'
import SpotifyListItemArtist from '@/components/SpotifyListItemArtist.vue' import SpotifyListItemArtist from '@/components/SpotifyListItemArtist.vue'
import SpotifyListItemTrack from '@/components/SpotifyListItemTrack.vue' import SpotifyListItemTrack from '@/components/SpotifyListItemTrack.vue'
import SpotifyListItemPlaylist from '@/components/SpotifyListItemPlaylist.vue'
import SpotifyModalDialogAlbum from '@/components/SpotifyModalDialogAlbum.vue' import SpotifyModalDialogAlbum from '@/components/SpotifyModalDialogAlbum.vue'
import SpotifyModalDialogArtist from '@/components/SpotifyModalDialogArtist.vue' import SpotifyModalDialogArtist from '@/components/SpotifyModalDialogArtist.vue'
import SpotifyModalDialogTrack from '@/components/SpotifyModalDialogTrack.vue' import SpotifyModalDialogTrack from '@/components/SpotifyModalDialogTrack.vue'
@ -293,10 +293,10 @@ export default {
ContentText, ContentText,
ContentWithHeading, ContentWithHeading,
CoverArtwork, CoverArtwork,
ListItemPlaylistSpotify,
ModalDialogPlaylistSpotify, ModalDialogPlaylistSpotify,
SpotifyListItemAlbum, SpotifyListItemAlbum,
SpotifyListItemArtist, SpotifyListItemArtist,
SpotifyListItemPlaylist,
SpotifyListItemTrack, SpotifyListItemTrack,
SpotifyModalDialogAlbum, SpotifyModalDialogAlbum,
SpotifyModalDialogArtist, SpotifyModalDialogArtist,

View File

@ -60,7 +60,7 @@
/> />
</template> </template>
<template #content> <template #content>
<spotify-list-item-playlist <list-item-playlist-spotify
v-for="playlist in featured_playlists" v-for="playlist in featured_playlists"
:key="playlist.id" :key="playlist.id"
:playlist="playlist" :playlist="playlist"
@ -74,7 +74,7 @@
/> />
</a> </a>
</template> </template>
</spotify-list-item-playlist> </list-item-playlist-spotify>
<modal-dialog-playlist-spotify <modal-dialog-playlist-spotify
:show="show_playlist_details_modal" :show="show_playlist_details_modal"
:playlist="selected_playlist" :playlist="selected_playlist"
@ -97,16 +97,16 @@
</template> </template>
<script> <script>
import * as types from '@/store/mutation_types'
import ContentWithHeading from '@/templates/ContentWithHeading.vue' import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import TabsMusic from '@/components/TabsMusic.vue' import CoverArtwork from '@/components/CoverArtwork.vue'
import ListItemPlaylistSpotify from '@/components/ListItemPlaylistSpotify.vue'
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue' import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
import SpotifyListItemAlbum from '@/components/SpotifyListItemAlbum.vue' import SpotifyListItemAlbum from '@/components/SpotifyListItemAlbum.vue'
import SpotifyListItemPlaylist from '@/components/SpotifyListItemPlaylist.vue'
import SpotifyModalDialogAlbum from '@/components/SpotifyModalDialogAlbum.vue' import SpotifyModalDialogAlbum from '@/components/SpotifyModalDialogAlbum.vue'
import CoverArtwork from '@/components/CoverArtwork.vue'
import store from '@/store'
import * as types from '@/store/mutation_types'
import SpotifyWebApi from 'spotify-web-api-js' import SpotifyWebApi from 'spotify-web-api-js'
import store from '@/store'
import TabsMusic from '@/components/TabsMusic.vue'
const dataObject = { const dataObject = {
load(to) { load(to) {
@ -147,9 +147,9 @@ export default {
components: { components: {
ContentWithHeading, ContentWithHeading,
CoverArtwork, CoverArtwork,
ListItemPlaylistSpotify,
ModalDialogPlaylistSpotify, ModalDialogPlaylistSpotify,
SpotifyListItemAlbum, SpotifyListItemAlbum,
SpotifyListItemPlaylist,
SpotifyModalDialogAlbum, SpotifyModalDialogAlbum,
TabsMusic TabsMusic
}, },

View File

@ -9,7 +9,7 @@
/> />
</template> </template>
<template #content> <template #content>
<spotify-list-item-playlist <list-item-playlist-spotify
v-for="playlist in featured_playlists" v-for="playlist in featured_playlists"
:key="playlist.id" :key="playlist.id"
:playlist="playlist" :playlist="playlist"
@ -23,7 +23,7 @@
/> />
</a> </a>
</template> </template>
</spotify-list-item-playlist> </list-item-playlist-spotify>
<modal-dialog-playlist-spotify <modal-dialog-playlist-spotify
:show="show_playlist_details_modal" :show="show_playlist_details_modal"
:playlist="selected_playlist" :playlist="selected_playlist"
@ -37,8 +37,8 @@
<script> <script>
import * as types from '@/store/mutation_types' import * as types from '@/store/mutation_types'
import ContentWithHeading from '@/templates/ContentWithHeading.vue' import ContentWithHeading from '@/templates/ContentWithHeading.vue'
import ListItemPlaylistSpotify from '@/components/ListItemPlaylistSpotify.vue'
import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue' import ModalDialogPlaylistSpotify from '@/components/ModalDialogPlaylistSpotify.vue'
import SpotifyListItemPlaylist from '@/components/SpotifyListItemPlaylist.vue'
import SpotifyWebApi from 'spotify-web-api-js' import SpotifyWebApi from 'spotify-web-api-js'
import store from '@/store' import store from '@/store'
import TabsMusic from '@/components/TabsMusic.vue' import TabsMusic from '@/components/TabsMusic.vue'
@ -68,8 +68,8 @@ export default {
name: 'SpotifyPageBrowseFeaturedPlaylists', name: 'SpotifyPageBrowseFeaturedPlaylists',
components: { components: {
ContentWithHeading, ContentWithHeading,
ListItemPlaylistSpotify,
ModalDialogPlaylistSpotify, ModalDialogPlaylistSpotify,
SpotifyListItemPlaylist,
TabsMusic TabsMusic
}, },