New wording and changed behaviour of the "server is offline" dialog

master
Gina Häußge 2013-01-13 18:28:55 +01:00
parent c676e1c360
commit ec4b909f66
2 changed files with 13 additions and 3 deletions

View File

@ -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);

View File

@ -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>