2017-12-19 10:12:32 +00:00
|
|
|
import Mousetrap from 'mousetrap';
|
2017-05-16 20:51:28 +00:00
|
|
|
import findAndFollowLink from './shortcuts_dashboard_navigation';
|
2017-10-10 09:10:11 +00:00
|
|
|
import Shortcuts from './shortcuts';
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2017-10-10 09:10:11 +00:00
|
|
|
export default class ShortcutsNavigation extends Shortcuts {
|
|
|
|
constructor() {
|
|
|
|
super();
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2017-10-10 09:10:11 +00:00
|
|
|
Mousetrap.bind('g p', () => findAndFollowLink('.shortcuts-project'));
|
|
|
|
Mousetrap.bind('g e', () => 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'));
|
|
|
|
Mousetrap.bind('g n', () => findAndFollowLink('.shortcuts-network'));
|
|
|
|
Mousetrap.bind('g d', () => findAndFollowLink('.shortcuts-repository-charts'));
|
|
|
|
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('i', () => findAndFollowLink('.shortcuts-new-issue'));
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2017-10-10 09:10:11 +00:00
|
|
|
this.enabledHelp.push('.hidden-shortcut.project');
|
|
|
|
}
|
|
|
|
}
|