From d934830a64b915af0b7e8031cb5ef927534c5e86 Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 25 Feb 2020 07:47:29 +0300 Subject: Improve login/exit and mob view --- src/client/Buttons.hx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/client/Buttons.hx') 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(); -- cgit v1.2.3