uptime-kuma/src/main.js
Philipp Dormann 123fca43a1
FEAT: darkmode (#155)
* darkmode fixes

* fix: darkmode: empty beats in active/ hovered state

* fix: color for empty beats

* fix: navbar background color

* Update src/assets/vars.scss

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>

* Update src/assets/app.scss

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>

* wip, split dark theme style by .dark and store light theme to normal

* add back missing css

* working switch theme button and tuning dark theme

* finish dark theme

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
Co-authored-by: LouisLam <louislam@users.noreply.github.com>
2021-08-08 13:47:29 +08:00

101 lines
2.7 KiB
JavaScript

import "bootstrap";
import { createApp, h } from "vue";
import { createRouter, createWebHistory } from "vue-router";
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
import App from "./App.vue";
import "./assets/app.scss";
import { FontAwesomeIcon } from "./icon.js";
import EmptyLayout from "./layouts/EmptyLayout.vue";
import Layout from "./layouts/Layout.vue";
import socket from "./mixins/socket";
import theme from "./mixins/theme";
import Dashboard from "./pages/Dashboard.vue";
import DashboardHome from "./pages/DashboardHome.vue";
import Details from "./pages/Details.vue";
import EditMonitor from "./pages/EditMonitor.vue";
import Settings from "./pages/Settings.vue";
import Setup from "./pages/Setup.vue";
import { appName } from "./util.ts";
const routes = [
{
path: "/",
component: Layout,
children: [
{
name: "root",
path: "",
component: Dashboard,
children: [
{
name: "DashboardHome",
path: "/dashboard",
component: DashboardHome,
children: [
{
path: "/dashboard/:id",
component: EmptyLayout,
children: [
{
path: "",
component: Details,
},
{
path: "/edit/:id",
component: EditMonitor,
},
],
},
{
path: "/add",
component: EditMonitor,
},
],
},
{
path: "/settings",
component: Settings,
},
],
},
],
},
{
path: "/setup",
component: Setup,
},
]
const router = createRouter({
linkActiveClass: "active",
history: createWebHistory(),
routes,
})
const app = createApp({
mixins: [
socket,
theme
],
data() {
return {
appName: appName
}
},
render: () => h(App),
})
app.use(router)
const options = {
position: "bottom-right",
};
app.use(Toast, options);
app.component("FontAwesomeIcon", FontAwesomeIcon)
app.mount("#app")