From 396a9cffb1a86b25a3ee5f55d3556136c283c7ee Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 25 Sep 2016 09:52:16 +0300 Subject: [PATCH] Display extra loading messages --- client/js/lounge.js | 6 ++++++ src/server.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/client/js/lounge.js b/client/js/lounge.js index cca024b9..b537fa05 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -80,6 +80,10 @@ $(function() { }); }); + socket.on("authorized", function() { + $("#loading-page-message").text("Authorized, loading messages…"); + }); + socket.on("auth", function(data) { var login = $("#sign-in"); @@ -147,6 +151,8 @@ $(function() { }); socket.on("init", function(data) { + $("#loading-page-message").text("Rendering…"); + if (data.networks.length === 0) { $("#footer").find(".connect").trigger("click"); } else { diff --git a/src/server.js b/src/server.js index 4dbbc1af..95ec2e9e 100644 --- a/src/server.js +++ b/src/server.js @@ -140,6 +140,8 @@ function init(socket, client) { socket.emit("auth", {success: true}); socket.on("auth", auth); } else { + socket.emit("authorized"); + socket.on( "input", function(data) {