2017-10-15 11:31:44 +08:00
<!DOCTYPE html>
2018-06-09 11:18:53 +08:00
<html lang="en" class="theme-<%= theme %>">
2017-10-15 11:31:44 +08:00
<head>
2017-10-16 07:10:36 +08:00
<meta charset="utf-8">
2017-12-27 01:55:40 +08:00
<title>Trilium Notes</title>
2017-10-15 11:31:44 +08:00
</head>
<body>
2018-09-06 17:54:04 +08:00
<div id="container" style="display:none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) <%= rightPaneWidthPercent %>fr">
2017-10-16 07:10:36 +08:00
<div id="header" class="hide-toggle">
2018-05-27 10:54:06 +08:00
<div id="history-navigation" style="display: none;">
<a id="history-back-button" title="Go to previous note." class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/back-24.png')"></a>
2018-05-27 10:54:06 +08:00
<a id="history-forward-button" title="Go to next note." class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/forward-24.png')"></a>
2018-05-27 10:54:06 +08:00
</div>
2018-06-01 08:00:39 +08:00
<div style="flex-grow: 100; display: flex;">
2018-11-06 04:12:03 +08:00
<button class="btn btn-sm" id="jump-to-note-dialog-button" title="CTRL+J">Jump to note</button>
<button class="btn btn-sm" id="recent-changes-button">Recent changes</button>
2018-06-01 08:00:39 +08:00
<div>
<span style="font-size: smaller">Protected session:</span>
<div class="btn-group btn-group-xs">
<button type="button" class="btn" id="protected-session-on">On</button>
<button type="button" class="btn active" id="protected-session-off">Off</button>
</div>
</div>
2017-10-16 07:10:36 +08:00
</div>
2018-02-03 23:37:57 +08:00
<div id="plugin-buttons">
</div>
2017-10-16 07:10:36 +08:00
<div>
2018-11-06 04:12:03 +08:00
<button class="btn btn-sm" id="sync-now-button" title="Number of outstanding changes to be pushed to server">
2018-02-03 23:37:57 +08:00
<span class="ui-icon ui-icon-refresh"></span>
2018-07-25 03:43:15 +08:00
Sync now (<span id="outstanding-syncs-count">0</span>)
2017-12-22 20:00:17 +08:00
</button>
2017-10-29 23:22:41 +08:00
2018-11-06 04:12:03 +08:00
<button class="btn btn-sm" id="options-button">
2018-04-02 05:41:28 +08:00
<span class="ui-icon ui-icon-gear"></span> Options</button>
2017-10-16 07:10:36 +08:00
2017-12-27 11:19:42 +08:00
<form action="logout" id="logout-button" method="POST" style="display: inline;">
2018-11-06 04:12:03 +08:00
<button type="submit" class="btn btn-sm">Logout</button>
2017-10-16 07:10:36 +08:00
</form>
</div>
</div>
2018-09-06 15:33:38 +08:00
<div id="left-pane" class="hide-toggle">
<div id="global-buttons">
2018-03-24 12:54:50 +08:00
<a id="create-top-level-note-button" title="Create new top level note" class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/file-plus-24.png')"></a>
2017-10-16 07:10:36 +08:00
2018-08-30 00:31:29 +08:00
<a id="collapse-tree-button" title="Collapse note tree. Shortcut ALT+C" class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/list-24.png')"></a>
2017-10-16 07:10:36 +08:00
2018-03-24 12:54:50 +08:00
<a id="scroll-to-current-note-button" title="Scroll to current note. Shortcut CTRL+." class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/crosshair-24.png')"></a>
2017-10-16 07:10:36 +08:00
2018-08-30 00:31:29 +08:00
<a id="toggle-search-button" title="Search in notes. Shortcut CTRL+S" class="icon-action"
2018-06-08 11:02:21 +08:00
style="background: url('/images/icons/search-24.png')"></a>
2017-12-05 07:21:57 +08:00
</div>
2018-02-26 13:07:43 +08:00
<input type="file" id="import-upload" style="display: none" />
2017-10-16 07:10:36 +08:00
2018-09-06 15:33:38 +08:00
<div id="search-box">
2018-04-14 07:58:33 +08:00
<div style="display: flex; align-items: center;">
<input name="search-text" placeholder="Search text, labels" style="flex-grow: 100; margin-left: 5px; margin-right: 5px;" autocomplete="off">
2018-06-09 21:28:50 +08:00
<button id="do-search-button" class="btn btn-sm icon-button" title="Search (enter)"
style="background-image: url('/images/icons/search-20.png');"></button>
2018-06-05 11:21:45 +08:00
2018-06-09 21:28:50 +08:00
<button id="save-search-button" class="btn btn-sm icon-button" title="Save search"
style="background-image: url('/images/icons/save-20.png');"></button>
2018-06-08 07:50:16 +08:00
2018-06-09 21:28:50 +08:00
<button id="close-search-button" class="btn btn-sm icon-button" title="Close search"
style="background-image: url('/images/icons/x-20.png');"></button>
2018-04-14 07:58:33 +08:00
</div>
2018-06-04 08:42:25 +08:00
</div>
2018-03-14 08:02:00 +08:00
2018-06-05 08:22:41 +08:00
<div id="search-results">
2018-06-04 08:42:25 +08:00
<strong>Search results:</strong>
2018-03-14 08:02:00 +08:00
2018-06-04 08:42:25 +08:00
<ul id="search-results-inner">
<li>aaa</li>
<li>bbb</li>
<li>ccc</li>
</ul>
2017-10-16 07:10:36 +08:00
</div>
2018-06-05 08:22:41 +08:00
<div id="tree"></div>
2017-11-22 09:04:06 +08:00
</div>
2018-09-06 15:33:38 +08:00
<div id="title-container">
2018-06-10 22:53:39 +08:00
<div style="display: flex; align-items: center;">
<div class="dropdown hide-toggle">
2018-06-01 11:21:47 +08:00
<button id="note-path-list-button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
<span id="note-path-count">1 path</span>
<span class="caret"></span>
</button>
<ul id="note-path-list" class="dropdown-menu" aria-labelledby="note-path-list-button">
</ul>
</div>
2018-08-17 05:16:17 +08:00
<input autocomplete="off" value="" id="note-title" style="margin-left: 15px; font-size: x-large; border: 0; width: 5em; flex-grow: 100;" tabindex="1">
2018-06-01 11:21:47 +08:00
2018-06-10 22:53:39 +08:00
<div class="hide-toggle" style="display: flex; align-items: center;">
<span id="note-id-display" title="Note ID"></span>
<button class="btn btn-sm icon-button"
style="display: none; margin-right: 10px; background-image: url('/images/icons/play-20.png');"
2018-08-29 02:55:21 +08:00
title="Render"
2018-06-10 22:53:39 +08:00
id="render-button"></button>
<button class="btn btn-sm icon-button"
style="display: none; margin-right: 10px; background-image: url('/images/icons/play-20.png');"
title="Execute (Ctrl+Enter)"
id="execute-script-button"></button>
<div>
<button type="button"
class="btn btn-sm icon-button"
id="protect-button"
title="Protected note can be viewed and edited only after entering password"
style="background-image: url('/images/icons/shield-20.png');">
</button><button type="button"
class="btn btn-sm icon-button"
id="unprotect-button"
title="Not protected note can be viewed without entering password"
style="background-image: url('/images/icons/shield-off-20.png');">
</button>
</div>
2017-12-25 22:46:11 +08:00
2018-06-10 22:53:39 +08:00
<div class="dropdown" id="note-type" data-bind="visible: type() != 'search'">
2018-11-06 04:12:03 +08:00
<button data-bind="disable: isDisabled()" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
2018-06-10 22:53:39 +08:00
Type: <span data-bind="text: typeString()"></span>
<span class="caret"></span>
</button>
2018-11-06 04:12:03 +08:00
<div id="note-type-dropdown" class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" data-bind="click: selectText, css: { selected: type() == 'text' }"><span class="check">✓</span> <strong>Text</strong></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" data-bind="click: selectRelationMap, css: { selected: type() == 'relation-map' && mime() == '' }"><span class="check">✓</span> <strong>Relation Map</strong></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" data-bind="click: selectRender, css: { selected: type() == 'render' && mime() == '' }"><span class="check">✓</span> <strong>Render HTML note</strong></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" data-bind="click: selectCode, css: { selected: type() == 'code' && mime() == '' }"><span class="check">✓</span> <strong>Code</strong></a>
2018-06-10 22:53:39 +08:00
<!-- ko foreach: codeMimeTypes -->
2018-11-06 04:12:03 +08:00
<a class="dropdown-item" data-bind="click: $parent.selectCodeMime, css: { selected: $parent.type() == 'code' && $parent.mime() == mime }"><span class="check">✓</span> <span data-bind="text: title"></span></a>
2018-06-10 22:53:39 +08:00
<!-- /ko -->
2018-11-06 04:12:03 +08:00
</div>
2018-06-10 22:53:39 +08:00
</div>
2018-01-22 12:06:25 +08:00
2018-06-10 22:53:39 +08:00
<div class="dropdown" id="note-actions">
2018-11-06 04:12:03 +08:00
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
2018-06-10 22:53:39 +08:00
Note actions
<span class="caret"></span>
</button>
2018-11-06 04:12:03 +08:00
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" id="show-note-revisions-button">Revisions</a>
<a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a>
<a class="dropdown-item" id="show-source-button">HTML source</a>
<a class="dropdown-item" id="upload-file-button">Upload file</a>
<a class="dropdown-item" id="export-note-to-markdown-button">Export as markdown</a>
</div>
2018-06-10 22:53:39 +08:00
</div>
2018-01-20 08:36:41 +08:00
</div>
2017-10-16 07:10:36 +08:00
</div>
</div>
2018-05-09 04:39:01 +08:00
<div id="note-detail-wrapper">
2018-07-29 22:06:13 +08:00
<div id="note-detail-script-area"></div>
2018-08-06 20:43:42 +08:00
<table id="note-detail-promoted-attributes"></table>
2018-08-06 14:59:26 +08:00
2018-04-12 10:44:33 +08:00
<div id="note-detail-component-wrapper">
2018-08-14 19:50:04 +08:00
<div id="note-detail-text" class="note-detail-component" tabindex="10000"></div>
2018-04-09 10:38:52 +08:00
<div id="note-detail-search" class="note-detail-component">
<div style="display: flex; align-items: center;">
<strong>Search string: </strong>
<textarea rows="4" cols="50" id="search-string"></textarea>
</div>
<br />
<h4>Help</h4>
<p>
<ul>
<li>
<code>@abc</code> - matches notes with label abc</li>
<li>
<code>@!abc</code> - matches notes without abc label (maybe not the best syntax)</li>
<li>
<code>@abc=true</code> - matches notes with label abc having value true</li>
<li><code>@abc!=true</code></li>
<li>
<code>@"weird label"="weird value"</code> - works also with whitespace inside names values</li>
<li>
<code>@abc and @def</code> - matches notes with both abc and def</li>
<li>
<code>@abc @def</code> - AND relation is implicit when specifying multiple labels</li>
<li>
<code>@abc or @def</code> - OR relation</li>
<li>
<code>@abc<=5</code> - numerical comparison (also >, >=, <).</li>
<li>
<code>some search string @abc @def</code> - combination of fulltext and label search - both of them need to match (OR not supported)</li>
<li>
<code>@abc @def some search string</code> - same combination</li>
</ul>
2018-08-15 16:14:14 +08:00
<button class="btn btn-sm" type="button" data-help-page="Search">
<i class="glyphicon glyphicon-info-sign"></i> Complete help on search
</button>
2018-04-09 10:38:52 +08:00
</p>
2018-03-11 22:49:22 +08:00
</div>
2018-04-09 10:38:52 +08:00
<div id="note-detail-code" class="note-detail-component"></div>
2018-08-29 02:55:21 +08:00
<div id="note-detail-render" class="note-detail-component">
<div id="note-detail-render-help" class="alert alert-warning">
<p><strong>This help note is shown because this note of type Render HTML doesn't have required relation to function properly.</strong></p>
<p>Render HTML note type is used for <a href="https://github.com/zadam/trilium/wiki/Scripts">scripting</a>. In short, you have a HTML code note (optionally with some JavaScript) and this note will render it. To make it work, you need to define a relation (in <a class="show-attributes-button">Attributes dialog</a>) called "renderNote" pointing to the HTML note to render. Once that's defined you can click on the "play" button to render.</p>
</div>
<div id="note-detail-render-content"></div>
</div>
2018-04-09 10:38:52 +08:00
<div id="note-detail-file" class="note-detail-component">
<table id="file-table">
<tr>
<th>File name:</th>
<td id="file-filename"></td>
</tr>
<tr>
<th>File type:</th>
<td id="file-filetype"></td>
</tr>
<tr>
<th>File size:</th>
<td id="file-filesize"></td>
</tr>
<tr>
<td>
<button id="file-download" class="btn btn-primary" type="button">Download</button>
<button id="file-open" class="btn btn-primary" type="button">Open</button>
</td>
</tr>
</table>
</div>
2018-03-11 22:49:22 +08:00
2018-04-09 10:38:52 +08:00
<input type="file" id="file-upload" style="display: none" />
2018-10-18 17:25:33 +08:00
<div id="note-detail-relation-map" class="note-detail-component">
2018-10-31 19:29:01 +08:00
<button id="relation-map-add-child-notes" class="btn" type="button"
title="Add all child notes of this relation map note">Add child notes</button>
2018-11-01 01:21:58 +08:00
2018-10-31 19:29:01 +08:00
<button id="relation-map-create-child-note" class="btn" type="button"
title="Create new child note and add it into this relation map">Create child note</button>
2018-10-18 17:46:07 +08:00
2018-10-31 03:22:05 +08:00
<div class="btn-group" style="float: right; padding-right: 20px;">
<button type="button"
class="btn icon-button24"
title="Zoom In"
id="relation-map-zoom-in"
style="background-image: url('/images/icons/zoom-in-24.png');"/>
<button type="button"
class="btn icon-button24"
title="Zoom Out"
id="relation-map-zoom-out"
style="background-image: url('/images/icons/zoom-out-24.png');"/>
</div>
2018-10-18 17:46:07 +08:00
<div id="relation-map-canvas"></div>
2018-10-18 17:25:33 +08:00
</div>
2018-03-11 22:49:22 +08:00
</div>
2018-01-21 10:56:03 +08:00
2018-04-11 12:10:11 +08:00
<div id="children-overview"></div>
2018-02-05 09:23:30 +08:00
2018-08-06 15:41:01 +08:00
<div id="attribute-list">
<button class="btn btn-sm show-attributes-button">Attributes:</button>
<span id="attribute-list-inner"></span>
</div>
2018-02-05 09:23:30 +08:00
</div>
2017-10-16 07:10:36 +08:00
2018-11-06 19:46:29 +08:00
<div class="dropdown-menu dropdown-menu-sm context-menu" id="tree-context-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
2018-11-06 21:16:38 +08:00
<% include dialogs/add_link.ejs %>
<% include dialogs/attributes.ejs %>
2018-11-07 00:47:40 +08:00
<% include dialogs/branch_prefix.ejs %>
2018-11-06 21:16:38 +08:00
<% include dialogs/event_log.ejs %>
<% include dialogs/jump_to_note.ejs %>
<% include dialogs/markdown_import.ejs %>
<% include dialogs/note_revisions.ejs %>
<% include dialogs/note_source.ejs %>
<% include dialogs/options.ejs %>
<% include dialogs/protected_session_password.ejs %>
<% include dialogs/recent_changes.ejs %>
<% include dialogs/sql_console.ejs %>
2018-09-06 15:33:38 +08:00
</div>
2017-10-16 07:10:36 +08:00
<script type="text/javascript">
2018-03-26 08:18:08 +08:00
window.baseApiUrl = 'api/';
window.glob = {
2017-12-17 09:48:34 +08:00
activeDialog: null,
2017-12-20 12:22:21 +08:00
sourceId: '<%= sourceId %>',
2018-04-03 09:34:28 +08:00
maxSyncIdAtLoad: <%= maxSyncIdAtLoad %>,
instanceName: '<%= instanceName %>'
2017-12-17 09:48:34 +08:00
};
2017-10-16 07:10:36 +08:00
</script>
2017-10-21 11:43:20 +08:00
<!-- Required for correct loading of scripts in Electron -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
2018-03-25 00:52:58 +08:00
<script src="/libraries/jquery.min.js"></script>
2017-10-16 07:10:36 +08:00
<!-- bootstrap needs to be included before jQuery UI, otherwise close icon in the dialog will be missing -->
2018-11-06 04:12:03 +08:00
<link href="/libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="/libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
2017-10-16 07:10:36 +08:00
2018-03-25 00:52:58 +08:00
<script src="/libraries/bootstrap-notify.min.js"></script>
2017-11-27 01:56:07 +08:00
2017-10-16 07:10:36 +08:00
<!-- Include Fancytree skin and library -->
2018-03-25 00:52:58 +08:00
<link href="/libraries/fancytree/skin-win8/ui.fancytree.css" rel="stylesheet">
2018-11-07 02:35:42 +08:00
<script src="/libraries/fancytree/jquery.fancytree-all-deps.min.js"></script>
2017-10-16 07:10:36 +08:00
2018-03-25 00:52:58 +08:00
<script src="/libraries/jquery.hotkeys.js"></script>
<script src="/libraries/jquery.fancytree.hotkeys.js"></script>
2017-10-16 07:10:36 +08:00
2018-03-25 00:52:58 +08:00
<script src="/libraries/knockout.min.js"></script>
2018-01-11 13:01:16 +08:00
2018-03-25 00:52:58 +08:00
<link href="/stylesheets/style.css" rel="stylesheet">
2017-10-16 07:10:36 +08:00
2018-03-26 01:02:39 +08:00
<script src="/javascripts/services/bootstrap.js" type="module"></script>
2018-03-24 23:18:46 +08:00
2018-01-03 11:01:38 +08:00
<script type="text/javascript">
// we hide container initally because otherwise it is rendered first without CSS and then flickers into
// final form which is pretty ugly.
$("#container").show();
</script>
2018-03-08 12:24:23 +08:00
<style type="text/css">
<%= appCss %>
</style>
2017-10-15 11:31:44 +08:00
</body>
2017-10-16 07:10:36 +08:00
</html>