summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorLukas Eipert <leipert@gitlab.com>2018-05-18 02:18:42 +0000
committerAnnabel Gray <annabel.m.gray@gmail.com>2018-05-18 02:18:42 +0000
commitb5821e5fb3882a744ce4f30367859c5cff66d765 (patch)
tree327119ff2e89ee6df5b1704adeecb010c7986968 /app
parent6fb20b10fdea0563680973b4fe0a7919779c2f76 (diff)
downloadgitlab-ce-b5821e5fb3882a744ce4f30367859c5cff66d765.tar.gz
Add Keyboard shortcuts for "Kubernetes" and "Environments"
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/shortcuts_navigation.js5
-rw-r--r--app/views/help/_shortcuts.html.haml14
-rw-r--r--app/views/layouts/nav/sidebar/_project.html.haml2
3 files changed, 17 insertions, 4 deletions
diff --git a/app/assets/javascripts/shortcuts_navigation.js b/app/assets/javascripts/shortcuts_navigation.js
index a4d10850471..78f7353eb0d 100644
--- a/app/assets/javascripts/shortcuts_navigation.js
+++ b/app/assets/javascripts/shortcuts_navigation.js
@@ -7,7 +7,7 @@ export default class ShortcutsNavigation extends Shortcuts {
super();
Mousetrap.bind('g p', () => findAndFollowLink('.shortcuts-project'));
- Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-project-activity'));
+ Mousetrap.bind('g v', () => findAndFollowLink('.shortcuts-project-activity'));
Mousetrap.bind('g f', () => findAndFollowLink('.shortcuts-tree'));
Mousetrap.bind('g c', () => findAndFollowLink('.shortcuts-commits'));
Mousetrap.bind('g j', () => findAndFollowLink('.shortcuts-builds'));
@@ -16,9 +16,10 @@ export default class ShortcutsNavigation extends Shortcuts {
Mousetrap.bind('g i', () => findAndFollowLink('.shortcuts-issues'));
Mousetrap.bind('g b', () => findAndFollowLink('.shortcuts-issue-boards'));
Mousetrap.bind('g m', () => findAndFollowLink('.shortcuts-merge_requests'));
- Mousetrap.bind('g t', () => findAndFollowLink('.shortcuts-todos'));
Mousetrap.bind('g w', () => findAndFollowLink('.shortcuts-wiki'));
Mousetrap.bind('g s', () => findAndFollowLink('.shortcuts-snippets'));
+ Mousetrap.bind('g k', () => findAndFollowLink('.shortcuts-kubernetes'));
+ Mousetrap.bind('g e', () => findAndFollowLink('.shortcuts-environments'));
Mousetrap.bind('i', () => findAndFollowLink('.shortcuts-new-issue'));
this.enabledHelp.push('.hidden-shortcut.project');
diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml
index 1c5b4aecabb..2244d16f0a6 100644
--- a/app/views/help/_shortcuts.html.haml
+++ b/app/views/help/_shortcuts.html.haml
@@ -121,7 +121,7 @@
%tr
%td.shortcut
.key g
- .key e
+ .key v
%td
Go to the project's activity feed
%tr
@@ -175,6 +175,18 @@
%tr
%td.shortcut
.key g
+ .key e
+ %td
+ Go to environments
+ %tr
+ %td.shortcut
+ .key g
+ .key k
+ %td
+ Go to kubernetes
+ %tr
+ %td.shortcut
+ .key g
.key s
%td
Go to snippets
diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml
index c3ea592a6b5..0023ede2be9 100644
--- a/app/views/layouts/nav/sidebar/_project.html.haml
+++ b/app/views/layouts/nav/sidebar/_project.html.haml
@@ -212,7 +212,7 @@
- if project_nav_tab? :clusters
- show_cluster_hint = show_gke_cluster_integration_callout?(@project)
= nav_link(controller: [:clusters, :user, :gcp]) do
- = link_to project_clusters_path(@project), title: _('Kubernetes'), class: 'shortcuts-cluster' do
+ = link_to project_clusters_path(@project), title: _('Kubernetes'), class: 'shortcuts-kubernetes' do
%span
= _('Kubernetes')
- if show_cluster_hint