diff --git a/js/client-mainmenu.js b/js/client-mainmenu.js index f5ff037fe..3bd1686d4 100644 --- a/js/client-mainmenu.js +++ b/js/client-mainmenu.js @@ -846,6 +846,10 @@ app.addPopup(CreditsPopup); }, finduser: function () { + if (app.isDisconnected) { + app.addPopupMessage("You are offline."); + return; + } app.addPopupPrompt("Username", "Open", function (target) { if (!target) return; if (toId(target) === 'zarel') { diff --git a/js/client-rooms.js b/js/client-rooms.js index 43b3d2880..c2e563f58 100644 --- a/js/client-rooms.js +++ b/js/client-rooms.js @@ -95,6 +95,10 @@ this.close(); }, finduser: function () { + if (app.isDisconnected) { + app.addPopupMessage("You are offline."); + return; + } app.addPopupPrompt("Username", "Open", function (target) { if (!target) return; if (toId(target) === 'zarel') { @@ -155,7 +159,11 @@ }, update: function (data) { if (!data && !this.data) { - this.$list.html('

Loading...

'); + if (app.isDisconnected) { + this.$list.html('

You are offline.

'); + } else { + this.$list.html('

Loading...

'); + } return; } this.$('button[name=refresh]')[0].disabled = false;