Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Add history backwards/forwards buttons, fixes #94
azivnera30734f1bc8f
diff --git a/src/public/images/icons/back.png b/src/public/images/icons/back.pngnew file mode 100644index 0000000000..c02e77fc8cBinary files /dev/null and b/src/public/images/icons/back.png differdiff --git a/src/public/images/icons/forward.png b/src/public/images/icons/forward.pngnew file mode 100644index 0000000000..06ee238fafBinary files /dev/null and b/src/public/images/icons/forward.png differdiff --git a/src/public/javascripts/services/entrypoints.js b/src/public/javascripts/services/entrypoints.jsindex a2a7b2abdb..8af5b838a5 100644--- a/src/public/javascripts/services/entrypoints.js+++ b/src/public/javascripts/services/entrypoints.js@@ -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);}diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 9f9fbf81a9..e48fcf11fc 100644--- a/src/public/stylesheets/style.css+++ b/src/public/stylesheets/style.css@@ -366,4 +366,9 @@ div.ui-tooltip {#sql-console-query .CodeMirror {height: 150px;+}++#history-navigation {+ margin: 0 20px 0 5px;+ display: flex;}\ No newline at end of filediff --git a/src/views/index.ejs b/src/views/index.ejsindex c6bd928fd3..7c5f0681e9 100644--- a/src/views/index.ejs+++ b/src/views/index.ejs@@ -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>++ ++ <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>