From 1e7f1eaaf853c312075f2288687678c082943bcc Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Sat, 19 Mar 2016 12:37:58 -0400 Subject: [PATCH 1/2] each song item can now be used to navigate to its artist or album view --- .../assets/js/components/shared/song-item.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/shared/song-item.vue b/resources/assets/js/components/shared/song-item.vue index c9dc32ff..a13af981 100644 --- a/resources/assets/js/components/shared/song-item.vue +++ b/resources/assets/js/components/shared/song-item.vue @@ -5,8 +5,8 @@ :class="{ selected: selected, playing: song.playbackState === 'playing' || song.playbackState === 'paused' }" > {{ song.title }} - {{ song.album.artist.name }} - {{ song.album.name }} + {{ song.album.artist.name }} + {{ song.album.name }} {{ song.fmtLength }} @@ -77,6 +77,20 @@ deselect() { this.selected = false; }, + + /** + * Load the album details screen. + */ + viewAlbumDetails() { + this.$root.loadAlbum(this.song.album); + }, + + /** + * Load the artist details screen. + */ + viewArtistDetails() { + this.$root.loadArtist(this.song.artist); + }, }, }; From 8c7dae6a325f762c456a23af5114021706ca2c90 Mon Sep 17 00:00:00 2001 From: alex-phillips Date: Sat, 19 Mar 2016 13:45:23 -0400 Subject: [PATCH 2/2] fixed reference to song's artist --- resources/assets/js/components/shared/song-item.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/components/shared/song-item.vue b/resources/assets/js/components/shared/song-item.vue index a13af981..d442a445 100644 --- a/resources/assets/js/components/shared/song-item.vue +++ b/resources/assets/js/components/shared/song-item.vue @@ -89,7 +89,7 @@ * Load the artist details screen. */ viewArtistDetails() { - this.$root.loadArtist(this.song.artist); + this.$root.loadArtist(this.song.album.artist); }, }, };