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-03-21 20:58:44 +00:00
|
|
|
import App from "./App.vue";
|
2026-03-21 21:58:02 +00:00
|
|
|
import router from "./router";
|
2026-04-02 21:31:31 +00:00
|
|
|
import { SSEManager, type SSEMessage } from "./SSEManager";
|
2026-03-21 20:47:46 +00:00
|
|
|
//import { SetupSidebar } from "./sidebar";
|
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-03-21 19:41:51 +00:00
|
|
|
import "./style/style.scss";
|
2026-03-21 21:27:50 +00:00
|
|
|
// Import custom icons
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// Make SSEManager available to all the JavaScript
|
|
|
|
|
window.SSEManager = SSEManager;
|
|
|
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
|
|
|
SSEManager.connect("/api/events");
|
2026-04-02 21:31:31 +00:00
|
|
|
SSEManager.subscribe((msg: SSEMessage) => {
|
|
|
|
|
if (msg.type != "heartbeat") {
|
|
|
|
|
console.log("SSE", msg);
|
2026-03-22 07:57:55 +00:00
|
|
|
}
|
|
|
|
|
});
|
2026-03-21 19:14:51 +00:00
|
|
|
});
|
2026-03-22 02:36:17 +00:00
|
|
|
document.addEventListener("init", () => {
|
2026-03-21 19:41:51 +00:00
|
|
|
const user = {
|
|
|
|
|
display_name: "",
|
|
|
|
|
initials: "",
|
|
|
|
|
notifications: [],
|
|
|
|
|
notification_counts: {
|
|
|
|
|
communication: 0,
|
|
|
|
|
home: 0,
|
|
|
|
|
review: 0,
|
|
|
|
|
},
|
|
|
|
|
organization: {
|
|
|
|
|
name: "",
|
|
|
|
|
},
|
|
|
|
|
role: "",
|
|
|
|
|
username: "",
|
|
|
|
|
};
|
|
|
|
|
});
|
2026-03-21 19:14:51 +00:00
|
|
|
interface GreetingComponent {
|
2026-03-21 19:41:51 +00:00
|
|
|
message: string;
|
|
|
|
|
name: string;
|
|
|
|
|
updateMessage(): void;
|
2026-03-21 19:14:51 +00:00
|
|
|
}
|
|
|
|
|
|
2026-03-21 23:42:23 +00:00
|
|
|
const pinia = createPinia();
|
2026-03-21 21:58:02 +00:00
|
|
|
const app = createApp(App);
|
2026-03-21 23:42:23 +00:00
|
|
|
app.use(pinia);
|
2026-03-21 21:58:02 +00:00
|
|
|
app.use(router);
|
|
|
|
|
app.mount("#app");
|