2022-06-08 02:25:35 +02:00
|
|
|
import * as React from "react";
|
|
|
|
import {createRoot} from 'react-dom/client';
|
|
|
|
import {sprintf} from "sprintf-js";
|
|
|
|
import {Terminal} from 'xterm';
|
|
|
|
import {Main} from "./main";
|
2022-06-16 09:31:54 +02:00
|
|
|
import {GlobalWS} from "./ws";
|
2022-06-17 06:14:26 +02:00
|
|
|
import {v4 as uuidv4} from "uuid";
|
2022-06-08 02:25:35 +02:00
|
|
|
|
|
|
|
let VERSION = __SHVERSION__;
|
|
|
|
|
2022-06-17 06:14:26 +02:00
|
|
|
window.ScriptHausClientId = uuidv4();
|
|
|
|
|
2022-06-08 02:25:35 +02:00
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
2022-06-16 09:31:54 +02:00
|
|
|
GlobalWS.reconnect();
|
2022-06-17 00:51:17 +02:00
|
|
|
let reactElem = React.createElement(Main, null, null);
|
2022-06-08 02:25:35 +02:00
|
|
|
let elem = document.getElementById("main");
|
|
|
|
let root = createRoot(elem);
|
|
|
|
root.render(reactElem);
|
|
|
|
});
|
|
|
|
|
|
|
|
console.log("SCRIPTHAUS", VERSION)
|