New wording and changed behaviour of the "server is offline" dialog
parent
c676e1c360
commit
ec4b909f66
|
@ -598,10 +598,20 @@ function DataUpdater(connectionViewModel, printerStateViewModel, temperatureView
|
|||
}
|
||||
})
|
||||
self._socket.on("disconnect", function() {
|
||||
// if the updated fails to communicate with the backend, we interpret this as a missing backend
|
||||
$("#offline_overlay_message").html(
|
||||
"The server appears to be offline, at least I'm not getting any response from it. I'll try to reconnect " +
|
||||
"automatically <strong>over the next couple of minutes</strong>, however you are welcome to try a manual reconnect " +
|
||||
"anytime using the button below."
|
||||
);
|
||||
if (!$("#offline_overlay").is(":visible"))
|
||||
$("#offline_overlay").show();
|
||||
})
|
||||
self._socket.on("reconnect_failed", function() {
|
||||
$("#offline_overlay_message").html(
|
||||
"The server appears to be offline, at least I'm not getting any response from it. I <strong>could not reconnect automatically</strong>, " +
|
||||
"but you may try a manual reconnect using the button below."
|
||||
);
|
||||
})
|
||||
self._socket.on("history", function(data) {
|
||||
self.connectionViewModel.fromHistoryData(data);
|
||||
self.printerStateViewModel.fromHistoryData(data);
|
||||
|
|
|
@ -268,9 +268,9 @@
|
|||
<div class="container">
|
||||
<div class="hero-unit">
|
||||
<h1>Server is offline</h1>
|
||||
<p>
|
||||
<p id="offline_overlay_message">
|
||||
The server appears to be offline, at least I'm not getting any response from it. I'll try to reconnect
|
||||
automatically <strong>every 10 seconds</strong>, however you are welcome to try a manual reconnect
|
||||
automatically <strong>over the next couple of minutes</strong>, however you are welcome to try a manual reconnect
|
||||
anytime using the button below.
|
||||
</p>
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue