Yield generated for e26fe4c8-24ae-49e7-baf7-feda92abc026
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

76 lines
1.7 KiB

import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
export default new Router({
routes: [
{
path: "/",
component: () => import("@/views/Home"),
children: [
{
path: "",
name: "home",
component: () => import("@/views/HomeGlobal")
},
{
path: "my-feed",
name: "home-my-feed",
component: () => import("@/views/HomeMyFeed")
},
{
path: "tag/:tag",
name: "home-tag",
component: () => import("@/views/HomeTag")
}
]
},
{
name: "login",
path: "/login",
component: () => import("@/views/Login")
},
{
name: "register",
path: "/register",
component: () => import("@/views/Register")
},
{
name: "settings",
path: "/settings",
component: () => import("@/views/Settings")
},
// Handle child routes with a default, by giving the name to the
// child.
// SO: https://github.com/vuejs/vue-router/issues/777
{
path: "/@:username",
component: () => import("@/views/Profile"),
children: [
{
path: "",
name: "profile",
component: () => import("@/views/ProfileArticles")
},
{
name: "profile-favorites",
path: "favorites",
component: () => import("@/views/ProfileFavorited")
}
]
},
{
name: "article",
path: "/articles/:slug",
component: () => import("@/views/Article"),
props: true
},
{
name: "article-edit",
path: "/editor/:slug?",
props: true,
component: () => import("@/views/ArticleEdit")
}
]
});