mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Lazy-load dashboard components
This commit is contained in:
parent
7deae18ca7
commit
c0603a73fc
1 changed files with 3 additions and 6 deletions
|
@ -3,9 +3,6 @@ import VueRouter, { RouteConfig } from "vue-router";
|
||||||
import Splash from "./components/Splash.vue";
|
import Splash from "./components/Splash.vue";
|
||||||
import Login from "./components/Login.vue";
|
import Login from "./components/Login.vue";
|
||||||
import LoginCallback from "./components/LoginCallback.vue";
|
import LoginCallback from "./components/LoginCallback.vue";
|
||||||
import DashboardGuildList from "./components/DashboardGuildList.vue";
|
|
||||||
import DashboardGuildConfigEditor from "./components/DashboardGuildConfigEditor.vue";
|
|
||||||
import Dashboard from "./components/Dashboard.vue";
|
|
||||||
import { authGuard, authRedirectGuard, loginCallbackGuard } from "./auth";
|
import { authGuard, authRedirectGuard, loginCallbackGuard } from "./auth";
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
|
@ -20,16 +17,16 @@ export const router = new VueRouter({
|
||||||
// Dashboard
|
// Dashboard
|
||||||
{
|
{
|
||||||
path: "/dashboard",
|
path: "/dashboard",
|
||||||
component: Dashboard,
|
component: () => import("./components/Dashboard.vue"),
|
||||||
beforeEnter: authGuard,
|
beforeEnter: authGuard,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "",
|
path: "",
|
||||||
component: DashboardGuildList,
|
component: () => import("./components/DashboardGuildList.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "guilds/:guildId/config",
|
path: "guilds/:guildId/config",
|
||||||
component: DashboardGuildConfigEditor,
|
component: () => import("./components/DashboardGuildConfigEditor.vue"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue