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
moved "About" from options dialog to a separate dialog under global menu
zadam6c7e2f0aa1bd
diff --git a/src/public/javascripts/dialogs/about.js b/src/public/javascripts/dialogs/about.jsnew file mode 100644index 0000000000..cac22397d3--- /dev/null+++ b/src/public/javascripts/dialogs/about.js@@ -0,0 +1,29 @@+import server from "../services/server.js";++const $dialog = $("#about-dialog");+const $appVersion = $("#app-version");+const $dbVersion = $("#db-version");+const $syncVersion = $("#sync-version");+const $buildDate = $("#build-date");+const $buildRevision = $("#build-revision");+const $dataDirectory = $("#data-directory");++async function showDialog() {+ const appInfo = await server.get('app-info');++ $appVersion.text(appInfo.appVersion);+ $dbVersion.text(appInfo.dbVersion);+ $syncVersion.text(appInfo.syncVersion);+ $buildDate.text(appInfo.buildDate);+ $buildRevision.text(appInfo.buildRevision);+ $buildRevision.attr('href', 'https://github.com/zadam/trilium/commit/' + appInfo.buildRevision);+ $dataDirectory.text(appInfo.dataDirectory);++ glob.activeDialog = $dialog;++ $dialog.modal();+}++export default {+ showDialog+}\ No newline at end of filediff --git a/src/public/javascripts/dialogs/options.js b/src/public/javascripts/dialogs/options.jsindex 3a1b82e98d..c2b7213889 100644--- a/src/public/javascripts/dialogs/options.js+++ b/src/public/javascripts/dialogs/options.js@@ -247,27 +247,6 @@ addTabHandler((function () {};})());-addTabHandler((async function () {- const $appVersion = $("#app-version");- const $dbVersion = $("#db-version");- const $syncVersion = $("#sync-version");- const $buildDate = $("#build-date");- const $buildRevision = $("#build-revision");- const $dataDirectory = $("#data-directory");-- const appInfo = await server.get('app-info');-- $appVersion.text(appInfo.appVersion);- $dbVersion.text(appInfo.dbVersion);- $syncVersion.text(appInfo.syncVersion);- $buildDate.text(appInfo.buildDate);- $buildRevision.text(appInfo.buildRevision);- $buildRevision.attr('href', 'https://github.com/zadam/trilium/commit/' + appInfo.buildRevision);- $dataDirectory.text(appInfo.dataDirectory);-- return {};-})());-addTabHandler((function() {const $form = $("#sync-setup-form");const $syncServerHost = $("#sync-server-host");diff --git a/src/public/javascripts/services/entrypoints.js b/src/public/javascripts/services/entrypoints.jsindex ad116f55a0..f22b03efe9 100644--- a/src/public/javascripts/services/entrypoints.js+++ b/src/public/javascripts/services/entrypoints.js@@ -13,6 +13,7 @@ import searchNotesService from "./search_notes.js";import attributesDialog from "../dialogs/attributes.js";import helpDialog from "../dialogs/help.js";import noteInfoDialog from "../dialogs/note_info.js";+import aboutDialog from "../dialogs/about.js";import protectedSessionService from "./protected_session.js";function registerEntrypoints() {@@ -63,6 +64,8 @@ function registerEntrypoints() {$("#show-note-info-button").click(noteInfoDialog.showDialog);+ $("#show-about-dialog-button").click(aboutDialog.showDialog);+if (utils.isElectron()) {$("#history-navigation").show();$("#history-back-button").click(window.history.back);diff --git a/src/views/desktop.ejs b/src/views/desktop.ejsindex 3937fcef06..a9544f023d 100644--- a/src/views/desktop.ejs+++ b/src/views/desktop.ejs@@ -79,6 +79,11 @@<kbd>ALT+O</kbd></a>+ <a class="dropdown-item" id="show-about-dialog-button">+ <span class="jam jam-info"></span>+ About Trilium Notes+ </a>+<a class="dropdown-item" id="logout-button"><span class="jam jam-log-out"></span>Logout@@ -207,6 +212,7 @@<% include details/detail.ejs %>+ <% include dialogs/about.ejs %><% include dialogs/add_link.ejs %><% include dialogs/attributes.ejs %><% include dialogs/branch_prefix.ejs %>diff --git a/src/views/dialogs/about.ejs b/src/views/dialogs/about.ejsnew file mode 100644index 0000000000..aabb27221f--- /dev/null+++ b/src/views/dialogs/about.ejs@@ -0,0 +1,47 @@+<div id="about-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">+ <div class="modal-dialog modal-lg" role="document">+ <div class="modal-content">+ <div class="modal-header">+ <h5 class="modal-title mr-auto">About Trilium Notes</h5>++ <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">+ <span aria-hidden="true">×</span>+ </button>+ </div>+ <div class="modal-body">+ <table class="table">+ <tr>+ <th>Homepage:</th>+ <td><a href="https://github.com/zadam/trilium" class="external">https://github.com/zadam/trilium</a></td>+ </tr>+ <tr>+ <th>App version:</th>+ <td id="app-version"></td>+ </tr>+ <tr>+ <th>DB version:</th>+ <td id="db-version"></td>+ </tr>+ <tr>+ <th>Sync version:</th>+ <td id="sync-version"></td>+ </tr>+ <tr>+ <th>Build date:</th>+ <td id="build-date"></td>+ </tr>++ <tr>+ <th>Build revision:</th>+ <td><a href="" target="_blank" id="build-revision"></a></td>+ </tr>++ <tr>+ <th>Data directory:</th>+ <td id="data-directory"></td>+ </tr>+ </table>+ </div>+ </div>+ </div>+</div>diff --git a/src/views/dialogs/options.ejs b/src/views/dialogs/options.ejsindex d8ef6ee4c9..4fb8c3e14c 100644--- a/src/views/dialogs/options.ejs+++ b/src/views/dialogs/options.ejs@@ -28,9 +28,6 @@<li class="nav-item"><a class="nav-link" data-toggle="tab" href="#advanced">Advanced</a></li>- <li class="nav-item">- <a class="nav-link" data-toggle="tab" href="#about">About Trilium</a>- </li></ul><br/><div class="tab-content">@@ -228,37 +225,6 @@<button id="vacuum-database-button" class="btn btn-secondary">Vacuum database</button></div>-- <div id="about" class="tab-pane">- <table class="table">- <tr>- <th>App version:</th>- <td id="app-version"></td>- </tr>- <tr>- <th>DB version:</th>- <td id="db-version"></td>- </tr>- <tr>- <th>Sync version:</th>- <td id="sync-version"></td>- </tr>- <tr>- <th>Build date:</th>- <td id="build-date"></td>- </tr>-- <tr>- <th>Build revision:</th>- <td><a href="" target="_blank" id="build-revision"></a></td>- </tr>-- <tr>- <th>Data directory:</th>- <td id="data-directory"></td>- </tr>- </table>- </div></div></div></div>