Upgrade types for Vue async component in router
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
6a68198867
commit
6c0e503319
@ -1,5 +1,5 @@
|
||||
import { RouteConfig } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum ActorRouteName {
|
||||
GROUP = "Group",
|
||||
@ -12,14 +12,14 @@ export const actorRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/groups/create",
|
||||
name: ActorRouteName.CREATE_GROUP,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "CreateGroup" */ "@/views/Group/Create.vue"),
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername",
|
||||
name: ActorRouteName.GROUP,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Group" */ "@/views/Group/Group.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
@ -27,7 +27,7 @@ export const actorRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/groups/me",
|
||||
name: ActorRouteName.MY_GROUPS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "MyGroups" */ "@/views/Group/MyGroups.vue"),
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { RouteConfig } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum DiscussionRouteName {
|
||||
DISCUSSION_LIST = "DISCUSSION_LIST",
|
||||
@ -11,7 +11,7 @@ export const discussionRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/@:preferredUsername/discussions",
|
||||
name: DiscussionRouteName.DISCUSSION_LIST,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "DiscussionsList" */ "@/views/Discussions/DiscussionsList.vue"
|
||||
),
|
||||
@ -21,7 +21,7 @@ export const discussionRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/@:preferredUsername/discussions/new",
|
||||
name: DiscussionRouteName.CREATE_DISCUSSION,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "CreateDiscussion" */ "@/views/Discussions/Create.vue"
|
||||
),
|
||||
@ -31,7 +31,7 @@ export const discussionRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/@:preferredUsername/c/:slug/:comment_id?",
|
||||
name: DiscussionRouteName.DISCUSSION,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Discussion" */ "@/views/Discussions/Discussion.vue"
|
||||
),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { RouteConfig } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum ErrorRouteName {
|
||||
ERROR = "Error",
|
||||
@ -9,7 +9,7 @@ export const errorRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/error",
|
||||
name: ErrorRouteName.ERROR,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Error" */ "../views/Error.vue"),
|
||||
},
|
||||
];
|
||||
|
@ -1,15 +1,15 @@
|
||||
import { RouteConfig, Route } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
const participations = (): Promise<EsModuleComponent> =>
|
||||
const participations = (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "participations" */ "@/views/Event/Participants.vue"
|
||||
);
|
||||
const editEvent = (): Promise<EsModuleComponent> =>
|
||||
const editEvent = (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "edit-event" */ "@/views/Event/Edit.vue");
|
||||
const event = (): Promise<EsModuleComponent> =>
|
||||
const event = (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "event" */ "@/views/Event/Event.vue");
|
||||
const myEvents = (): Promise<EsModuleComponent> =>
|
||||
const myEvents = (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "my-events" */ "@/views/Event/MyEvents.vue");
|
||||
|
||||
export enum EventRouteName {
|
||||
@ -31,7 +31,7 @@ export const eventRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/events/list/:location?",
|
||||
name: EventRouteName.EVENT_LIST,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "EventList" */ "@/views/Event/EventList.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
@ -83,35 +83,35 @@ export const eventRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/events/:uuid/participate",
|
||||
name: EventRouteName.EVENT_PARTICIPATE_LOGGED_OUT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../components/Participation/UnloggedParticipation.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "/events/:uuid/participate/with-account",
|
||||
name: EventRouteName.EVENT_PARTICIPATE_WITH_ACCOUNT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../components/Participation/ParticipationWithAccount.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "/events/:uuid/participate/without-account",
|
||||
name: EventRouteName.EVENT_PARTICIPATE_WITHOUT_ACCOUNT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../components/Participation/ParticipationWithoutAccount.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "/participation/email/confirm/:token",
|
||||
name: EventRouteName.EVENT_PARTICIPATE_CONFIRM,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../components/Participation/ConfirmParticipation.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "/tag/:tag",
|
||||
name: EventRouteName.TAG,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Search" */ "@/views/Search.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { RouteConfig, Route } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum GroupsRouteName {
|
||||
TODO_LISTS = "TODO_LISTS",
|
||||
@ -21,16 +21,16 @@ export enum GroupsRouteName {
|
||||
TIMELINE = "TIMELINE",
|
||||
}
|
||||
|
||||
const resourceFolder = (): Promise<EsModuleComponent> =>
|
||||
const resourceFolder = (): Promise<ImportedComponent> =>
|
||||
import("@/views/Resources/ResourceFolder.vue");
|
||||
const groupEvents = (): Promise<EsModuleComponent> =>
|
||||
const groupEvents = (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "groupEvents" */ "@/views/Event/GroupEvents.vue");
|
||||
|
||||
export const groupsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/@:preferredUsername/todo-lists",
|
||||
name: GroupsRouteName.TODO_LISTS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Todos/TodoLists.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -38,7 +38,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/todo-lists/:id",
|
||||
name: GroupsRouteName.TODO_LIST,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Todos/TodoList.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -46,7 +46,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/todo/:todoId",
|
||||
name: GroupsRouteName.TODO,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Todos/Todo.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -67,7 +67,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername/settings",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Group/Settings.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -77,20 +77,20 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "public",
|
||||
name: GroupsRouteName.GROUP_PUBLIC_SETTINGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../views/Group/GroupSettings.vue"),
|
||||
},
|
||||
{
|
||||
path: "members",
|
||||
name: GroupsRouteName.GROUP_MEMBERS_SETTINGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../views/Group/GroupMembers.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "followers",
|
||||
name: GroupsRouteName.GROUP_FOLLOWERS_SETTINGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("../views/Group/GroupFollowers.vue"),
|
||||
props: true,
|
||||
},
|
||||
@ -98,7 +98,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername/p/new",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Posts/Edit.vue"),
|
||||
props: true,
|
||||
name: GroupsRouteName.POST_CREATE,
|
||||
@ -106,7 +106,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/p/:slug/edit",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Posts/Edit.vue"),
|
||||
props: (route: Route): Record<string, unknown> => ({
|
||||
...route.params,
|
||||
@ -117,7 +117,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/p/:slug",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Posts/Post.vue"),
|
||||
props: true,
|
||||
name: GroupsRouteName.POST,
|
||||
@ -125,7 +125,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername/p",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Posts/List.vue"),
|
||||
props: true,
|
||||
name: GroupsRouteName.POSTS,
|
||||
@ -140,7 +140,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername/join",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/components/Group/JoinGroupWithAccount.vue"),
|
||||
props: true,
|
||||
name: GroupsRouteName.GROUP_JOIN,
|
||||
@ -149,7 +149,7 @@ export const groupsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/@:preferredUsername/timeline",
|
||||
name: GroupsRouteName.TIMELINE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import("@/views/Group/Timeline.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
|
@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Router, { Route } from "vue-router";
|
||||
import VueScrollTo from "vue-scrollto";
|
||||
import { PositionResult } from "vue-router/types/router.d";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
import Home from "../views/Home.vue";
|
||||
import { eventRoutes } from "./event";
|
||||
import { actorRoutes } from "./actor";
|
||||
@ -46,7 +46,7 @@ export const routes = [
|
||||
{
|
||||
path: "/search",
|
||||
name: RouteName.SEARCH,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Search" */ "@/views/Search.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
@ -60,7 +60,7 @@ export const routes = [
|
||||
{
|
||||
path: "/about",
|
||||
name: RouteName.ABOUT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "about" */ "@/views/About.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
redirect: { name: RouteName.ABOUT_INSTANCE },
|
||||
@ -68,7 +68,7 @@ export const routes = [
|
||||
{
|
||||
path: "instance",
|
||||
name: RouteName.ABOUT_INSTANCE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "about" */ "@/views/About/AboutInstance.vue"
|
||||
),
|
||||
@ -76,28 +76,28 @@ export const routes = [
|
||||
{
|
||||
path: "/terms",
|
||||
name: RouteName.TERMS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "cookies" */ "@/views/About/Terms.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: "/privacy",
|
||||
name: RouteName.PRIVACY,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "cookies" */ "@/views/About/Privacy.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: "/rules",
|
||||
name: RouteName.RULES,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "cookies" */ "@/views/About/Rules.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: "/glossary",
|
||||
name: RouteName.GLOSSARY,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "cookies" */ "@/views/About/Glossary.vue"
|
||||
),
|
||||
@ -108,14 +108,14 @@ export const routes = [
|
||||
{
|
||||
path: "/interact",
|
||||
name: RouteName.INTERACT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "interact" */ "@/views/Interact.vue"),
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: "/auth/:provider/callback",
|
||||
name: "auth-callback",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "ProviderValidation" */ "@/views/User/ProviderValidation.vue"
|
||||
),
|
||||
@ -123,7 +123,7 @@ export const routes = [
|
||||
{
|
||||
path: "/welcome/:step?",
|
||||
name: RouteName.WELCOME_SCREEN,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "WelcomeScreen" */ "@/views/User/SettingsOnboard.vue"
|
||||
),
|
||||
@ -139,7 +139,7 @@ export const routes = [
|
||||
{
|
||||
path: "/404",
|
||||
name: RouteName.PAGE_NOT_FOUND,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "PageNotFound" */ "../views/PageNotFound.vue"
|
||||
),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Route, RouteConfig } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum SettingsRouteName {
|
||||
SETTINGS = "SETTINGS",
|
||||
@ -31,7 +31,7 @@ export enum SettingsRouteName {
|
||||
export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/settings",
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Settings" */ "@/views/Settings.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -47,7 +47,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "account/general",
|
||||
name: SettingsRouteName.ACCOUNT_SETTINGS_GENERAL,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AccountSettings" */ "@/views/Settings/AccountSettings.vue"
|
||||
),
|
||||
@ -57,7 +57,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "preferences",
|
||||
name: SettingsRouteName.PREFERENCES,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Preferences" */ "@/views/Settings/Preferences.vue"
|
||||
),
|
||||
@ -67,7 +67,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "notifications",
|
||||
name: SettingsRouteName.NOTIFICATIONS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Notifications" */ "@/views/Settings/Notifications.vue"
|
||||
),
|
||||
@ -83,7 +83,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/dashboard",
|
||||
name: SettingsRouteName.ADMIN_DASHBOARD,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Dashboard" */ "@/views/Admin/Dashboard.vue"
|
||||
),
|
||||
@ -92,7 +92,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/settings",
|
||||
name: SettingsRouteName.ADMIN_SETTINGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AdminSettings" */ "@/views/Admin/Settings.vue"
|
||||
),
|
||||
@ -102,7 +102,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/users",
|
||||
name: SettingsRouteName.USERS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Users" */ "@/views/Admin/Users.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
@ -110,7 +110,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/users/:id",
|
||||
name: SettingsRouteName.ADMIN_USER_PROFILE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AdminUserProfile" */ "@/views/Admin/AdminUserProfile.vue"
|
||||
),
|
||||
@ -120,7 +120,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/profiles",
|
||||
name: SettingsRouteName.PROFILES,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AdminProfiles" */ "@/views/Admin/Profiles.vue"
|
||||
),
|
||||
@ -130,7 +130,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/profiles/:id",
|
||||
name: SettingsRouteName.ADMIN_PROFILE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AdminProfile" */ "@/views/Admin/AdminProfile.vue"
|
||||
),
|
||||
@ -140,7 +140,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/groups",
|
||||
name: SettingsRouteName.ADMIN_GROUPS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "GroupProfiles" */ "@/views/Admin/GroupProfiles.vue"
|
||||
),
|
||||
@ -150,7 +150,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "admin/groups/:id",
|
||||
name: SettingsRouteName.ADMIN_GROUP_PROFILE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "AdminGroupProfile" */ "@/views/Admin/AdminGroupProfile.vue"
|
||||
),
|
||||
@ -161,14 +161,14 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
path: "admin/relays",
|
||||
name: SettingsRouteName.RELAYS,
|
||||
redirect: { name: SettingsRouteName.RELAY_FOLLOWINGS },
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Follows" */ "@/views/Admin/Follows.vue"),
|
||||
meta: { requiredAuth: true },
|
||||
children: [
|
||||
{
|
||||
path: "followings",
|
||||
name: SettingsRouteName.RELAY_FOLLOWINGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Followings" */ "@/components/Admin/Followings.vue"
|
||||
),
|
||||
@ -177,7 +177,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "followers",
|
||||
name: SettingsRouteName.RELAY_FOLLOWERS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Followers" */ "@/components/Admin/Followers.vue"
|
||||
),
|
||||
@ -195,7 +195,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/moderation/reports/:filter?",
|
||||
name: SettingsRouteName.REPORTS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "ReportList" */ "@/views/Moderation/ReportList.vue"
|
||||
),
|
||||
@ -205,7 +205,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/moderation/report/:reportId",
|
||||
name: SettingsRouteName.REPORT,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "Report" */ "@/views/Moderation/Report.vue"
|
||||
),
|
||||
@ -215,7 +215,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/moderation/logs",
|
||||
name: SettingsRouteName.REPORT_LOGS,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "ModerationLogs" */ "@/views/Moderation/Logs.vue"
|
||||
),
|
||||
@ -231,7 +231,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/identity/create",
|
||||
name: SettingsRouteName.CREATE_IDENTITY,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "EditIdentity" */ "@/views/Account/children/EditIdentity.vue"
|
||||
),
|
||||
@ -244,7 +244,7 @@ export const settingsRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/identity/update/:identityName?",
|
||||
name: SettingsRouteName.UPDATE_IDENTITY,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "EditIdentity" */ "@/views/Account/children/EditIdentity.vue"
|
||||
),
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { beforeRegisterGuard } from "@/router/guards/register-guard";
|
||||
import { Route, RouteConfig } from "vue-router";
|
||||
import { EsModuleComponent } from "vue/types/options";
|
||||
import { ImportedComponent } from "vue/types/options";
|
||||
|
||||
export enum UserRouteName {
|
||||
REGISTER = "Register",
|
||||
@ -17,7 +17,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/register/user",
|
||||
name: UserRouteName.REGISTER,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "RegisterUser" */ "@/views/User/Register.vue"
|
||||
),
|
||||
@ -28,7 +28,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/register/profile",
|
||||
name: UserRouteName.REGISTER_PROFILE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "RegisterProfile" */ "@/views/Account/Register.vue"
|
||||
),
|
||||
@ -42,7 +42,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/resend-instructions",
|
||||
name: UserRouteName.RESEND_CONFIRMATION,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "ResendConfirmation" */ "@/views/User/ResendConfirmation.vue"
|
||||
),
|
||||
@ -52,7 +52,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/password-reset/send",
|
||||
name: UserRouteName.SEND_PASSWORD_RESET,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "SendPasswordReset" */ "@/views/User/SendPasswordReset.vue"
|
||||
),
|
||||
@ -62,7 +62,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/password-reset/:token",
|
||||
name: UserRouteName.PASSWORD_RESET,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "PasswordReset" */ "@/views/User/PasswordReset.vue"
|
||||
),
|
||||
@ -72,7 +72,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/validate/email/:token",
|
||||
name: UserRouteName.EMAIL_VALIDATE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(
|
||||
/* webpackChunkName: "EmailValidate" */ "@/views/User/EmailValidate.vue"
|
||||
),
|
||||
@ -82,7 +82,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/validate/:token",
|
||||
name: UserRouteName.VALIDATE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Validate" */ "@/views/User/Validate.vue"),
|
||||
props: true,
|
||||
meta: { requiresAuth: false },
|
||||
@ -90,7 +90,7 @@ export const userRoutes: RouteConfig[] = [
|
||||
{
|
||||
path: "/login",
|
||||
name: UserRouteName.LOGIN,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
component: (): Promise<ImportedComponent> =>
|
||||
import(/* webpackChunkName: "Login" */ "@/views/User/Login.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: false },
|
||||
|
Loading…
Reference in New Issue
Block a user