mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 11:37:50 -05:00
[web] Fix unresponsive Spotify music page #1917
This commit is contained in:
@@ -16,9 +16,13 @@ export default {
|
||||
},
|
||||
spotify() {
|
||||
return api.get('./api/spotify').then((configuration) => {
|
||||
const sdk = SpotifyApi.withAccessToken(configuration.webapi_client_id, {
|
||||
access_token: configuration.webapi_token
|
||||
})
|
||||
const sdk = SpotifyApi.withAccessToken(
|
||||
configuration.webapi_client_id,
|
||||
{
|
||||
access_token: configuration.webapi_token
|
||||
},
|
||||
{ errorHandler: { handleErrors: () => true } }
|
||||
)
|
||||
return { api: sdk, configuration }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -56,7 +56,10 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.card-content {
|
||||
max-height: calc(100vh - var(--bulma-modal-content-spacing-tablet) - calc(4 * var(--bulma-navbar-height)));
|
||||
max-height: calc(
|
||||
100vh - var(--bulma-modal-content-spacing-tablet) -
|
||||
calc(4 * var(--bulma-navbar-height))
|
||||
);
|
||||
overflow: auto;
|
||||
}
|
||||
.fade-leave-active {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<tabs-music />
|
||||
<content-with-heading>
|
||||
<content-with-heading v-if="albums">
|
||||
<template #heading>
|
||||
<pane-title :content="{ title: $t('page.spotify.music.new-releases') }" />
|
||||
</template>
|
||||
@@ -16,7 +16,7 @@
|
||||
</router-link>
|
||||
</template>
|
||||
</content-with-heading>
|
||||
<content-with-heading>
|
||||
<content-with-heading v-if="playlists">
|
||||
<template #heading>
|
||||
<pane-title
|
||||
:content="{ title: $t('page.spotify.music.featured-playlists') }"
|
||||
@@ -34,7 +34,7 @@
|
||||
</router-link>
|
||||
</template>
|
||||
</content-with-heading>
|
||||
<content-with-heading>
|
||||
<content-with-heading v-if="artists">
|
||||
<template #heading>
|
||||
<pane-title
|
||||
:content="{ title: $t('page.spotify.music.followed-artists') }"
|
||||
@@ -84,11 +84,11 @@ export default {
|
||||
null,
|
||||
3
|
||||
)
|
||||
]).then((response) => {
|
||||
]).then(([newReleases, followedArtists, featuredPlaylists]) => {
|
||||
next((vm) => {
|
||||
vm.albums = response[0].albums.items
|
||||
vm.artists = response[1].artists.items
|
||||
vm.playlists = response[2].playlists.items
|
||||
vm.albums = newReleases.albums.items
|
||||
vm.artists = followedArtists?.artists.items
|
||||
vm.playlists = featuredPlaylists.playlists.items
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user