Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3c071011
Commit
3c071011
authored
May 05, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add keyboard shortcuts for commit navigation
parent
ee921003
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
app/assets/javascripts/diffs/components/app.vue
app/assets/javascripts/diffs/components/app.vue
+8
-0
app/views/help/_shortcuts.html.haml
app/views/help/_shortcuts.html.haml
+12
-0
locale/gitlab.pot
locale/gitlab.pot
+9
-0
No files found.
app/assets/javascripts/diffs/components/app.vue
View file @
3c071011
...
...
@@ -224,6 +224,7 @@ export default {
methods
:
{
...
mapActions
([
'
startTaskList
'
]),
...
mapActions
(
'
diffs
'
,
[
'
moveToNeighboringCommit
'
,
'
setBaseConfig
'
,
'
fetchDiffFiles
'
,
'
fetchDiffFilesMeta
'
,
...
...
@@ -344,9 +345,16 @@ export default {
break
;
}
});
if
(
this
.
commit
)
{
Mousetrap
.
bind
(
'
c
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
next
'
}));
Mousetrap
.
bind
(
'
x
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
previous
'
}));
}
},
removeEventListeners
()
{
Mousetrap
.
unbind
([
'
[
'
,
'
k
'
,
'
]
'
,
'
j
'
]);
Mousetrap
.
unbind
(
'
c
'
);
Mousetrap
.
unbind
(
'
x
'
);
},
jumpToFile
(
step
)
{
const
targetIndex
=
this
.
currentDiffIndex
+
step
;
...
...
app/views/help/_shortcuts.html.haml
View file @
3c071011
...
...
@@ -313,6 +313,18 @@
%td
.shortcut
%kbd
p
%td
=
_
(
'Previous unresolved discussion'
)
%tbody
%tr
%th
%th
=
_
(
'Merge Request Commits'
)
%tr
%td
.shortcut
%kbd
c
%td
=
_
(
'Next commit'
)
%tr
%td
.shortcut
%kbd
x
%td
=
_
(
'Previous commit'
)
%tbody
%tr
%th
...
...
locale/gitlab.pot
View file @
3c071011
...
...
@@ -13028,6 +13028,9 @@ msgstr ""
msgid "Merge Request Approvals"
msgstr ""
msgid "Merge Request Commits"
msgstr ""
msgid "Merge Requests"
msgstr ""
...
...
@@ -13886,6 +13889,9 @@ msgstr ""
msgid "Next"
msgstr ""
msgid "Next commit"
msgstr ""
msgid "Next file in diff"
msgstr ""
...
...
@@ -15592,6 +15598,9 @@ msgstr ""
msgid "Previous Artifacts"
msgstr ""
msgid "Previous commit"
msgstr ""
msgid "Previous file in diff"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment