From 74926114e49630c5e2df03997ea8424db4140531 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 12 Dec 2017 23:03:58 +0100 Subject: [PATCH] Updated library routes to handle both detail and browse views --- front/src/components/audio/Player.vue | 6 +++--- front/src/components/audio/SearchBar.vue | 6 +++--- front/src/components/audio/album/Card.vue | 6 +++--- front/src/components/audio/artist/Card.vue | 4 ++-- front/src/components/audio/track/Table.vue | 6 +++--- front/src/components/library/Album.vue | 2 +- front/src/components/library/Track.vue | 4 ++-- front/src/router/index.js | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index 72b7d7ef9..423c9d12f 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -7,14 +7,14 @@
- + {{ queue.currentTrack.title }}
- + {{ queue.currentTrack.artist.name }} / - + {{ queue.currentTrack.album.title }}
diff --git a/front/src/components/audio/SearchBar.vue b/front/src/components/audio/SearchBar.vue index 6f4629296..2324c8839 100644 --- a/front/src/components/audio/SearchBar.vue +++ b/front/src/components/audio/SearchBar.vue @@ -35,7 +35,7 @@ export default { let categories = [ { code: 'artists', - route: 'library.artist', + route: 'library.artists.detail', name: 'Artist', getTitle (r) { return r.name @@ -46,7 +46,7 @@ export default { }, { code: 'albums', - route: 'library.album', + route: 'library.albums.detail', name: 'Album', getTitle (r) { return r.title @@ -57,7 +57,7 @@ export default { }, { code: 'tracks', - route: 'library.track', + route: 'library.tracks.detail', name: 'Track', getTitle (r) { return r.title diff --git a/front/src/components/audio/album/Card.vue b/front/src/components/audio/album/Card.vue index 7fd60d963..6902612dd 100644 --- a/front/src/components/audio/album/Card.vue +++ b/front/src/components/audio/album/Card.vue @@ -6,10 +6,10 @@
- {{ album.title }} + {{ album.title }}
- By + By {{ album.artist.name }}
@@ -21,7 +21,7 @@ - + diff --git a/front/src/components/audio/artist/Card.vue b/front/src/components/audio/artist/Card.vue index a9701c07e..8a02163fb 100644 --- a/front/src/components/audio/artist/Card.vue +++ b/front/src/components/audio/artist/Card.vue @@ -2,7 +2,7 @@
- + {{ artist.name }}
@@ -15,7 +15,7 @@ - + {{ album.title }}
{{ album.tracks.length }} tracks diff --git a/front/src/components/audio/track/Table.vue b/front/src/components/audio/track/Table.vue index e9beaa05a..ac903ad52 100644 --- a/front/src/components/audio/track/Table.vue +++ b/front/src/components/audio/track/Table.vue @@ -20,7 +20,7 @@ - + @@ -28,12 +28,12 @@ - + {{ track.artist.name }} - + {{ track.album.title }} diff --git a/front/src/components/library/Album.vue b/front/src/components/library/Album.vue index cf3403400..dcfea5600 100644 --- a/front/src/components/library/Album.vue +++ b/front/src/components/library/Album.vue @@ -12,7 +12,7 @@ {{ album.title }}
Album containing {{ album.tracks.length }} tracks, - by + by {{ album.artist.name }}
diff --git a/front/src/components/library/Track.vue b/front/src/components/library/Track.vue index 3c627c13c..36a76e822 100644 --- a/front/src/components/library/Track.vue +++ b/front/src/components/library/Track.vue @@ -12,10 +12,10 @@ {{ track.title }}
From album - + {{ track.album.title }} - by + by {{ track.artist.name }}
diff --git a/front/src/router/index.js b/front/src/router/index.js index b3d90731f..cb8f9c1b5 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -51,9 +51,9 @@ export default new Router({ component: Library, children: [ { path: '', component: LibraryHome }, - { path: 'artist/:id', name: 'library.artist', component: LibraryArtist, props: true }, - { path: 'album/:id', name: 'library.album', component: LibraryAlbum, props: true }, - { path: 'track/:id', name: 'library.track', component: LibraryTrack, props: true }, + { path: 'artists/:id', name: 'library.artists.detail', component: LibraryArtist, props: true }, + { path: 'albums/:id', name: 'library.albums.detail', component: LibraryAlbum, props: true }, + { path: 'tracks/:id', name: 'library.tracks.detail', component: LibraryTrack, props: true }, { path: 'import/launch', name: 'library.import.launch',