From 04041dbc99db62a8bc3a8c88169937c9a9caf5ff Mon Sep 17 00:00:00 2001 From: marcsello Date: Fri, 27 Nov 2020 00:49:21 +0100 Subject: [PATCH] Changed info displaying --- src/views/Item.vue | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/views/Item.vue b/src/views/Item.vue index 0cea6e4..5335aca 100644 --- a/src/views/Item.vue +++ b/src/views/Item.vue @@ -12,16 +12,12 @@ - +
-
-

Artist: {{ songInfo.artist }}

-
-

Album: {{ songInfo.album }}

-
-

Title: {{ songInfo.title }}

+
+
Open on Spotify!  @@ -81,7 +77,23 @@ export default { return this.songInfo.artist + ' - ' + this.songInfo.album; } return this.songInfo.album || this.songInfo.artist || this.songInfo.title; + }, + songInfoToDisplay() { + let displayData = {} + // Faszomat már a javascriptbe + if (this.songInfo.artist) { + displayData.artist = this.songInfo.artist; + } + if (this.songInfo.album) { + displayData.album = this.songInfo.album; + } + if (this.songInfo.title) { + displayData.title = this.songInfo.title; + } + + return [displayData] } + }, filters: { capitalize(value) { @@ -96,11 +108,6 @@ export default { \ No newline at end of file