Added collections loading

This commit is contained in:
2020-11-26 04:44:55 +01:00
parent f85f16e2a5
commit 31f8cffec1
10 changed files with 167 additions and 43 deletions

View File

@@ -1,6 +1,8 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'
import Collections from '@/views/Collections.vue'
import Collection from "@/views/Collection";
import Track from "@/views/Track";
import Login from "@/views/Login";
@@ -11,8 +13,28 @@ Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home,
name: 'Collections',
component: Collections,
meta: {
allowVisit(authorized) {
return authorized;
}
}
},
{
path: '/collection/:id',
name: 'Collection',
component: Collection,
meta: {
allowVisit(authorized) {
return authorized;
}
}
},
{
path: '/track/:id',
name: 'Track',
component: Track,
meta: {
allowVisit(authorized) {
return authorized;
@@ -62,7 +84,7 @@ router.beforeEach((to, from, next) => {
}
if (authorized) {
next({name: 'Home'})
next({name: 'Collections'})
} else {
next({name: 'Login'})
}