Changed viewport, Websocket status field updates now on disconnect
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Marcus 2021-09-08 02:23:32 +02:00
parent adebeaf6cc
commit e90427d3a2

View file

@ -5,6 +5,7 @@
<title>fiatlux v0.2</title> <title>fiatlux v0.2</title>
<link rel="stylesheet" href="css/picnic.min.css"> <link rel="stylesheet" href="css/picnic.min.css">
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
<body> <body>
<nav> <nav>
@ -267,6 +268,11 @@
console.error(evt); console.error(evt);
setMsg("error", "WebSocket error!"); /*window.location.reload(true);*/ setMsg("error", "WebSocket error!"); /*window.location.reload(true);*/
}; };
ws.onclose = function (evt) {
msgStyle = "warning";
if(!evt.wasClean) msgStyle = "error";
setMsg(msgStyle, "WebSocket closed!")
};
ws.onmessage = function (evt) { ws.onmessage = function (evt) {
onMessage(evt); onMessage(evt);
}; };