You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uptime-kuma/src/main.js

62 lines
1.5 KiB

3 years ago
import "bootstrap";
import { createApp, h } from "vue";
import contenteditable from "vue-contenteditable";
3 years ago
import Toast from "vue-toastification";
import "vue-toastification/dist/index.css";
import App from "./App.vue";
import "./assets/app.scss";
import "./assets/vue-datepicker.scss";
import { i18n } from "./i18n";
3 years ago
import { FontAwesomeIcon } from "./icon.js";
import datetime from "./mixins/datetime";
import mobile from "./mixins/mobile";
import publicMixin from "./mixins/public";
3 years ago
import socket from "./mixins/socket";
import theme from "./mixins/theme";
import lang from "./mixins/lang";
import { router } from "./router";
import { appName } from "./util.ts";
import dayjs from "dayjs";
2 years ago
import timezone from "./modules/dayjs/plugin/timezone";
import utc from "dayjs/plugin/utc";
import relativeTime from "dayjs/plugin/relativeTime";
dayjs.extend(utc);
dayjs.extend(timezone);
dayjs.extend(relativeTime);
4 years ago
const app = createApp({
mixins: [
socket,
theme,
mobile,
datetime,
publicMixin,
lang,
4 years ago
],
data() {
return {
appName: appName
};
},
3 years ago
render: () => h(App),
});
4 years ago
3 years ago
app.use(router);
app.use(i18n);
4 years ago
const options = {
3 years ago
position: "bottom-right",
4 years ago
};
app.use(Toast, options);
app.component("Editable", contenteditable);
app.component("FontAwesomeIcon", FontAwesomeIcon);
4 years ago
app.mount("#app");
// Expose the vue instance for development
if (process.env.NODE_ENV === "development") {
console.log("Dev Only: window.app is the vue instance");
window.app = app._instance;
}