mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
moved "About" from options dialog to a separate dialog under global menu
This commit is contained in:
parent
9fc5d328b4
commit
6c7e2f0aa1
29
src/public/javascripts/dialogs/about.js
Normal file
29
src/public/javascripts/dialogs/about.js
Normal file
@ -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
|
||||
}
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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 %>
|
||||
|
47
src/views/dialogs/about.ejs
Normal file
47
src/views/dialogs/about.ejs
Normal file
@ -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>
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user