summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2019-07-14 08:45:03 +0300
committerOrgad Shaneh <orgads@gmail.com>2019-10-04 06:30:48 +0000
commit9f04e2e100842737d8e47b47cc871b3983d0053d (patch)
tree8d5ba0237fbc9f3553fe79384b4e2eaed8383ede
parente36c8cf63b119eea1ebe216b991fdccd71b01961 (diff)
PG: Add shortcuts for dashboard and watched changesv3.0.2-based
The original change applied to stable-2.16 [1] wasn't merged properly to stable-3.0 [2]. [1]: https://gerrit-review.googlesource.com/c/gerrit/+/231393 [2]: https://gerrit-review.googlesource.com/c/gerrit/+/233333/2/polygerrit-ui/app/elements/gr-app.js Bug: Issue 10166 Change-Id: Iebe7929696f16d30de9309f589521a7c27ca3a69 (cherry picked from commit f43acb58378cd7ac1364f38b2773f73c03cedca3) (cherry picked from commit 17aed3abb43bd90383ba6044b3bbed24dbcb0049) Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
-rw-r--r--polygerrit-ui/app/elements/gr-app.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/polygerrit-ui/app/elements/gr-app.js b/polygerrit-ui/app/elements/gr-app.js
index ebf2020621..837d2d1c22 100644
--- a/polygerrit-ui/app/elements/gr-app.js
+++ b/polygerrit-ui/app/elements/gr-app.js
@@ -115,9 +115,11 @@
keyboardShortcuts() {
return {
[this.Shortcut.OPEN_SHORTCUT_HELP_DIALOG]: '_showKeyboardShortcuts',
+ [this.Shortcut.GO_TO_USER_DASHBOARD]: '_goToUserDashboard',
[this.Shortcut.GO_TO_OPENED_CHANGES]: '_goToOpenedChanges',
[this.Shortcut.GO_TO_MERGED_CHANGES]: '_goToMergedChanges',
[this.Shortcut.GO_TO_ABANDONED_CHANGES]: '_goToAbandonedChanges',
+ [this.Shortcut.GO_TO_WATCHED_CHANGES]: '_goToWatchedChanges',
};
},
@@ -184,11 +186,15 @@
this.bindShortcut(
this.Shortcut.OPEN_SHORTCUT_HELP_DIALOG, '?');
this.bindShortcut(
+ this.Shortcut.GO_TO_USER_DASHBOARD, this.GO_KEY, 'i');
+ this.bindShortcut(
this.Shortcut.GO_TO_OPENED_CHANGES, this.GO_KEY, 'o');
this.bindShortcut(
this.Shortcut.GO_TO_MERGED_CHANGES, this.GO_KEY, 'm');
this.bindShortcut(
this.Shortcut.GO_TO_ABANDONED_CHANGES, this.GO_KEY, 'a');
+ this.bindShortcut(
+ this.Shortcut.GO_TO_WATCHED_CHANGES, this.GO_KEY, 'w');
this.bindShortcut(
this.Shortcut.CURSOR_NEXT_CHANGE, 'j');
@@ -412,6 +418,10 @@
return isShadowDom ? 'shadow' : '';
},
+ _goToUserDashboard() {
+ Gerrit.Nav.navigateToUserDashboard();
+ },
+
_goToOpenedChanges() {
Gerrit.Nav.navigateToStatusSearch('open');
},
@@ -424,6 +434,11 @@
Gerrit.Nav.navigateToStatusSearch('abandoned');
},
+ _goToWatchedChanges() {
+ // The query is hardcoded, and doesn't respect custom menu entries
+ Gerrit.Nav.navigateToSearchQuery('is:watched is:open');
+ },
+
_computePluginScreenName({plugin, screen}) {
return Gerrit._getPluginScreenName(plugin, screen);
},