mirror of
https://github.com/louislam/dockge.git
synced 2026-05-22 06:22:17 +00:00
Init (#1)
This commit is contained in:
90
frontend/src/router.ts
Normal file
90
frontend/src/router.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
|
||||
import Layout from "./layouts/Layout.vue";
|
||||
import Setup from "./pages/Setup.vue";
|
||||
import Dashboard from "./pages/Dashboard.vue";
|
||||
import DashboardHome from "./pages/DashboardHome.vue";
|
||||
import Console from "./pages/Console.vue";
|
||||
import Compose from "./pages/Compose.vue";
|
||||
import ContainerTerminal from "./pages/ContainerTerminal.vue";
|
||||
|
||||
const Settings = () => import("./pages/Settings.vue");
|
||||
|
||||
// Settings - Sub Pages
|
||||
import Appearance from "./components/settings/Appearance.vue";
|
||||
import General from "./components/settings/General.vue";
|
||||
const Security = () => import("./components/settings/Security.vue");
|
||||
import About from "./components/settings/About.vue";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: "/empty",
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: Dashboard,
|
||||
children: [
|
||||
{
|
||||
name: "DashboardHome",
|
||||
path: "/",
|
||||
component: DashboardHome,
|
||||
children: [
|
||||
{
|
||||
path: "/compose",
|
||||
component: Compose,
|
||||
},
|
||||
{
|
||||
path: "/compose/:stackName",
|
||||
name: "compose",
|
||||
component: Compose,
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: "/terminal/:stackName/:serviceName/:type",
|
||||
component: ContainerTerminal,
|
||||
name: "containerTerminal",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/console",
|
||||
component: Console,
|
||||
},
|
||||
{
|
||||
path: "/settings",
|
||||
component: Settings,
|
||||
children: [
|
||||
{
|
||||
path: "general",
|
||||
component: General,
|
||||
},
|
||||
{
|
||||
path: "appearance",
|
||||
component: Appearance,
|
||||
},
|
||||
{
|
||||
path: "security",
|
||||
component: Security,
|
||||
},
|
||||
{
|
||||
path: "about",
|
||||
component: About,
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/setup",
|
||||
component: Setup,
|
||||
},
|
||||
];
|
||||
|
||||
export const router = createRouter({
|
||||
linkActiveClass: "active",
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
});
|
||||
Reference in New Issue
Block a user