Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
8be66e5c
Commit
8be66e5c
authored
4 years ago
by
Arkerthan
Browse files
Options
Downloads
Patches
Plain Diff
add dynamic hotkey display for return link
parent
05c1b503
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6912
Custom hotkeys
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gui/quicklinks.js
+6
-3
6 additions, 3 deletions
src/gui/quicklinks.js
with
6 additions
and
3 deletions
src/gui/quicklinks.js
+
6
−
3
View file @
8be66e5c
...
...
@@ -17,7 +17,7 @@ App.UI.quickMenu = (function() {
const
noHistory
=
Story
.
lookup
(
"
tags
"
,
"
no-history
"
).
map
(
passage
=>
passage
.
title
);
// if property name is a passage name, then it's a link, otherwise only text.
// category titles
are never links to passages
// category titles are never links to passages
// Only two values are allowed: true or an object following the same rules
const
layout
=
addOtherCategory
({
Main
:
true
,
...
...
@@ -284,7 +284,7 @@ App.UI.quickMenu = (function() {
history
.
shift
();
}
});
App
.
UI
.
Hotkeys
.
add
(
"
Back in
history
"
,
{
callback
:
goBack
,
combinations
:
[
"
backspace
"
]});
App
.
UI
.
Hotkeys
.
add
(
"
history
Back
"
,
{
callback
:
goBack
,
combinations
:
[
"
backspace
"
]
,
uiName
:
"
Back in history
"
});
/**
* Goes back in history if possible.
...
...
@@ -307,7 +307,10 @@ App.UI.quickMenu = (function() {
const
a
=
document
.
createElement
(
"
a
"
);
a
.
append
(
"
Return
"
);
a
.
onclick
=
goBack
;
div
.
append
(
a
,
"
"
,
App
.
UI
.
DOM
.
makeElement
(
"
span
"
,
"
[backspace]
"
,
"
hotkey
"
));
const
hotkey
=
App
.
UI
.
Hotkeys
.
hotkeys
(
"
historyBack
"
);
if
(
hotkey
!==
""
)
{
div
.
append
(
a
,
"
"
,
App
.
UI
.
DOM
.
makeElement
(
"
span
"
,
hotkey
,
"
hotkey
"
));
}
// insert at second position
linkList
.
splice
(
1
,
0
,
div
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment