Преглед изворни кода

properly update toolbar if auth enabled

master
isymchych пре 10 година
родитељ
комит
f56eb3440a
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2
    0
      modules/UI/UI.js
  2. 2
    4
      modules/UI/toolbars/Toolbar.js

+ 2
- 0
modules/UI/UI.js Прегледај датотеку

@@ -739,6 +739,8 @@ UI.notifyTokenAuthFailed = function () {
739 739
 UI.updateAuthInfo = function (isAuthEnabled, login) {
740 740
     let loggedIn = !!login;
741 741
 
742
+    Toolbar.showAuthenticateButton(isAuthEnabled);
743
+
742 744
     if (isAuthEnabled) {
743 745
         Toolbar.setAuthenticatedIdentity(login);
744 746
 

+ 2
- 4
modules/UI/toolbars/Toolbar.js Прегледај датотеку

@@ -278,8 +278,7 @@ const Toolbar = {
278 278
     showAuthenticateButton (show) {
279 279
         if (UIUtil.isButtonEnabled('authentication') && show) {
280 280
             $('#authentication').css({display: "inline"});
281
-        }
282
-        else {
281
+        } else {
283 282
             $('#authentication').css({display: "none"});
284 283
         }
285 284
     },
@@ -288,8 +287,7 @@ const Toolbar = {
288 287
     showRecordingButton (show) {
289 288
         if (UIUtil.isButtonEnabled('recording') && show) {
290 289
             $('#toolbar_button_record').css({display: "inline-block"});
291
-        }
292
-        else {
290
+        } else {
293 291
             $('#toolbar_button_record').css({display: "none"});
294 292
         }
295 293
     },

Loading…
Откажи
Сачувај