2020-07-09 15:24:28 +00:00
|
|
|
import { RouteConfig } from "vue-router";
|
|
|
|
|
|
|
|
export enum DiscussionRouteName {
|
|
|
|
DISCUSSION_LIST = "DISCUSSION_LIST",
|
|
|
|
CREATE_DISCUSSION = "CREATE_DISCUSSION",
|
|
|
|
DISCUSSION = "DISCUSSION",
|
|
|
|
}
|
|
|
|
|
|
|
|
export const discussionRoutes: RouteConfig[] = [
|
|
|
|
{
|
|
|
|
path: "/@:preferredUsername/discussions",
|
|
|
|
name: DiscussionRouteName.DISCUSSION_LIST,
|
2020-10-14 16:59:36 +00:00
|
|
|
component: () =>
|
|
|
|
import(/* webpackChunkName: "DiscussionsList" */ "@/views/Discussions/DiscussionsList.vue"),
|
2020-07-09 15:24:28 +00:00
|
|
|
props: true,
|
2020-10-24 15:32:15 +00:00
|
|
|
meta: { requiredAuth: true },
|
2020-07-09 15:24:28 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/@:preferredUsername/discussions/new",
|
|
|
|
name: DiscussionRouteName.CREATE_DISCUSSION,
|
2020-10-14 16:59:36 +00:00
|
|
|
component: () =>
|
|
|
|
import(/* webpackChunkName: "CreateDiscussion" */ "@/views/Discussions/Create.vue"),
|
2020-07-09 15:24:28 +00:00
|
|
|
props: true,
|
|
|
|
meta: { requiredAuth: true },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/@:preferredUsername/c/:slug/:comment_id?",
|
|
|
|
name: DiscussionRouteName.DISCUSSION,
|
2020-10-14 16:59:36 +00:00
|
|
|
component: () =>
|
|
|
|
import(/* webpackChunkName: "Discussion" */ "@/views/Discussions/Discussion.vue"),
|
2020-07-09 15:24:28 +00:00
|
|
|
props: true,
|
2020-10-24 15:32:15 +00:00
|
|
|
meta: { requiredAuth: true },
|
2020-07-09 15:24:28 +00:00
|
|
|
},
|
|
|
|
];
|