2021-07-27 17:47:13 +00:00
|
|
|
import "bootstrap";
|
|
|
|
import { createApp, h } from "vue";
|
2021-09-28 05:02:19 +00:00
|
|
|
import contenteditable from "vue-contenteditable";
|
2021-07-27 17:47:13 +00:00
|
|
|
import Toast from "vue-toastification";
|
|
|
|
import "vue-toastification/dist/index.css";
|
|
|
|
import App from "./App.vue";
|
|
|
|
import "./assets/app.scss";
|
2022-09-23 18:33:29 +00:00
|
|
|
import "./assets/vue-datepicker.scss";
|
2021-09-12 17:23:51 +00:00
|
|
|
import { i18n } from "./i18n";
|
2021-07-27 17:47:13 +00:00
|
|
|
import { FontAwesomeIcon } from "./icon.js";
|
2021-09-12 17:23:51 +00:00
|
|
|
import datetime from "./mixins/datetime";
|
|
|
|
import mobile from "./mixins/mobile";
|
2021-09-28 05:02:19 +00:00
|
|
|
import publicMixin from "./mixins/public";
|
2021-07-27 17:47:13 +00:00
|
|
|
import socket from "./mixins/socket";
|
2021-08-08 05:47:29 +00:00
|
|
|
import theme from "./mixins/theme";
|
2021-11-26 08:31:19 +00:00
|
|
|
import lang from "./mixins/lang";
|
2021-09-12 17:23:51 +00:00
|
|
|
import { router } from "./router";
|
2021-08-08 03:03:22 +00:00
|
|
|
import { appName } from "./util.ts";
|
2022-09-27 16:20:17 +00:00
|
|
|
import dayjs from "dayjs";
|
2022-12-15 05:39:48 +00:00
|
|
|
import timezone from "./modules/dayjs/plugin/timezone";
|
2022-09-27 16:20:17 +00:00
|
|
|
import utc from "dayjs/plugin/utc";
|
|
|
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
|
|
dayjs.extend(utc);
|
|
|
|
dayjs.extend(timezone);
|
|
|
|
dayjs.extend(relativeTime);
|
2021-06-25 13:55:49 +00:00
|
|
|
|
|
|
|
const app = createApp({
|
|
|
|
mixins: [
|
|
|
|
socket,
|
2021-08-10 07:02:46 +00:00
|
|
|
theme,
|
2021-08-17 08:41:12 +00:00
|
|
|
mobile,
|
2021-09-13 11:21:39 +00:00
|
|
|
datetime,
|
|
|
|
publicMixin,
|
2021-11-26 08:31:19 +00:00
|
|
|
lang,
|
2021-06-25 13:55:49 +00:00
|
|
|
],
|
2021-08-08 03:03:22 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
appName: appName
|
2021-09-28 05:02:19 +00:00
|
|
|
};
|
2021-08-08 03:03:22 +00:00
|
|
|
},
|
2021-07-27 17:47:13 +00:00
|
|
|
render: () => h(App),
|
2021-09-28 05:02:19 +00:00
|
|
|
});
|
2021-06-25 13:55:49 +00:00
|
|
|
|
2021-08-24 08:44:58 +00:00
|
|
|
app.use(router);
|
|
|
|
app.use(i18n);
|
2021-06-25 13:55:49 +00:00
|
|
|
|
|
|
|
const options = {
|
2021-07-27 17:47:13 +00:00
|
|
|
position: "bottom-right",
|
2021-06-25 13:55:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
app.use(Toast, options);
|
2021-09-14 15:27:11 +00:00
|
|
|
app.component("Editable", contenteditable);
|
|
|
|
app.component("FontAwesomeIcon", FontAwesomeIcon);
|
2021-06-25 13:55:49 +00:00
|
|
|
|
2021-09-14 15:27:11 +00:00
|
|
|
app.mount("#app");
|
2021-10-08 05:35:04 +00:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|