From e89d625f15f28ce5325d95feea787326da71f613 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Wed, 28 Feb 2024 15:53:03 +0100 Subject: [PATCH] [web] Streamline code between pages --- web-src/src/components/ModalDialogAlbumSpotify.vue | 6 ++---- web-src/src/pages/PageAlbumSpotify.vue | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/web-src/src/components/ModalDialogAlbumSpotify.vue b/web-src/src/components/ModalDialogAlbumSpotify.vue index 55b95667..b7423f93 100644 --- a/web-src/src/components/ModalDialogAlbumSpotify.vue +++ b/web-src/src/components/ModalDialogAlbumSpotify.vue @@ -103,13 +103,11 @@ export default { } }, - computed: { + methods: { artwork_url(album) { return album.images?.[0]?.url || '' - } - }, + }, - methods: { play() { this.$emit('close') webapi.player_play_uri(this.album.uri, false) diff --git a/web-src/src/pages/PageAlbumSpotify.vue b/web-src/src/pages/PageAlbumSpotify.vue index db071cef..bc1b2947 100644 --- a/web-src/src/pages/PageAlbumSpotify.vue +++ b/web-src/src/pages/PageAlbumSpotify.vue @@ -128,13 +128,11 @@ export default { } }, - computed: { + methods: { artwork_url(album) { return album.images?.[0]?.url || '' - } - }, + }, - methods: { open_artist() { this.$router.push({ name: 'music-spotify-artist',