Explorar o código

Keyboard Shortcuts: Sign in to enable them (#18271)

Eric Leijonmarck %!s(int64=6) %!d(string=hai) anos
pai
achega
12f5d16c76
Modificáronse 1 ficheiros con 9 adicións e 7 borrados
  1. 9 7
      public/app/core/services/keybindingSrv.ts

+ 9 - 7
public/app/core/services/keybindingSrv.ts

@@ -39,13 +39,15 @@ export class KeybindingSrv {
   }
 
   setupGlobal() {
-    this.bind(['?', 'h'], this.showHelpModal);
-    this.bind('g h', this.goToHome);
-    this.bind('g a', this.openAlerting);
-    this.bind('g p', this.goToProfile);
-    this.bind('s o', this.openSearch);
-    this.bind('f', this.openSearch);
-    this.bindGlobal('esc', this.exit);
+    if (this.contextSrv.user.isSignedIn) {
+      this.bind(['?', 'h'], this.showHelpModal);
+      this.bind('g h', this.goToHome);
+      this.bind('g a', this.openAlerting);
+      this.bind('g p', this.goToProfile);
+      this.bind('s o', this.openSearch);
+      this.bind('f', this.openSearch);
+      this.bindGlobal('esc', this.exit);
+    }
   }
 
   openSearch() {