2026-03-21 19:41:51 +00:00
|
|
|
import { createApp } from "vue";
|
2026-03-21 23:42:23 +00:00
|
|
|
import { createPinia } from "pinia";
|
2026-04-03 15:09:53 +00:00
|
|
|
import App from "@/AppSync.vue";
|
2026-04-21 23:35:59 +00:00
|
|
|
import * as config from "@/config";
|
2026-04-29 23:59:34 +00:00
|
|
|
import router from "@/route/config";
|
|
|
|
|
import * as sentry from "@/sentry";
|
2026-05-08 23:33:49 +00:00
|
|
|
import { useErrorHandler } from "@/composable/error-handler";
|
2026-04-21 23:35:59 +00:00
|
|
|
|
2026-03-21 19:41:51 +00:00
|
|
|
import "maplibre-gl/dist/maplibre-gl.css";
|
2026-03-21 17:44:14 +00:00
|
|
|
|
2026-03-21 19:34:23 +00:00
|
|
|
// Import Bootstrap Icons CSS
|
2026-03-21 19:41:51 +00:00
|
|
|
import "bootstrap-icons/font/bootstrap-icons.css";
|
2026-03-21 19:14:51 +00:00
|
|
|
// Import Bootstrap SCSS
|
2026-04-03 15:09:53 +00:00
|
|
|
import "@/style/style.scss";
|
2026-03-21 21:27:50 +00:00
|
|
|
// Import custom icons
|
2026-04-03 15:09:53 +00:00
|
|
|
import "@/gen/custom-icons.scss";
|
2026-03-21 19:14:51 +00:00
|
|
|
|
|
|
|
|
// Import Bootstrap JavaScript and make it available globally
|
2026-03-21 19:41:51 +00:00
|
|
|
import * as bootstrap from "bootstrap";
|
2026-03-21 19:14:51 +00:00
|
|
|
window.bootstrap = bootstrap;
|
|
|
|
|
|
2026-05-08 23:33:49 +00:00
|
|
|
const { setError } = useErrorHandler();
|
|
|
|
|
|
2026-03-21 23:42:23 +00:00
|
|
|
const pinia = createPinia();
|
2026-03-21 21:58:02 +00:00
|
|
|
const app = createApp(App);
|
2026-05-08 23:33:49 +00:00
|
|
|
app.config.errorHandler = (err, instance, info) => {
|
|
|
|
|
// err: the error object
|
|
|
|
|
// instance: the component instance where error occurred
|
|
|
|
|
// info: Vue-specific error info, e.g., lifecycle hook
|
|
|
|
|
|
|
|
|
|
console.error("Global error:", err);
|
|
|
|
|
console.error("Error info:", info);
|
|
|
|
|
console.error("Error instance:", instance);
|
|
|
|
|
|
|
|
|
|
// You could dispatch to a store, send to error tracking service, etc.
|
|
|
|
|
// For example, trigger a global error state
|
|
|
|
|
setError(err);
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-21 23:42:23 +00:00
|
|
|
app.use(pinia);
|
2026-03-21 21:58:02 +00:00
|
|
|
app.use(router);
|
2026-05-04 19:39:17 +00:00
|
|
|
sentry.Init(app, pinia).then(() => {
|
|
|
|
|
app.mount("#app");
|
|
|
|
|
});
|