diff --git a/app/assets/router/routes.ts b/app/assets/router/routes.ts index 0730a18..2ea1483 100644 --- a/app/assets/router/routes.ts +++ b/app/assets/router/routes.ts @@ -2,6 +2,11 @@ const AdminDashboardRoutes = [ { path: 'dashboard', name: 'admin.dashboard', + meta: { + auth: { + redirect: { name: 'account.login' }, + } + }, component: () => import('../views/DashboardView.vue') } ] @@ -118,7 +123,7 @@ const AdminUsersRoutes = [ } ] -export default [ +const AdminRoutes = [ ...AdminDashboardRoutes, ...AdminActivitiesRoutes, ...AdminGroupsRoutes, @@ -127,6 +132,8 @@ export default [ ...AdminUsersRoutes, ] +export default AdminRoutes + export { AdminDashboardRoutes, AdminActivitiesRoutes, diff --git a/dist/router/routes.d.ts b/dist/router/routes.d.ts index f367438..f4a6181 100644 --- a/dist/router/routes.d.ts +++ b/dist/router/routes.d.ts @@ -1,6 +1,13 @@ declare const AdminDashboardRoutes: { path: string; name: string; + meta: { + auth: { + redirect: { + name: string; + }; + }; + }; component: () => Promise; }[]; declare const AdminActivitiesRoutes: { @@ -111,10 +118,17 @@ declare const AdminUsersRoutes: { component: () => Promise; }[]; }[]; -declare const _default: { +declare const AdminRoutes: { path: string; name: string; + meta: { + auth: { + redirect: { + name: string; + }; + }; + }; component: () => Promise; }[]; -export default _default; +export default AdminRoutes; export { AdminDashboardRoutes, AdminActivitiesRoutes, AdminGroupsRoutes, AdminPermissionsRoutes, AdminRolesRoutes, AdminUsersRoutes }; diff --git a/dist/routes.cjs b/dist/routes.cjs index 652a1cf..2032324 100644 --- a/dist/routes.cjs +++ b/dist/routes.cjs @@ -1 +1 @@ -"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=[{path:"dashboard",name:"admin.dashboard",component:()=>Promise.resolve().then(()=>require("./DashboardView-CZ2sKm5M.cjs"))}],o=[{path:"activities",name:"admin.activities",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./ActivitiesView-kaWFEO4i.cjs"))}],t=[{path:"groups",name:"admin.groups",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./GroupsView-BI4KKM8s.cjs")),children:[{path:"g/:slug",name:"account.group",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./GroupView-BrWTling.cjs"))}]}],n=[{path:"permissions",name:"admin.permissions",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./PermissionsView-ftOWB-4K.cjs")),children:[{path:"p/:id",name:"account.permission",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./PermissionView-CUKDO1AM.cjs"))}]}],r=[{path:"roles",name:"admin.roles",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./RolesView-ByDmJ9us.cjs")),children:[{path:"r/:slug",name:"account.role",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./RoleView-CWK0-zrt.cjs"))}]}],s=[{path:"users",name:"admin.users",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./UsersView-C0bG-VhA.cjs")),children:[{path:"u/:user_name",name:"account.user",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./UserView-BeTp1kMD.cjs"))}]}],i=[...e,...o,...t,...n,...r,...s];exports.AdminActivitiesRoutes=o;exports.AdminDashboardRoutes=e;exports.AdminGroupsRoutes=t;exports.AdminPermissionsRoutes=n;exports.AdminRolesRoutes=r;exports.AdminUsersRoutes=s;exports.default=i; +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=[{path:"dashboard",name:"admin.dashboard",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./DashboardView-CZ2sKm5M.cjs"))}],t=[{path:"activities",name:"admin.activities",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./ActivitiesView-kaWFEO4i.cjs"))}],n=[{path:"groups",name:"admin.groups",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./GroupsView-BI4KKM8s.cjs")),children:[{path:"g/:slug",name:"account.group",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./GroupView-BrWTling.cjs"))}]}],o=[{path:"permissions",name:"admin.permissions",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./PermissionsView-ftOWB-4K.cjs")),children:[{path:"p/:id",name:"account.permission",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./PermissionView-CUKDO1AM.cjs"))}]}],r=[{path:"roles",name:"admin.roles",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./RolesView-ByDmJ9us.cjs")),children:[{path:"r/:slug",name:"account.role",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./RoleView-CWK0-zrt.cjs"))}]}],s=[{path:"users",name:"admin.users",meta:{auth:{redirect:{name:"account.login"}}},component:()=>Promise.resolve().then(()=>require("./UsersView-C0bG-VhA.cjs")),children:[{path:"u/:user_name",name:"account.user",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./UserView-BeTp1kMD.cjs"))}]}],i=[...e,...t,...n,...o,...r,...s];exports.AdminActivitiesRoutes=t;exports.AdminDashboardRoutes=e;exports.AdminGroupsRoutes=n;exports.AdminPermissionsRoutes=o;exports.AdminRolesRoutes=r;exports.AdminUsersRoutes=s;exports.default=i; diff --git a/dist/routes.js b/dist/routes.js index d4c6b27..811a7c8 100644 --- a/dist/routes.js +++ b/dist/routes.js @@ -2,6 +2,11 @@ const e = [ { path: "dashboard", name: "admin.dashboard", + meta: { + auth: { + redirect: { name: "account.login" } + } + }, component: () => import("./DashboardView-BbtHCt79.js") } ], t = [