mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 10:14:03 +00:00
bfc7b498be
* Add toast timeout to the settings Changing gui, adding timeout with a fix value memo rc rollback readme cleanup code cleanup code Review fixes review fix 2 * Feat: Add clearAll button below toastContainer * Feat: Load & Apply defaults, improve wording Chore: Remove unused * Feat: Change setting to affect monitor notif. only * Apply suggestions from code review Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com> * Chore: Fix JSDoc --------- Co-authored-by: Berczi Sandor <sandor.berczi@urss.hu> Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
import "bootstrap";
|
|
import { createApp, h } from "vue";
|
|
import contenteditable from "vue-contenteditable";
|
|
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";
|
|
import { FontAwesomeIcon } from "./icon.js";
|
|
import datetime from "./mixins/datetime";
|
|
import mobile from "./mixins/mobile";
|
|
import publicMixin from "./mixins/public";
|
|
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";
|
|
import timezone from "./modules/dayjs/plugin/timezone";
|
|
import utc from "dayjs/plugin/utc";
|
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
import { loadToastSettings } from "./util-frontend";
|
|
dayjs.extend(utc);
|
|
dayjs.extend(timezone);
|
|
dayjs.extend(relativeTime);
|
|
|
|
const app = createApp({
|
|
mixins: [
|
|
socket,
|
|
theme,
|
|
mobile,
|
|
datetime,
|
|
publicMixin,
|
|
lang,
|
|
],
|
|
data() {
|
|
return {
|
|
appName: appName
|
|
};
|
|
},
|
|
render: () => h(App),
|
|
});
|
|
|
|
app.use(router);
|
|
app.use(i18n);
|
|
|
|
app.use(Toast, loadToastSettings());
|
|
app.component("Editable", contenteditable);
|
|
app.component("FontAwesomeIcon", FontAwesomeIcon);
|
|
|
|
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;
|
|
}
|