Changed viewport, Websocket status field updates now on disconnect
This commit is contained in:
parent
adebeaf6cc
commit
e90427d3a2
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
<title>fiatlux v0.2</title>
|
||||
<link rel="stylesheet" href="css/picnic.min.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
|
@ -267,6 +268,11 @@
|
|||
console.error(evt);
|
||||
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) {
|
||||
onMessage(evt);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue