aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-05-20 11:34:46 +0300
committerRblSb <msrblsb@gmail.com>2020-05-20 11:34:46 +0300
commita525aeb86aaa02bccf960c18ee0b6751409e7d70 (patch)
treece24be2b812656451f56eb7c267584c13b4a0089 /src
parentd88e6d0f80211b2ace5595af9931b997eb4c6bc4 (diff)
Fix userlist saving, revert options panel
Diffstat (limited to 'src')
-rw-r--r--src/client/Buttons.hx20
-rw-r--r--src/client/Main.hx4
2 files changed, 7 insertions, 17 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 7d673b7..1377b09 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -75,18 +75,16 @@ class Buttons {
final userlistToggle = ge("#userlisttoggle");
userlistToggle.onclick = e -> {
final icon = userlistToggle.firstElementChild;
- final isHidden = userlistToggle.classList.toggle("chevron-right");
- userlistToggle.classList.toggle("chevron-down");
+ final isHidden = icon.getAttribute("name") == "chevron-forward";
final style = ge("#userlist").style;
if (isHidden) {
- style.display = "none";
- icon.setAttribute("name", "chevron-forward");
- }
- else {
style.display = "block";
icon.setAttribute("name", "chevron-down");
+ } else {
+ style.display = "none";
+ icon.setAttribute("name", "chevron-forward");
}
- settings.isUserListHidden = isHidden;
+ settings.isUserListHidden = !isHidden;
Settings.write(settings);
}
ge("#usercount").onclick = userlistToggle.onclick;
@@ -155,13 +153,7 @@ class Buttons {
}
final showOptions = ge("#showoptions");
- showOptions.onclick = e -> {
- final isActive = toggleGroup(showOptions);
- ge("#messagebuffer").style.display = isActive ? "none" : "block";
- ge("#chatbox").style.display = isActive ? "none" : "flex";
- ge("#userlisttoggle").style.display = isActive ? "none" : "inline-flex";
- ge("#optionsTitle").style.display = isActive ? "inline-flex" : "none";
- }
+ showOptions.onclick = e -> toggleGroup(showOptions);
final exitBtn = ge("#exitBtn");
exitBtn.onclick = e -> {
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 730742f..55c6a9a 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -575,7 +575,6 @@ class Main {
ge("#guestpassword").style.display = "none";
ge("#chatbox").style.display = "none";
ge("#exitBtn").textContent = Lang.get("login");
- window.dispatchEvent(new Event("resize"));
}
function hideGuestLoginPanel():Void {
@@ -583,8 +582,7 @@ class Main {
ge("#guestpassword").style.display = "none";
ge("#chatbox").style.display = "flex";
ge("#exitBtn").textContent = Lang.get("exit");
- if (isAdmin()) ge("#clearchatbtn").style.display = "inline-block";
- window.dispatchEvent(new Event("resize"));
+ if (isAdmin()) ge("#adminMenu").style.display = "block";
}
function showGuestPasswordPanel():Void {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage