From f4edbef2f7220ef820d4308c01cd322ab0a2f469 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Mon, 8 Feb 2021 23:07:13 -0500 Subject: [PATCH] Improve indications of PS loading New PS now makes it much clearer when it's still connecting to the server, and when it's connected. --- src/client-main.ts | 8 +++---- src/panel-mainmenu.tsx | 52 +++++++++++++++++++++++++++--------------- src/panel-topbar.tsx | 20 ++++++++++++---- 3 files changed, 53 insertions(+), 27 deletions(-) diff --git a/src/client-main.ts b/src/client-main.ts index 5b8c5a11c..08f23c367 100644 --- a/src/client-main.ts +++ b/src/client-main.ts @@ -263,9 +263,9 @@ class PSTeams extends PSStreamModel<'team' | 'format'> { *********************************************************************/ class PSUser extends PSModel { - name = "Guest"; + name = ""; group = ''; - userid = "guest" as ID; + userid = "" as ID; named = false; registered = false; avatar = "1"; @@ -294,9 +294,9 @@ class PSUser extends PSModel { PS.connection?.disconnect(); alert("You have been logged out and disconnected.\n\nIf you wanted to change your name while staying connected, use the 'Change Name' button or the '/nick' command."); - this.name = "Guest"; + this.name = ""; this.group = ''; - this.userid = "guest" as ID; + this.userid = "" as ID; this.named = false; this.registered = false; this.update(); diff --git a/src/panel-mainmenu.tsx b/src/panel-mainmenu.tsx index 99e096819..97093d4a1 100644 --- a/src/panel-mainmenu.tsx +++ b/src/panel-mainmenu.tsx @@ -307,27 +307,41 @@ class MainMenuPanel extends PSRoomPanel { ; }); } - render() { - const onlineButton = ' button' + (PS.isOffline ? ' disabled' : ''); - const searchButton = (PS.down ? : - + ; + } + + return + - ); + ; + } + render() { + const onlineButton = ' button' + (PS.isOffline ? ' disabled' : ''); return