waffle/frontend/src/main.js

27 lines
611 B
JavaScript
Raw Normal View History

2022-04-28 18:48:44 +03:00
import Main from './components/Main.svelte';
import gateway from './gateway';
2022-05-05 16:31:10 +03:00
import { getItem, init } from './storage';
2022-04-23 23:07:46 +03:00
import logging from "./logging";
2022-04-26 22:45:40 +03:00
import { authWithToken } from './auth';
import { initResponsiveHandlers } from './responsive';
2022-04-23 23:07:46 +03:00
window.__waffle = {
logging,
gateway
};
2022-05-05 16:31:10 +03:00
init();
initResponsiveHandlers();
2022-05-05 16:31:10 +03:00
authWithToken(getItem("token"));
2022-04-14 00:31:03 +03:00
// Remove loading screen
const loadingElement = document.getElementById("pre--loading-screen");
if (loadingElement) {
loadingElement.parentElement.removeChild(loadingElement);
}
2022-04-28 18:48:44 +03:00
const app = new Main({
2022-04-14 00:31:03 +03:00
target: document.body
});
export default app;