From 70b255b99ad50f1a42791b9a39f2fcfcd98f00d8 Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 25 Feb 2020 07:17:26 +0300 Subject: NavBar buttons --- src/client/Main.hx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/client/Main.hx') diff --git a/src/client/Main.hx b/src/client/Main.hx index a95a9a2..70cc270 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -156,6 +156,14 @@ class Main { }); } + public function toggleVideoElement():Bool { + if (player.hasVideo()) player.removeVideo(); + else if (!player.isListEmpty()) { + player.setVideo(player.getItems()[0]); + } + return player.hasVideo(); + } + public function refreshPlayer():Void { player.refresh(); } @@ -358,12 +366,14 @@ class Main { function showGuestLoginPanel():Void { ge("#guestlogin").style.display = "block"; ge("#chatline").style.display = "none"; + Browser.window.dispatchEvent(new Event("resize")); } function hideGuestLoginPanel():Void { ge("#guestlogin").style.display = "none"; ge("#chatline").style.display = "block"; - js.Browser.window.dispatchEvent(new Event("resize")); + if (isAdmin()) ge("#clearchatbtn").style.display = "inline-block"; + Browser.window.dispatchEvent(new Event("resize")); } function updateClients(newClients:Array):Void { -- cgit v1.2.3