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 {
...
@@ -224,6 +224,7 @@ export default {
methods
:
{
methods
:
{
...
mapActions
([
'
startTaskList
'
]),
...
mapActions
([
'
startTaskList
'
]),
...
mapActions
(
'
diffs
'
,
[
...
mapActions
(
'
diffs
'
,
[
'
moveToNeighboringCommit
'
,
'
setBaseConfig
'
,
'
setBaseConfig
'
,
'
fetchDiffFiles
'
,
'
fetchDiffFiles
'
,
'
fetchDiffFilesMeta
'
,
'
fetchDiffFilesMeta
'
,
...
@@ -344,9 +345,16 @@ export default {
...
@@ -344,9 +345,16 @@ export default {
break
;
break
;
}
}
});
});
if
(
this
.
commit
)
{
Mousetrap
.
bind
(
'
c
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
next
'
}));
Mousetrap
.
bind
(
'
x
'
,
()
=>
this
.
moveToNeighboringCommit
({
direction
:
'
previous
'
}));
}
},
},
removeEventListeners
()
{
removeEventListeners
()
{
Mousetrap
.
unbind
([
'
[
'
,
'
k
'
,
'
]
'
,
'
j
'
]);
Mousetrap
.
unbind
([
'
[
'
,
'
k
'
,
'
]
'
,
'
j
'
]);
Mousetrap
.
unbind
(
'
c
'
);
Mousetrap
.
unbind
(
'
x
'
);
},
},
jumpToFile
(
step
)
{
jumpToFile
(
step
)
{
const
targetIndex
=
this
.
currentDiffIndex
+
step
;
const
targetIndex
=
this
.
currentDiffIndex
+
step
;
...
...
app/views/help/_shortcuts.html.haml
View file @
3c071011
...
@@ -313,6 +313,18 @@
...
@@ -313,6 +313,18 @@
%td
.shortcut
%td
.shortcut
%kbd
p
%kbd
p
%td
=
_
(
'Previous unresolved discussion'
)
%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
%tbody
%tr
%tr
%th
%th
...
...
locale/gitlab.pot
View file @
3c071011
...
@@ -13028,6 +13028,9 @@ msgstr ""
...
@@ -13028,6 +13028,9 @@ msgstr ""
msgid "Merge Request Approvals"
msgid "Merge Request Approvals"
msgstr ""
msgstr ""
msgid "Merge Request Commits"
msgstr ""
msgid "Merge Requests"
msgid "Merge Requests"
msgstr ""
msgstr ""
...
@@ -13886,6 +13889,9 @@ msgstr ""
...
@@ -13886,6 +13889,9 @@ msgstr ""
msgid "Next"
msgid "Next"
msgstr ""
msgstr ""
msgid "Next commit"
msgstr ""
msgid "Next file in diff"
msgid "Next file in diff"
msgstr ""
msgstr ""
...
@@ -15592,6 +15598,9 @@ msgstr ""
...
@@ -15592,6 +15598,9 @@ msgstr ""
msgid "Previous Artifacts"
msgid "Previous Artifacts"
msgstr ""
msgstr ""
msgid "Previous commit"
msgstr ""
msgid "Previous file in diff"
msgid "Previous file in diff"
msgstr ""
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