0
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-25 15:59:38 +01:00
uptime-kuma/src/main.js

93 lines
2.4 KiB
JavaScript
Raw Normal View History

2021-06-25 15:55:49 +02:00
import {createApp, h} from "vue";
import {createRouter, createWebHistory} from 'vue-router'
import App from './App.vue'
import Layout from './layouts/Layout.vue'
2021-06-27 10:10:55 +02:00
import EmptyLayout from './layouts/EmptyLayout.vue'
2021-06-25 15:55:49 +02:00
import Settings from "./pages/Settings.vue";
import Dashboard from "./pages/Dashboard.vue";
import DashboardHome from "./pages/DashboardHome.vue";
import Details from "./pages/Details.vue";
import socket from "./mixins/socket"
import "./assets/app.scss"
import EditMonitor from "./pages/EditMonitor.vue";
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
import "bootstrap"
2021-07-11 07:47:57 +02:00
import Setup from "./pages/Setup.vue";
2021-06-25 15:55:49 +02:00
const routes = [
{
path: '/',
component: Layout,
children: [
{
name: "root",
path: '',
component: Dashboard,
children: [
{
name: "DashboardHome",
path: '/dashboard',
component: DashboardHome,
children: [
{
2021-06-27 10:10:55 +02:00
path: '/dashboard/:id',
component: EmptyLayout,
children: [
{
path: '',
component: Details,
},
{
path: '/edit/:id',
component: EditMonitor,
},
]
2021-06-25 15:55:49 +02:00
},
{
path: '/add',
component: EditMonitor,
},
]
},
{
path: '/settings',
component: Settings,
},
],
},
2021-07-11 07:47:57 +02:00
2021-06-25 15:55:49 +02:00
],
2021-07-11 07:47:57 +02:00
},
{
path: '/setup',
component: Setup,
},
2021-06-25 15:55:49 +02:00
]
const router = createRouter({
linkActiveClass: 'active',
history: createWebHistory(),
routes,
})
const app = createApp({
mixins: [
socket,
],
render: ()=>h(App)
})
app.use(router)
const options = {
position: "bottom-right"
};
app.use(Toast, options);
app.mount('#app')