aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-02-25 07:47:29 +0300
committerRblSb <msrblsb@gmail.com>2020-02-25 07:47:29 +0300
commitd934830a64b915af0b7e8031cb5ef927534c5e86 (patch)
treee98ca9831baa6bcf749dc0b1ffdea79ec0792344 /src/client/Buttons.hx
parent70b255b99ad50f1a42791b9a39f2fcfcd98f00d8 (diff)
Improve login/exit and mob view
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 69928a5..51ba75d 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -172,19 +172,20 @@ class Buttons {
final exitBtn = ge("#exitBtn");
exitBtn.onclick = e -> {
- main.send({type: Logout});
+ if (main.isUser()) main.send({type: Logout});
+ else ge("#guestname").focus();
exitBtn.blur();
hideMenus();
}
final swapLayoutBtn = ge("#swapLayoutBtn");
swapLayoutBtn.onclick = e -> {
final p = ge("#main");
- p.insertBefore(p.children.item(2), p.children.item(0));
- p.insertBefore(p.children.item(2), p.children.item(1));
+ p.insertBefore(p.children[2], p.children[0]);
+ p.insertBefore(p.children[2], p.children[1]);
final p = ge("#controlsrow");
- p.insertBefore(p.children.item(1), p.children.item(0));
+ p.insertBefore(p.children[1], p.children[0]);
final p = ge("#playlistrow");
- p.insertBefore(p.children.item(1), p.children.item(0));
+ p.insertBefore(p.children[1], p.children[0]);
final swapped = ge("#main").firstElementChild == ge("#videowrap");
initSplit(swapped);
swapLayoutBtn.blur();
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage