From 6a63392b0976cbfff21d46219ee25c9d3102a7d6 Mon Sep 17 00:00:00 2001 From: marcsello Date: Thu, 26 Nov 2020 06:42:04 +0100 Subject: [PATCH] Added track listing --- src/App.vue | 8 ++- src/assets/music_placeholder.png | Bin 0 -> 10243 bytes src/components/CollectionsListElement.vue | 2 +- src/router/index.js | 5 ++ src/views/Collection.vue | 71 +++++++++++++++++++++- src/views/Collections.vue | 2 +- 6 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 src/assets/music_placeholder.png diff --git a/src/App.vue b/src/App.vue index dcf3b54..08ab759 100644 --- a/src/App.vue +++ b/src/App.vue @@ -37,8 +37,12 @@ export default { this.$api.getMyInfo().then(({name}) => { this.$store.dispatch('storeUserData', name).then(() => { - this.$router.push({name: "Collections"}).catch(() => {}); - this.$store.dispatch('setAppReady'); + if (this.$route.path === '/login') { + // TODO: ez igy nagyon gagyi solution + this.$router.push({name: "Collections"}).catch(() => { + }); + } + this.$store.dispatch('setAppReady'); }); diff --git a/src/assets/music_placeholder.png b/src/assets/music_placeholder.png new file mode 100644 index 0000000000000000000000000000000000000000..73ecf84c127792421be1defd8ef180bf709d5035 GIT binary patch literal 10243 zcmcI~2|U#M`o9K|vXw2wq(Z{jw?t)WvqbhL``8)FSh6-rLLIl9LP953(%4F}Wv8+w zNk~Ho2^mFpe$RJC=eoap&OP`3U%!8^*Lj_p@AvsU+vj=S&oW|88ysV0;b)bSwyG@J@t4J6{~#5l6f|4t>JY&KYNnvvWM}(}+`t z69KL!76c1@Jv9fsr?eeHBOT=F4X5eo)HQ>=?Ht^31hhTQ+12Zi$W(ci2-?;0kchdW zzKp)N7S6@>c(5<-Ot688L$JGps-uXe23kEx4H$Uh2zKZoPY*9YwV*>HRK9BP8F`Em zK~qTx?uSHZN?GWiMr+}HacD(pMJWdvIa#!_sN7ig9!`_ln#`a#``*BWK~sFF*0%(IXNky zkn%h4MX(E!^77mBlY=(S&%xK#o8XG~LL(gQ?D77DLn5Fl%>++xef{4Vd-<(93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gpPrB-cj3&{{s!TUG4w? literal 0 HcmV?d00001 diff --git a/src/components/CollectionsListElement.vue b/src/components/CollectionsListElement.vue index 6e34046..b442592 100644 --- a/src/components/CollectionsListElement.vue +++ b/src/components/CollectionsListElement.vue @@ -18,7 +18,7 @@ export default { }, methods: { performClick() { - this.$emit('clicked'); + this.$emit('click'); } } } diff --git a/src/router/index.js b/src/router/index.js index 00fa92b..c28e990 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -74,6 +74,11 @@ const router = new VueRouter({ router.beforeEach((to, from, next) => { + if (!store.state.appReady) { + next(); + return; + } + const authorized = store.getters.isLoggedIn; const visitAllowed = to.matched.some(record => record.meta.allowVisit(authorized)) diff --git a/src/views/Collection.vue b/src/views/Collection.vue index 28dc7a5..13acffb 100644 --- a/src/views/Collection.vue +++ b/src/views/Collection.vue @@ -1,10 +1,77 @@ diff --git a/src/views/Collections.vue b/src/views/Collections.vue index 64ed4ec..8ebec6c 100644 --- a/src/views/Collections.vue +++ b/src/views/Collections.vue @@ -27,7 +27,7 @@ export default { }, methods: { openCollection(id) { - console.log(id); + this.$router.push({name: "Collection", params: {id}}) } }, mounted() {