Display extra loading messages

This commit is contained in:
Pavel Djundik 2016-09-25 09:52:16 +03:00
parent e568452528
commit 396a9cffb1
2 changed files with 8 additions and 0 deletions

View File

@ -80,6 +80,10 @@ $(function() {
}); });
}); });
socket.on("authorized", function() {
$("#loading-page-message").text("Authorized, loading messages…");
});
socket.on("auth", function(data) { socket.on("auth", function(data) {
var login = $("#sign-in"); var login = $("#sign-in");
@ -147,6 +151,8 @@ $(function() {
}); });
socket.on("init", function(data) { socket.on("init", function(data) {
$("#loading-page-message").text("Rendering…");
if (data.networks.length === 0) { if (data.networks.length === 0) {
$("#footer").find(".connect").trigger("click"); $("#footer").find(".connect").trigger("click");
} else { } else {

View File

@ -140,6 +140,8 @@ function init(socket, client) {
socket.emit("auth", {success: true}); socket.emit("auth", {success: true});
socket.on("auth", auth); socket.on("auth", auth);
} else { } else {
socket.emit("authorized");
socket.on( socket.on(
"input", "input",
function(data) { function(data) {