mirror of
https://github.com/zadam/trilium.git
synced 2025-02-24 15:05:31 +08:00
Add history backwards/forwards buttons, fixes #94
This commit is contained in:
parent
7ad9f7b129
commit
a30734f1bc
5 changed files with 19 additions and 0 deletions
BIN
src/public/images/icons/back.png
Normal file
BIN
src/public/images/icons/back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 511 B |
BIN
src/public/images/icons/forward.png
Normal file
BIN
src/public/images/icons/forward.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 511 B |
|
@ -45,6 +45,10 @@ function registerEntrypoints() {
|
||||||
utils.bindShortcut('alt+o', sqlConsoleDialog.showDialog);
|
utils.bindShortcut('alt+o', sqlConsoleDialog.showDialog);
|
||||||
|
|
||||||
if (utils.isElectron()) {
|
if (utils.isElectron()) {
|
||||||
|
$("#history-navigation").show();
|
||||||
|
$("#history-back-button").click(window.history.back);
|
||||||
|
$("#history-forward-button").click(window.history.forward);
|
||||||
|
|
||||||
utils.bindShortcut('alt+left', window.history.back);
|
utils.bindShortcut('alt+left', window.history.back);
|
||||||
utils.bindShortcut('alt+right', window.history.forward);
|
utils.bindShortcut('alt+right', window.history.forward);
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,4 +366,9 @@ div.ui-tooltip {
|
||||||
|
|
||||||
#sql-console-query .CodeMirror {
|
#sql-console-query .CodeMirror {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#history-navigation {
|
||||||
|
margin: 0 20px 0 5px;
|
||||||
|
display: flex;
|
||||||
}
|
}
|
|
@ -13,6 +13,16 @@
|
||||||
Trilium Notes
|
Trilium Notes
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="history-navigation" style="display: none;">
|
||||||
|
<a id="history-back-button" title="Go to previous note." class="icon-action"
|
||||||
|
style="background: url('/images/icons/back.png')"></a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="history-forward-button" title="Go to next note." class="icon-action"
|
||||||
|
style="background: url('/images/icons/forward.png')"></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="flex-grow: 100;">
|
<div style="flex-grow: 100;">
|
||||||
<button class="btn btn-xs" id="jump-to-note-button" title="CTRL+J">Jump to note</button>
|
<button class="btn btn-xs" id="jump-to-note-button" title="CTRL+J">Jump to note</button>
|
||||||
<button class="btn btn-xs" id="recent-notes-button" title="CTRL+E">Recent notes</button>
|
<button class="btn btn-xs" id="recent-notes-button" title="CTRL+E">Recent notes</button>
|
||||||
|
|
Loading…
Reference in a new issue