Add history backwards/forwards buttons, fixes #94

This commit is contained in:
azivner 2018-05-26 22:54:06 -04:00
parent 7ad9f7b129
commit a30734f1bc
5 changed files with 19 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

View file

@ -45,6 +45,10 @@ function registerEntrypoints() {
utils.bindShortcut('alt+o', sqlConsoleDialog.showDialog);
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+right', window.history.forward);
}

View file

@ -367,3 +367,8 @@ div.ui-tooltip {
#sql-console-query .CodeMirror {
height: 150px;
}
#history-navigation {
margin: 0 20px 0 5px;
display: flex;
}

View file

@ -13,6 +13,16 @@
Trilium Notes
</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>
&nbsp; &nbsp;
<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;">
<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>