2017-12-19 05:12:32 -05:00
|
|
|
import Mousetrap from 'mousetrap';
|
2017-05-16 16:51:28 -04:00
|
|
|
import findAndFollowLink from './shortcuts_dashboard_navigation';
|
2017-10-10 05:10:11 -04:00
|
|
|
import Shortcuts from './shortcuts';
|
2016-07-24 16:45:11 -04:00
|
|
|
|
2017-10-10 05:10:11 -04:00
|
|
|
export default class ShortcutsNavigation extends Shortcuts {
|
|
|
|
constructor() {
|
|
|
|
super();
|
2016-07-24 16:45:11 -04:00
|
|
|
|
2017-10-10 05:10:11 -04: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 16:45:11 -04:00
|
|
|
|
2017-10-10 05:10:11 -04:00
|
|
|
this.enabledHelp.push('.hidden-shortcut.project');
|
|
|
|
}
|
|
|
|
}
|