1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-06-16 13:46:16 +02:00

Fix linting issues

This commit is contained in:
Aleksandr Gumroian
2024-06-06 16:57:08 +02:00
parent 42fb16d066
commit 912f8facdb
47 changed files with 319 additions and 236 deletions

View File

@ -10,14 +10,12 @@
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
const URL = process.env.LIGHTTPD
? `${PROTOCOL}://${window.location.host}/${
process.env.WSPATH || "foris-ws"
}`
? `${PROTOCOL}://${window.location.host}/${process.env.WSPATH || "foris-ws"}`
: `${PROTOCOL}://${window.location.hostname}:9081`;
const WAITING_FOR_CONNECTION_TIMEOUT = 500;
export class WebSockets {
class WebSockets {
constructor() {
this.ws = new WebSocket(URL);
this.ws.onerror = (e) => {
@ -122,3 +120,5 @@ export class WebSockets {
this.ws.close();
}
}
export default WebSockets;