From f56eb3440ad45e50ba964221e7b6067c1ce8506d Mon Sep 17 00:00:00 2001 From: isymchych Date: Mon, 21 Dec 2015 13:27:36 +0200 Subject: [PATCH] properly update toolbar if auth enabled --- modules/UI/UI.js | 2 ++ modules/UI/toolbars/Toolbar.js | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index a15968ed1..09b627a8c 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -739,6 +739,8 @@ UI.notifyTokenAuthFailed = function () { UI.updateAuthInfo = function (isAuthEnabled, login) { let loggedIn = !!login; + Toolbar.showAuthenticateButton(isAuthEnabled); + if (isAuthEnabled) { Toolbar.setAuthenticatedIdentity(login); diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index 6ab4d85da..72431d0c4 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -278,8 +278,7 @@ const Toolbar = { showAuthenticateButton (show) { if (UIUtil.isButtonEnabled('authentication') && show) { $('#authentication').css({display: "inline"}); - } - else { + } else { $('#authentication').css({display: "none"}); } }, @@ -288,8 +287,7 @@ const Toolbar = { showRecordingButton (show) { if (UIUtil.isButtonEnabled('recording') && show) { $('#toolbar_button_record').css({display: "inline-block"}); - } - else { + } else { $('#toolbar_button_record').css({display: "none"}); } },