From f59f15e370b9e9294d43c6e03d0ad25b6652e339 Mon Sep 17 00:00:00 2001 From: marcsello Date: Thu, 26 Nov 2020 22:13:32 +0100 Subject: [PATCH] Added the almighty back button --- src/views/Collection.vue | 7 +++++-- src/views/Item.vue | 14 +++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/views/Collection.vue b/src/views/Collection.vue index e32ab72..b05c189 100644 --- a/src/views/Collection.vue +++ b/src/views/Collection.vue @@ -2,7 +2,10 @@ -

Collection: {{ collectionName }}

+

+ + Collection: {{ collectionName }} +

@@ -62,7 +65,7 @@ export default { }, methods: { rowClicked(data) { - this.$router.push({name: 'Item', params: {id: data.id}}); + this.$router.push({name: 'Item', params: {id: data.id}, query: {collection: this.$route.params.id}}); }, startPlayer(spotify_id) { this.$store.dispatch('openPlayer', spotify_id); diff --git a/src/views/Item.vue b/src/views/Item.vue index fb6fb74..a1746a6 100644 --- a/src/views/Item.vue +++ b/src/views/Item.vue @@ -2,7 +2,12 @@ -

Item

+

+ + + + {{ songInfo.type | capitalize }} +

@@ -71,6 +76,13 @@ export default { return ""; } } + }, + filters: { + capitalize(value) { + if (!value) return '' + value = value.toString() + return value.charAt(0).toUpperCase() + value.slice(1) + } } }