unify ejs indentation to 4 spaces

This commit is contained in:
azivner 2018-12-23 10:57:40 +01:00
parent 042f9b7f2d
commit d0d24f0f4a
16 changed files with 834 additions and 834 deletions

13
package-lock.json generated
View File

@ -1820,9 +1820,9 @@
"integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=" "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI="
}, },
"debug": { "debug": {
"version": "4.1.0", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
"integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": { "requires": {
"ms": "^2.1.1" "ms": "^2.1.1"
}, },
@ -7194,10 +7194,9 @@
"integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA=" "integrity": "sha1-ICtIAhoMTL3i34DeFaF0Q8i0OYA="
}, },
"node-abi": { "node-abi": {
"version": "2.4.5", "version": "2.5.1",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.4.5.tgz", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.5.1.tgz",
"integrity": "sha512-aa/UC6Nr3+tqhHGRsAuw/edz7/q9nnetBrKWxj6rpTtm+0X9T1qU7lIEHMS3yN9JwAbRiKUbRRFy1PLz/y3aaA==", "integrity": "sha512-oDbFc7vCFx0RWWCweTer3hFm1u+e60N5FtGnmRV6QqvgATGFH/XRR6vqWIeBVosCYCqt6YdIr2L0exLZuEdVcQ==",
"dev": true,
"requires": { "requires": {
"semver": "^5.4.1" "semver": "^5.4.1"
} }

View File

@ -1,53 +1,53 @@
<div id="add-link-dialog" class="modal mx-auto" tabindex="-1" role="dialog"> <div id="add-link-dialog" class="modal mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document"> <div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title mr-auto">Add note link</h5> <h5 class="modal-title mr-auto">Add note link</h5>
<button type="button" class="help-button" title="Help on links" data-help-page="Links">?</button> <button type="button" class="help-button" title="Help on links" data-help-page="Links">?</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div>
<form id="add-link-form">
<div class="modal-body">
<div id="add-link-type-div" class="radio">
<label title="Add HTML link to the selected note at cursor in current note">
<input type="radio" name="add-link-type" value="html"/>
add normal HTML link</label>
<label title="Add selected note as a child of current note">
<input type="radio" name="add-link-type" value="selected-to-current"/>
add selected note to current note</label>
<label title="Add current note as a child of the selected note">
<input type="radio" name="add-link-type" value="current-to-selected"/>
add current note to selected note</label>
</div> </div>
<form id="add-link-form">
<div class="modal-body">
<div id="add-link-type-div" class="radio">
<label title="Add HTML link to the selected note at cursor in current note">
<input type="radio" name="add-link-type" value="html"/>
add normal HTML link</label>
<div class="form-group"> <label title="Add selected note as a child of current note">
<label for="note-autocomplete">Note</label> <input type="radio" name="add-link-type" value="selected-to-current"/>
add selected note to current note</label>
<div class="input-group"> <label title="Add current note as a child of the selected note">
<input id="note-autocomplete" class="form-control" placeholder="search for note by its name"> <input type="radio" name="add-link-type" value="current-to-selected"/>
</div> add current note to selected note</label>
</div> </div>
<div class="form-group" id="add-link-title-form-group"> <div class="form-group">
<label for="link-title">Link title</label> <label for="note-autocomplete">Note</label>
<input id="link-title" class="form-control" style="width: 100%;">
</div>
<div class="form-group" id="add-link-prefix-form-group" title="Cloned note will be shown in note tree with given prefix"> <div class="input-group">
<label for="clone-prefix">Prefix (optional)</label> <input id="note-autocomplete" class="form-control" placeholder="search for note by its name">
<input id="clone-prefix" class="form-control" style="width: 100%;"> </div>
</div> </div>
<div class="form-group" id="add-link-title-form-group">
<label for="link-title">Link title</label>
<input id="link-title" class="form-control" style="width: 100%;">
</div>
<div class="form-group" id="add-link-prefix-form-group" title="Cloned note will be shown in note tree with given prefix">
<label for="clone-prefix">Prefix (optional)</label>
<input id="clone-prefix" class="form-control" style="width: 100%;">
</div>
</div>
<div class="modal-footer" style="display: flex; justify-content: space-between;">
<button type="submit" class="btn btn-primary">Add note link <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
<div class="modal-footer" style="display: flex; justify-content: space-between;">
<button type="submit" class="btn btn-primary">Add note link <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
</div>
</div> </div>

View File

@ -1,149 +1,149 @@
<div id="attributes-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="attributes-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" style="max-width: 1000px" role="document"> <div class="modal-dialog modal-lg" style="max-width: 1000px" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title mr-auto">Note attributes</h5> <h5 class="modal-title mr-auto">Note attributes</h5>
<button class="help-button" type="button" data-help-page="Attributes" title="Help on Attributes">?</button> <button class="help-button" type="button" data-help-page="Attributes" title="Help on Attributes">?</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<form data-bind="submit: save"> <form data-bind="submit: save">
<div class="modal-body"> <div class="modal-body">
<div style="height: 97%; overflow: auto"> <div style="height: 97%; overflow: auto">
<table id="owned-attributes-table" class="table"> <table id="owned-attributes-table" class="table">
<thead> <thead>
<tr> <tr>
<th>Type</th> <th>Type</th>
<th>Name</th> <th>Name</th>
<th>Value</th> <th>Value</th>
<th>Inheritable</th> <th>Inheritable</th>
</tr> </tr>
</thead> </thead>
<tbody data-bind="foreach: ownedAttributes"> <tbody data-bind="foreach: ownedAttributes">
<tr data-bind="if: !isDeleted"> <tr data-bind="if: !isDeleted">
<td> <td>
<input type="hidden" name="position" data-bind="value: position"/> <input type="hidden" name="position" data-bind="value: position"/>
<select class="form-control attribute-type-select" style="width: auto;" <select class="form-control attribute-type-select" style="width: auto;"
data-bind="options: $parent.availableTypes, optionsText: 'text', optionsValue: 'value', value: type, event: { change: $parent.typeChanged }"></select> data-bind="options: $parent.availableTypes, optionsText: 'text', optionsValue: 'value', value: type, event: { change: $parent.typeChanged }"></select>
</td> </td>
<td> <td>
<!-- Change to valueUpdate: blur is necessary because jQuery UI autocomplete hijacks change event --> <!-- Change to valueUpdate: blur is necessary because jQuery UI autocomplete hijacks change event -->
<input type="text" class="attribute-name form-control" <input type="text" class="attribute-name form-control"
data-bind="value: name, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }"/> data-bind="value: name, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }"/>
<div style="color: red" data-bind="if: $parent.isEmptyName($index())">Attribute name <div style="color: red" data-bind="if: $parent.isEmptyName($index())">Attribute name
can't be empty. can't be empty.
</div> </div>
</td> </td>
<td> <td>
<input type="text" class="label-value form-control" <input type="text" class="label-value form-control"
data-bind="visible: type == 'label', value: labelValue, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }" data-bind="visible: type == 'label', value: labelValue, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }"
style="width: 300px"/> style="width: 300px"/>
<div class="relation-value input-group" data-bind="visible: type == 'relation'" <div class="relation-value input-group" data-bind="visible: type == 'relation'"
style="width: 300px;"> style="width: 300px;">
<input class="form-control relation-target-note-id" <input class="form-control relation-target-note-id"
placeholder="search for note by its name" placeholder="search for note by its name"
data-bind="noteAutocomplete, value: relationValue, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }"> data-bind="noteAutocomplete, value: relationValue, valueUpdate: 'blur', event: { blur: $parent.attributeChanged }">
<div style="color: red" data-bind="if: $parent.isEmptyRelationTarget($index())">Relation target note <div style="color: red" data-bind="if: $parent.isEmptyRelationTarget($index())">Relation target note
can't be empty. can't be empty.
</div> </div>
</div> </div>
<div data-bind="visible: type == 'label-definition'"> <div data-bind="visible: type == 'label-definition'">
<select data-bind="options: $parent.availableLabelTypes, optionsText: 'text', optionsValue: 'value', value: labelDefinition.labelType"></select> <select data-bind="options: $parent.availableLabelTypes, optionsText: 'text', optionsValue: 'value', value: labelDefinition.labelType"></select>
<select data-bind="options: $parent.multiplicityTypes, optionsText: 'text', optionsValue: 'value', value: labelDefinition.multiplicityType"></select> <select data-bind="options: $parent.multiplicityTypes, optionsText: 'text', optionsValue: 'value', value: labelDefinition.multiplicityType"></select>
<label> <label>
<input type="checkbox" value="true" <input type="checkbox" value="true"
data-bind="checked: labelDefinition.isPromoted"/> data-bind="checked: labelDefinition.isPromoted"/>
Promoted Promoted
</label> </label>
<div data-bind="visible: labelDefinition.labelType === 'number'" <div data-bind="visible: labelDefinition.labelType === 'number'"
title="Precision of floating point numbers - 0 means effectively integer, 2 allows entering e.g. 1.23"> title="Precision of floating point numbers - 0 means effectively integer, 2 allows entering e.g. 1.23">
Number precision: <input type="number" min="0" max="9" data-bind="value: labelDefinition.numberPrecision" style="width: 50px;"/> Number precision: <input type="number" min="0" max="9" data-bind="value: labelDefinition.numberPrecision" style="width: 50px;"/>
</div> </div>
</div> </div>
<div data-bind="visible: type == 'relation-definition'"> <div data-bind="visible: type == 'relation-definition'">
<select data-bind="options: $parent.multiplicityTypes, optionsText: 'text', optionsValue: 'value', value: relationDefinition.multiplicityType"></select> <select data-bind="options: $parent.multiplicityTypes, optionsText: 'text', optionsValue: 'value', value: relationDefinition.multiplicityType"></select>
<label> <label>
<input type="checkbox" value="true" <input type="checkbox" value="true"
data-bind="checked: relationDefinition.isPromoted"/> data-bind="checked: relationDefinition.isPromoted"/>
Promoted Promoted
</label> </label>
<br/> <br/>
<label> <label>
Inverse relation: Inverse relation:
<input type="text" value="true" class="attribute-name" data-bind="value: relationDefinition.inverseRelation"/> <input type="text" value="true" class="attribute-name" data-bind="value: relationDefinition.inverseRelation"/>
</label> </label>
</div> </div>
</td> </td>
<td title="Inheritable relations are automatically inherited to the child notes"> <td title="Inheritable relations are automatically inherited to the child notes">
<input type="checkbox" value="1" data-bind="checked: isInheritable"/> <input type="checkbox" value="1" data-bind="checked: isInheritable"/>
&nbsp; &nbsp;
<span title="Delete" style="padding: 13px; cursor: pointer;" class="jam jam-trash" <span title="Delete" style="padding: 13px; cursor: pointer;" class="jam jam-trash"
data-bind="click: $parent.deleteAttribute"></span> data-bind="click: $parent.deleteAttribute"></span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div data-bind="if: inheritedAttributes().length > 0"> <div data-bind="if: inheritedAttributes().length > 0">
<h4>Inherited attributes</h4> <h4>Inherited attributes</h4>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Type</th> <th>Type</th>
<th>Name</th> <th>Name</th>
<th>Value</th> <th>Value</th>
<th>Owning note</th> <th>Owning note</th>
</tr> </tr>
</thead> </thead>
<tbody data-bind="foreach: inheritedAttributes"> <tbody data-bind="foreach: inheritedAttributes">
<tr> <tr>
<td data-bind="text: type"></td> <td data-bind="text: type"></td>
<td data-bind="text: name"></td> <td data-bind="text: name"></td>
<td> <td>
<span data-bind="if: type == 'label'"> <span data-bind="if: type == 'label'">
<span data-bind="text: value"></span> <span data-bind="text: value"></span>
</span> </span>
<span data-bind="if: type == 'relation'"> <span data-bind="if: type == 'relation'">
<span data-bind="noteLink: value"></span> <span data-bind="noteLink: value"></span>
</span> </span>
<span data-bind="if: type == 'label-definition'"> <span data-bind="if: type == 'label-definition'">
<span data-bind="text: value.labelType"></span> <span data-bind="text: value.labelType"></span>
<span data-bind="text: value.multiplicityType"></span> <span data-bind="text: value.multiplicityType"></span>
promoted: <span data-bind="text: value.isPromoted"></span> promoted: <span data-bind="text: value.isPromoted"></span>
</span> </span>
<span data-bind="if: type == 'relation-definition'"> <span data-bind="if: type == 'relation-definition'">
<span data-bind="text: value.multiplicityType"></span> <span data-bind="text: value.multiplicityType"></span>
promoted: <span data-bind="text: value.isPromoted"></span> promoted: <span data-bind="text: value.isPromoted"></span>
</span> </span>
</td> </td>
<td data-bind="noteLink: noteId"></td> <td data-bind="noteLink: noteId"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-large" style="width: 200px;" id="save-attributes-button" type="submit">
Save changes <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
<div class="modal-footer">
<button class="btn btn-primary btn-large" style="width: 200px;" id="save-attributes-button" type="submit">
Save changes <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
</div>
</div> </div>

View File

@ -1,24 +1,24 @@
<div id="branch-prefix-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="branch-prefix-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title mr-auto">Edit branch prefix</h5> <h5 class="modal-title mr-auto">Edit branch prefix</h5>
<button class="help-button" type="button" data-help-page="Tree-concepts#prefix" title="Help on Tree prefix">?</button> <button class="help-button" type="button" data-help-page="Tree-concepts#prefix" title="Help on Tree prefix">?</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <div class="form-group">
<label for="branch-prefix-input">Prefix: </label> &nbsp; <label for="branch-prefix-input">Prefix: </label> &nbsp;
<input id="branch-prefix-input" style="width: 20em;"> - <span id="branch-prefix-note-title"></span> <input id="branch-prefix-input" style="width: 20em;"> - <span id="branch-prefix-note-title"></span>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-sm">Save</button>
</div>
</div> </div>
</div>
<div class="modal-footer">
<button class="btn btn-primary btn-sm">Save</button>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,15 +1,15 @@
<div id="event-log-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="event-log-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Event log</h5> <h5 class="modal-title">Event log</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<ul id="event-log-list"></ul> <ul id="event-log-list"></ul>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,23 +1,23 @@
<div id="jump-to-note-dialog" class="modal mx-auto" tabindex="-1" role="dialog"> <div id="jump-to-note-dialog" class="modal mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Jump to note</h5> <h5 class="modal-title">Jump to note</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <div class="form-group">
<label for="jump-to-note-autocomplete">Note</label> <label for="jump-to-note-autocomplete">Note</label>
<div class="input-group"> <div class="input-group">
<input id="jump-to-note-autocomplete" class="form-control" placeholder="search for note by its name"> <input id="jump-to-note-autocomplete" class="form-control" placeholder="search for note by its name">
</div> </div>
</div>
</div>
<div class="modal-footer">
<button id="show-in-full-text-button" class="btn btn-sm">Search in full text <kbd>ctrl+enter</kbd></button>
</div>
</div> </div>
</div>
<div class="modal-footer">
<button id="show-in-full-text-button" class="btn btn-sm">Search in full text <kbd>ctrl+enter</kbd></button>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,20 +1,20 @@
<div id="markdown-import-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="markdown-import-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Markdown import</h5> <h5 class="modal-title">Markdown import</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>Because of browser sandbox it's not possible to directly read clipboard from JavaScript. Please paste the Markdown to import to textarea below and click on Import button</p> <p>Because of browser sandbox it's not possible to directly read clipboard from JavaScript. Please paste the Markdown to import to textarea below and click on Import button</p>
<textarea id="markdown-import-textarea" style="height: 340px; width: 100%"></textarea> <textarea id="markdown-import-textarea" style="height: 340px; width: 100%"></textarea>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button id="markdown-import-button" class="btn btn-primary">Import <kbd>CTRL+Enter</kbd></button> <button id="markdown-import-button" class="btn btn-primary">Import <kbd>CTRL+Enter</kbd></button>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,27 +1,27 @@
<div id="note-revisions-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="note-revisions-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title mr-auto">Note revisions</h5> <h5 class="modal-title mr-auto">Note revisions</h5>
<button class="help-button" type="button" data-help-page="Note-revisions" title="Help on Note revisions">?</button> <button class="help-button" type="button" data-help-page="Note-revisions" title="Help on Note revisions">?</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0 !important;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body" style="display: flex;"> <div class="modal-body" style="display: flex;">
<select id="note-revision-list" size="25" style="width: 150px; height: 630px;"> <select id="note-revision-list" size="25" style="width: 150px; height: 630px;">
</select> </select>
<div id="note-revision-content-wrapper" style="flex-grow: 1; margin-left: 20px;"> <div id="note-revision-content-wrapper" style="flex-grow: 1; margin-left: 20px;">
<div style="display: flex"> <div style="display: flex">
<h3 id="note-revision-title" style="margin: 3px; flex-grow: 100;"></h3> <h3 id="note-revision-title" style="margin: 3px; flex-grow: 100;"></h3>
</div> </div>
<div id="note-revision-content" style="height: 600px; width: 600px; overflow: auto;"></div> <div id="note-revision-content" style="height: 600px; width: 600px; overflow: auto;"></div>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,15 +1,15 @@
<div id="note-source-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="note-source-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Note source</h5> <h5 class="modal-title">Note source</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<textarea id="note-source" readonly="readonly" style="min-height: 500px;"></textarea> <textarea id="note-source" readonly="readonly" style="min-height: 500px;"></textarea>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,226 +1,226 @@
<div id="options-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="options-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" style="min-width: 1000px;" role="document"> <div class="modal-dialog modal-lg" style="min-width: 1000px;" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Options</h5> <h5 class="modal-title">Options</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div>
<div class="modal-body">
<div>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#appearance">Appearance</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#change-password">Change password</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#protected-session-timeout">Protected session</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#note-revision-snapshot-time-interval">Note revisions</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sync-setup">Sync</a>
</li>
<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">
<div id="appearance" class="tab-pane active">
<p><strong>Settings on this options tab are saved automatically after each change.</strong></p>
<form>
<div class="form-group">
<label for="theme-select">Theme</label>
<select class="form-control" id="theme-select">
<option value="white">White</option>
<option value="dark">Dark</option>
<option value="black">Black</option>
</select>
</div>
<div class="form-group">
<label for="zoom-factor-select">Zoom factor (desktop build only)</label>
<input type="number" class="form-control" id="zoom-factor-select" min="0.3" max="2.0" step="0.1"/>
</div>
<p>Zooming can be controlled with CTRL-+ and CTRL-= shortcuts as well.</p>
<h3>Left pane sizing</h3>
<div class="form-group">
<label for="left-pane-min-width">Left pane minimum width (in pixels)</label>
<input type="number" class="form-control" id="left-pane-min-width" min="100" max="2000" step="1"/>
</div>
<div class="form-group">
<label for="left-pane-min-width">Left pane width percent of window size</label>
<input type="number" class="form-control" id="left-pane-width-percent" min="0" max="99" step="1"/>
</div>
<p>Left pane width is calculated from the percent of window size, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width left pane, set minimum width to the desired width and set percent to 0.</p>
</form>
</div> </div>
<div class="modal-body">
<div>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#appearance">Appearance</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#change-password">Change password</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#protected-session-timeout">Protected session</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#note-revision-snapshot-time-interval">Note revisions</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sync-setup">Sync</a>
</li>
<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">
<div id="appearance" class="tab-pane active">
<p><strong>Settings on this options tab are saved automatically after each change.</strong></p>
<div id="change-password" class="tab-pane"> <form>
<form id="change-password-form"> <div class="form-group">
<div class="form-group"> <label for="theme-select">Theme</label>
<label for="old-password">Old password</label> <select class="form-control" id="theme-select">
<input class="form-control" id="old-password" type="password"> <option value="white">White</option>
<option value="dark">Dark</option>
<option value="black">Black</option>
</select>
</div>
<div class="form-group">
<label for="zoom-factor-select">Zoom factor (desktop build only)</label>
<input type="number" class="form-control" id="zoom-factor-select" min="0.3" max="2.0" step="0.1"/>
</div>
<p>Zooming can be controlled with CTRL-+ and CTRL-= shortcuts as well.</p>
<h3>Left pane sizing</h3>
<div class="form-group">
<label for="left-pane-min-width">Left pane minimum width (in pixels)</label>
<input type="number" class="form-control" id="left-pane-min-width" min="100" max="2000" step="1"/>
</div>
<div class="form-group">
<label for="left-pane-min-width">Left pane width percent of window size</label>
<input type="number" class="form-control" id="left-pane-width-percent" min="0" max="99" step="1"/>
</div>
<p>Left pane width is calculated from the percent of window size, if this is smaller than minimum width, then minimum width is used. If you want to have fixed width left pane, set minimum width to the desired width and set percent to 0.</p>
</form>
</div>
<div id="change-password" class="tab-pane">
<form id="change-password-form">
<div class="form-group">
<label for="old-password">Old password</label>
<input class="form-control" id="old-password" type="password">
</div>
<div class="form-group">
<label for="new-password1">New password</label>
<input class="form-control" id="new-password1" type="password">
</div>
<div class="form-group">
<label for="new-password2">New password once more</label>
<input class="form-control" id="new-password2" type="password">
</div>
<button class="btn btn-primary">Change password</button>
</form>
</div>
<div id="protected-session-timeout" class="tab-pane">
<p>Protected session timeout is a time period after which the protected session is wiped out from
browser's memory. This is measured from the last interaction with protected notes.</p>
<form id="protected-session-timeout-form">
<div class="form-group">
<label for="protected-session-timeout-in-seconds">Protected session timeout (in seconds)</label>
<input class="form-control" id="protected-session-timeout-in-seconds" type="number">
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Protected-notes">Help</button>
</div>
</form>
</div>
<div id="note-revision-snapshot-time-interval" class="tab-pane">
<p>Note revision snapshot time interval is time in seconds after which new note revision will be created for the note.</p>
<form id="note-revision-snapshot-time-interval-form">
<div class="form-group">
<label for="note-revision-snapshot-time-interval-in-seconds">Note revision snapshot time interval (in seconds)</label>
<input class="form-control" id="note-revision-snapshot-time-interval-in-seconds" type="number">
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Note-revisions">Help</button>
</div>
</form>
</div>
<div id="sync-setup" class="tab-pane">
<h4 style="margin-top: 0px;">Sync configuration</h4>
<form id="sync-setup-form">
<div class="form-group">
<label for="sync-server-host">Server instance address</label>
<input class="form-control" id="sync-server-host" placeholder="https://<host>:<port>">
</div>
<div class="form-group">
<label for="sync-server-timeout">Sync timeout (milliseconds)</label>
<input class="form-control" id="sync-server-timeout" min="1" max="10000000" type="number">
</div>
<div class="form-group">
<label for="sync-proxy">Sync proxy server (optional)</label>
<input class="form-control" id="sync-proxy" placeholder="https://<host>:<port>">
<p><strong>Note:</strong> If you leave proxy setting blank, system proxy will be used (applies to desktop/electron build only)</p>
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Synchronization">Help</button>
</div>
</form>
<br/>
<h4>Sync test</h4>
<p>This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.</p>
<button id="test-sync-button" class="btn btn-default">Test sync</button>
</div>
<div id="advanced" class="tab-pane">
<h4 style="margin-top: 0px;">Sync</h4>
<button id="force-full-sync-button" class="btn btn-default">Force full sync</button>
<br/>
<br/>
<button id="fill-sync-rows-button" class="btn btn-default">Fill sync rows</button>
<br/>
<br/>
<h4>Debugging</h4>
<button id="anonymize-button" class="btn btn-default">Save anonymized database</button><br/><br/>
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata)
for sharing online for debugging purposes without fear of leaking your personal data.</p>
<h4>Vacuum database</h4>
<p>This will rebuild database which will typically result in smaller database file. No data will be actually changed.</p>
<button id="vacuum-database-button" class="btn btn-default">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>
</table>
</div>
</div>
</div> </div>
<div class="form-group">
<label for="new-password1">New password</label>
<input class="form-control" id="new-password1" type="password">
</div>
<div class="form-group">
<label for="new-password2">New password once more</label>
<input class="form-control" id="new-password2" type="password">
</div>
<button class="btn btn-primary">Change password</button>
</form>
</div> </div>
<div id="protected-session-timeout" class="tab-pane">
<p>Protected session timeout is a time period after which the protected session is wiped out from
browser's memory. This is measured from the last interaction with protected notes.</p>
<form id="protected-session-timeout-form">
<div class="form-group">
<label for="protected-session-timeout-in-seconds">Protected session timeout (in seconds)</label>
<input class="form-control" id="protected-session-timeout-in-seconds" type="number">
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Protected-notes">Help</button>
</div>
</form>
</div>
<div id="note-revision-snapshot-time-interval" class="tab-pane">
<p>Note revision snapshot time interval is time in seconds after which new note revision will be created for the note.</p>
<form id="note-revision-snapshot-time-interval-form">
<div class="form-group">
<label for="note-revision-snapshot-time-interval-in-seconds">Note revision snapshot time interval (in seconds)</label>
<input class="form-control" id="note-revision-snapshot-time-interval-in-seconds" type="number">
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Note-revisions">Help</button>
</div>
</form>
</div>
<div id="sync-setup" class="tab-pane">
<h4 style="margin-top: 0px;">Sync configuration</h4>
<form id="sync-setup-form">
<div class="form-group">
<label for="sync-server-host">Server instance address</label>
<input class="form-control" id="sync-server-host" placeholder="https://<host>:<port>">
</div>
<div class="form-group">
<label for="sync-server-timeout">Sync timeout (milliseconds)</label>
<input class="form-control" id="sync-server-timeout" min="1" max="10000000" type="number">
</div>
<div class="form-group">
<label for="sync-proxy">Sync proxy server (optional)</label>
<input class="form-control" id="sync-proxy" placeholder="https://<host>:<port>">
<p><strong>Note:</strong> If you leave proxy setting blank, system proxy will be used (applies to desktop/electron build only)</p>
</div>
<div style="display: flex; justify-content: space-between;">
<button class="btn btn-primary">Save</button>
<button class="btn btn-default" type="button" data-help-page="Synchronization">Help</button>
</div>
</form>
<br/>
<h4>Sync test</h4>
<p>This will test connection and handshake to the sync server. If sync server isn't initialized, this will set it up to sync with local document.</p>
<button id="test-sync-button" class="btn btn-default">Test sync</button>
</div>
<div id="advanced" class="tab-pane">
<h4 style="margin-top: 0px;">Sync</h4>
<button id="force-full-sync-button" class="btn btn-default">Force full sync</button>
<br/>
<br/>
<button id="fill-sync-rows-button" class="btn btn-default">Fill sync rows</button>
<br/>
<br/>
<h4>Debugging</h4>
<button id="anonymize-button" class="btn btn-default">Save anonymized database</button><br/><br/>
<p>This action will create a new copy of the database and anonymise it (remove all note content and leave only structure and metadata)
for sharing online for debugging purposes without fear of leaking your personal data.</p>
<h4>Vacuum database</h4>
<p>This will rebuild database which will typically result in smaller database file. No data will be actually changed.</p>
<button id="vacuum-database-button" class="btn btn-default">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>
</table>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,26 +1,26 @@
<div id="protected-session-password-dialog" class="modal mx-auto" data-backdrop="false" tabindex="-1" role="dialog"> <div id="protected-session-password-dialog" class="modal mx-auto" data-backdrop="false" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title mr-auto">Protected session</h5> <h5 class="modal-title mr-auto">Protected session</h5>
<button class="help-button" type="button" data-help-page="Protected-notes" title="Help on Protected notes">?</button> <button class="help-button" type="button" data-help-page="Protected-notes" title="Help on Protected notes">?</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-left: 0;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<form id="protected-session-password-form"> <form id="protected-session-password-form">
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <div class="form-group">
<label for="protected-session-password">To proceed with requested action you need to start protected session by entering password:</label> <label for="protected-session-password">To proceed with requested action you need to start protected session by entering password:</label>
<input id="protected-session-password" class="form-control" type="password"> <input id="protected-session-password" class="form-control" type="password">
</div> </div>
</div>
<div class="modal-footer">
<button class="btn btn-primary">Start protected session <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
<div class="modal-footer">
<button class="btn btn-primary">Start protected session <kbd>enter</kbd></button>
</div>
</form>
</div> </div>
</div>
</div> </div>

View File

@ -1,3 +1,4 @@
<div id="recent-changes-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="recent-changes-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">

View File

@ -1,24 +1,24 @@
<div id="sql-console-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog"> <div id="sql-console-dialog" class="modal fade mx-auto" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" style="max-width: 1000px;" role="document"> <div class="modal-dialog modal-lg" style="max-width: 1000px;" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">SQL console</h5> <h5 class="modal-title">SQL console</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div id="sql-console-query"></div> <div id="sql-console-query"></div>
<div style="text-align: center"> <div style="text-align: center">
<button class="btn btn-danger" id="sql-console-execute">Execute <kbd>CTRL+ENTER</kbd></button> <button class="btn btn-danger" id="sql-console-execute">Execute <kbd>CTRL+ENTER</kbd></button>
</div>
<table id="sql-console-results" class="table table-striped" style="overflow: scroll; width: 100%;">
<thead></thead>
<tbody></tbody>
</table>
</div>
</div> </div>
<table id="sql-console-results" class="table table-striped" style="overflow: scroll; width: 100%;">
<thead></thead>
<tbody></tbody>
</table>
</div>
</div> </div>
</div>
</div> </div>

View File

@ -1,253 +1,253 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="theme-<%= theme %>"> <html lang="en" class="theme-<%= theme %>">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Trilium Notes</title> <title>Trilium Notes</title>
</head> </head>
<body> <body>
<div id="container" style="display:none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) <%= rightPaneWidthPercent %>fr"> <div id="container" style="display:none; grid-template-columns: minmax(<%= leftPaneMinWidth %>px, <%= leftPaneWidthPercent %>fr) <%= rightPaneWidthPercent %>fr">
<div id="header" class="hide-toggle"> <div id="header" class="hide-toggle">
<div id="history-navigation" style="display: none;"> <div id="history-navigation" style="display: none;">
<a id="history-back-button" title="Go to previous note." class="icon-action jam jam-arrow-square-left"></a> <a id="history-back-button" title="Go to previous note." class="icon-action jam jam-arrow-square-left"></a>
&nbsp; &nbsp; &nbsp; &nbsp;
<a id="history-forward-button" title="Go to next note." class="icon-action jam jam-arrow-square-right"></a> <a id="history-forward-button" title="Go to next note." class="icon-action jam jam-arrow-square-right"></a>
</div> </div>
<div style="flex-grow: 100; display: flex;"> <div style="flex-grow: 100; display: flex;">
<button class="btn btn-sm" id="jump-to-note-dialog-button" title="CTRL+J"> <button class="btn btn-sm" id="jump-to-note-dialog-button" title="CTRL+J">
<span class="jam jam-direction"></span> <span class="jam jam-direction"></span>
Jump to note Jump to note
</button> </button>
<button class="btn btn-sm" id="recent-changes-button"> <button class="btn btn-sm" id="recent-changes-button">
<span class="jam jam-history"></span> <span class="jam jam-history"></span>
Recent changes Recent changes
</button> </button>
<button class="btn btn-sm" id="enter-protected-session-button" title="Enter protected session to be able to find and view protected notes"> <button class="btn btn-sm" id="enter-protected-session-button" title="Enter protected session to be able to find and view protected notes">
<span class="jam jam-door"></span> <span class="jam jam-door"></span>
Enter protected session Enter protected session
</button> </button>
<button class="btn btn-sm" id="leave-protected-session-button" title="Leave protected session so that protected notes are not accessible any more." style="display: none;"> <button class="btn btn-sm" id="leave-protected-session-button" title="Leave protected session so that protected notes are not accessible any more." style="display: none;">
<span class="jam jam-log-out"></span> <span class="jam jam-log-out"></span>
Leave protected session Leave protected session
</button> </button>
</div> </div>
<div id="plugin-buttons"> <div id="plugin-buttons">
</div> </div>
<div> <div>
<button class="btn btn-sm" id="sync-now-button" title="Trigger sync"> <button class="btn btn-sm" id="sync-now-button" title="Trigger sync">
<span class="jam jam-refresh"></span> <span class="jam jam-refresh"></span>
Sync (<span id="outstanding-syncs-count">0</span>) Sync (<span id="outstanding-syncs-count">0</span>)
</button> </button>
<button class="btn btn-sm" id="options-button"> <button class="btn btn-sm" id="options-button">
<span class="jam jam-settings-alt"></span> Options</button> <span class="jam jam-settings-alt"></span> Options</button>
<form action="logout" id="logout-button" method="POST" style="display: inline;"> <form action="logout" id="logout-button" method="POST" style="display: inline;">
<button type="submit" class="btn btn-sm"> <button type="submit" class="btn btn-sm">
<span class="jam jam-log-out"></span> <span class="jam jam-log-out"></span>
Logout Logout
</button> </button>
</form> </form>
</div> </div>
</div> </div>
<div id="left-pane" class="hide-toggle"> <div id="left-pane" class="hide-toggle">
<div id="global-buttons"> <div id="global-buttons">
<a id="create-top-level-note-button" title="Create new top level note" class="icon-action jam jam-plus-circle"></a> <a id="create-top-level-note-button" title="Create new top level note" class="icon-action jam jam-plus-circle"></a>
<a id="collapse-tree-button" title="Collapse note tree. Shortcut ALT+C" class="icon-action jam jam-align-justify"></a> <a id="collapse-tree-button" title="Collapse note tree. Shortcut ALT+C" class="icon-action jam jam-align-justify"></a>
<a id="scroll-to-current-note-button" title="Scroll to current note. Shortcut CTRL+." class="icon-action jam jam-download"></a> <a id="scroll-to-current-note-button" title="Scroll to current note. Shortcut CTRL+." class="icon-action jam jam-download"></a>
<a id="toggle-search-button" title="Search in notes. Shortcut CTRL+S" class="icon-action jam jam-search"></a> <a id="toggle-search-button" title="Search in notes. Shortcut CTRL+S" class="icon-action jam jam-search"></a>
</div> </div>
<input type="file" id="import-upload" style="display: none" /> <input type="file" id="import-upload" style="display: none" />
<div id="search-box"> <div id="search-box">
<div style="display: flex; align-items: center;"> <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"> <input name="search-text" placeholder="Search text, labels" style="flex-grow: 100; margin-left: 5px; margin-right: 5px;" autocomplete="off">
<button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button> <button id="do-search-button" class="btn btn-sm icon-button jam jam-search" title="Search (enter)"></button>
&nbsp; &nbsp;
<button id="save-search-button" class="btn btn-sm icon-button jam jam-save" title="Save search"></button> <button id="save-search-button" class="btn btn-sm icon-button jam jam-save" title="Save search"></button>
&nbsp; &nbsp;
<button id="close-search-button" class="btn btn-sm icon-button jam jam-close" title="Close search"></button> <button id="close-search-button" class="btn btn-sm icon-button jam jam-close" title="Close search"></button>
</div> </div>
</div> </div>
<div id="search-results"> <div id="search-results">
<strong>Search results:</strong> <strong>Search results:</strong>
<ul id="search-results-inner"></ul> <ul id="search-results-inner"></ul>
</div> </div>
<div id="tree"></div> <div id="tree"></div>
<div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div> <div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div>
</div>
<div id="title-container">
<div style="display: flex; align-items: center;">
<div class="dropdown hide-toggle">
<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>
<input autocomplete="off" value="" id="note-title" style="margin-left: 15px; font-size: x-large; border: 0; width: 5em; flex-grow: 100;" tabindex="1">
<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 jam jam-play"
style="display: none; margin-right: 10px;"
title="Render"
id="render-button"></button>
<button class="btn btn-sm icon-button jam jam-play"
style="display: none; margin-right: 10px;"
title="Execute (Ctrl+Enter)"
id="execute-script-button"></button>
<div class="btn-group btn-group-xs">
<button type="button"
class="btn btn-sm icon-button jam jam-shield-check"
id="protect-button"
title="Protected note can be viewed and edited only after entering password">
</button>
<button type="button"
class="btn btn-sm icon-button jam jam-shield-close"
id="unprotect-button"
title="Not protected note can be viewed without entering password">
</button>
</div>
&nbsp; &nbsp;
<div id="note-type-wrapper" style="display: flex;">
<div class="dropdown" id="note-type">
<button data-bind="disable: isDisabled()" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
Type: <span data-bind="text: typeString()"></span>
<span class="caret"></span>
</button>
<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">&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">&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">&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">&check;</span> <strong>Code</strong></a>
<!-- ko foreach: codeMimeTypes -->
<a class="dropdown-item" data-bind="click: $parent.selectCodeMime, css: { selected: $parent.type() == 'code' && $parent.mime() == mime }"><span class="check">&check;</span> <span data-bind="text: title"></span></a>
<!-- /ko -->
</div>
</div>
<div class="dropdown" id="note-actions">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
Note actions
<span class="caret"></span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" id="show-note-revisions-button" data-bind="css: { disabled: type() == 'file' || type() == 'image' }">Revisions</a>
<a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a>
<a class="dropdown-item" id="show-source-button" data-bind="css: { disabled: type() != 'text' && type() != 'code' && type() != 'relation-map' && type() != 'search' }">Note source</a>
<a class="dropdown-item" id="upload-file-button">Upload file</a>
<a class="dropdown-item" id="export-note-button" data-bind="css: { disabled: type() != 'text' }">Export note</a>
</div>
</div>
</div>
</div>
</div>
</div>
<% include details/detail.ejs %>
<% include dialogs/add_link.ejs %>
<% include dialogs/attributes.ejs %>
<% include dialogs/branch_prefix.ejs %>
<% include dialogs/event_log.ejs %>
<% include dialogs/export.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 %>
<% include dialogs/info.ejs %>
<% include dialogs/prompt.ejs %>
<% include dialogs/confirm.ejs %>
</div> </div>
<webview class="electron-in-page-search-window" nodeintegration disablewebsecurity src="libraries/electron-in-page-search/search-window.html"></webview> <div id="title-container">
<div style="display: flex; align-items: center;">
<div class="dropdown hide-toggle">
<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>
<script type="text/javascript"> <span class="caret"></span>
window.baseApiUrl = 'api/'; </button>
window.glob = { <ul id="note-path-list" class="dropdown-menu" aria-labelledby="note-path-list-button">
activeDialog: null, </ul>
sourceId: '<%= sourceId %>', </div>
maxSyncIdAtLoad: <%= maxSyncIdAtLoad %>,
instanceName: '<%= instanceName %>'
};
</script>
<!-- Required for correct loading of scripts in Electron --> <input autocomplete="off" value="" id="note-title" style="margin-left: 15px; font-size: x-large; border: 0; width: 5em; flex-grow: 100;" tabindex="1">
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="libraries/jquery.min.js"></script> <div class="hide-toggle" style="display: flex; align-items: center;">
<span id="note-id-display" title="Note ID"></span>
<link href="libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <button class="btn btn-sm icon-button jam jam-play"
<script src="libraries/bootstrap/js/bootstrap.bundle.min.js"></script> style="display: none; margin-right: 10px;"
title="Render"
id="render-button"></button>
<script src="libraries/bootstrap-notify.min.js"></script> <button class="btn btn-sm icon-button jam jam-play"
style="display: none; margin-right: 10px;"
title="Execute (Ctrl+Enter)"
id="execute-script-button"></button>
<!-- Include Fancytree skin and library --> <div class="btn-group btn-group-xs">
<link href="libraries/fancytree/skin-win8/ui.fancytree.css" rel="stylesheet"> <button type="button"
<script src="libraries/fancytree/jquery.fancytree-all-deps.min.js"></script> class="btn btn-sm icon-button jam jam-shield-check"
id="protect-button"
title="Protected note can be viewed and edited only after entering password">
</button>
<script src="libraries/jquery.hotkeys.js"></script> <button type="button"
<script src="libraries/jquery.fancytree.hotkeys.js"></script> class="btn btn-sm icon-button jam jam-shield-close"
id="unprotect-button"
title="Not protected note can be viewed without entering password">
</button>
</div>
<script src="libraries/knockout.min.js"></script> &nbsp; &nbsp;
<script src="libraries/autocomplete.jquery.min.js"></script> <div id="note-type-wrapper" style="display: flex;">
<div class="dropdown" id="note-type">
<button data-bind="disable: isDisabled()" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
Type: <span data-bind="text: typeString()"></span>
<span class="caret"></span>
</button>
<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">&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">&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">&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">&check;</span> <strong>Code</strong></a>
<!-- ko foreach: codeMimeTypes -->
<a class="dropdown-item" data-bind="click: $parent.selectCodeMime, css: { selected: $parent.type() == 'code' && $parent.mime() == mime }"><span class="check">&check;</span> <span data-bind="text: title"></span></a>
<!-- /ko -->
</div>
</div>
<link href="stylesheets/style.css" rel="stylesheet"> <div class="dropdown" id="note-actions">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn btn-sm dropdown-toggle">
Note actions
<span class="caret"></span>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" id="show-note-revisions-button" data-bind="css: { disabled: type() == 'file' || type() == 'image' }">Revisions</a>
<a class="dropdown-item show-attributes-button"><kbd>Alt+A</kbd> Attributes</a>
<a class="dropdown-item" id="show-source-button" data-bind="css: { disabled: type() != 'text' && type() != 'code' && type() != 'relation-map' && type() != 'search' }">Note source</a>
<a class="dropdown-item" id="upload-file-button">Upload file</a>
<a class="dropdown-item" id="export-note-button" data-bind="css: { disabled: type() != 'text' }">Export note</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="javascripts/services/bootstrap.js" crossorigin type="module"></script> <% include details/detail.ejs %>
<link rel="stylesheet" type="text/css" href="libraries/jam/css/jam.min.css"> <% include dialogs/add_link.ejs %>
<% include dialogs/attributes.ejs %>
<% include dialogs/branch_prefix.ejs %>
<% include dialogs/event_log.ejs %>
<% include dialogs/export.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 %>
<% include dialogs/info.ejs %>
<% include dialogs/prompt.ejs %>
<% include dialogs/confirm.ejs %>
</div>
<script type="text/javascript"> <webview class="electron-in-page-search-window" nodeintegration disablewebsecurity src="libraries/electron-in-page-search/search-window.html"></webview>
// 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>
<style type="text/css"> <script type="text/javascript">
<%= appCss %> window.baseApiUrl = 'api/';
</style> window.glob = {
</body> activeDialog: null,
sourceId: '<%= sourceId %>',
maxSyncIdAtLoad: <%= maxSyncIdAtLoad %>,
instanceName: '<%= instanceName %>'
};
</script>
<!-- Required for correct loading of scripts in Electron -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="libraries/jquery.min.js"></script>
<link href="libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="libraries/bootstrap-notify.min.js"></script>
<!-- Include Fancytree skin and library -->
<link href="libraries/fancytree/skin-win8/ui.fancytree.css" rel="stylesheet">
<script src="libraries/fancytree/jquery.fancytree-all-deps.min.js"></script>
<script src="libraries/jquery.hotkeys.js"></script>
<script src="libraries/jquery.fancytree.hotkeys.js"></script>
<script src="libraries/knockout.min.js"></script>
<script src="libraries/autocomplete.jquery.min.js"></script>
<link href="stylesheets/style.css" rel="stylesheet">
<script src="javascripts/services/bootstrap.js" crossorigin type="module"></script>
<link rel="stylesheet" type="text/css" href="libraries/jam/css/jam.min.css">
<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>
<style type="text/css">
<%= appCss %>
</style>
</body>
</html> </html>

View File

@ -1,48 +1,48 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Login</title> <title>Login</title>
</head> </head>
<body> <body>
<div style="width: 400px; margin: auto; padding-top: 30px;"> <div style="width: 400px; margin: auto; padding-top: 30px;">
<h1>Trilium login</h1> <h1>Trilium login</h1>
<% if (failedAuth) { %> <% if (failedAuth) { %>
<div class="alert alert-warning"> <div class="alert alert-warning">
Username and / or password are incorrect. Please try again. Username and / or password are incorrect. Please try again.
</div> </div>
<% } %> <% } %>
<form action="login" method="POST"> <form action="login" method="POST">
<div class="form-group"> <div class="form-group">
<label for="username">Username</label> <label for="username">Username</label>
<div class="controls"> <div class="controls">
<input id="username" name="username" placeholder="" class="form-control" type="text"> <input id="username" name="username" placeholder="" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="password">Password</label> <label for="password">Password</label>
<div class="controls"> <div class="controls">
<input id="password" name="password" placeholder="" class="form-control" type="password"> <input id="password" name="password" placeholder="" class="form-control" type="password">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="remember-me" name="remember_me" value="1" type="checkbox"> Remember me <input id="remember-me" name="remember_me" value="1" type="checkbox"> Remember me
</label> </label>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<button class="btn btn-success">Login</button> <button class="btn btn-success">Login</button>
</div> </div>
</form> </form>
</div> </div>
<!-- Required for correct loading of scripts in Electron --> <!-- Required for correct loading of scripts in Electron -->
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script> <script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<link href="/libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="/libraries/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</body> </body>
</html> </html>

View File

@ -1,124 +1,124 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Setup</title> <title>Setup</title>
</head> </head>
<body> <body>
<div id="setup-dialog" style="width: 700px; margin: auto; padding-top: 50px; display:none; font-size: larger;"> <div id="setup-dialog" style="width: 700px; margin: auto; padding-top: 50px; display:none; font-size: larger;">
<h1>Trilium Notes setup</h1> <h1>Trilium Notes setup</h1>
<div class="alert alert-warning" id="alert" style="display: none;"> <div class="alert alert-warning" id="alert" style="display: none;">
</div>
<div id="setup-type" data-bind="visible: step() == 'setup-type'" style="margin-top: 20px;">
<div class="radio" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="new-document" data-bind="checked: setupNewDocument">
I'm a new user and I want to create new Trilium document for my notes</label>
</div>
<div class="radio" data-bind="if: instanceType == 'server'" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="sync-from-desktop" data-bind="checked: setupSyncFromDesktop">
I have desktop instance already and I want to setup sync with it</label>
</div>
<div class="radio" data-bind="if: instanceType == 'desktop'" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="sync-from-server" data-bind="checked: setupSyncFromServer">
I have server instance up and I want to setup sync with it</label>
</div> </div>
<button type="button" data-bind="disable: !setupTypeSelected(), click: selectSetupType" class="btn btn-primary">Next</button> <div id="setup-type" data-bind="visible: step() == 'setup-type'" style="margin-top: 20px;">
</div> <div class="radio" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="new-document" data-bind="checked: setupNewDocument">
I'm a new user and I want to create new Trilium document for my notes</label>
</div>
<div class="radio" data-bind="if: instanceType == 'server'" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="sync-from-desktop" data-bind="checked: setupSyncFromDesktop">
I have desktop instance already and I want to setup sync with it</label>
</div>
<div class="radio" data-bind="if: instanceType == 'desktop'" style="margin-bottom: 15px;">
<label><input type="radio" name="setup-type" value="sync-from-server" data-bind="checked: setupSyncFromServer">
I have server instance up and I want to setup sync with it</label>
</div>
<div data-bind="visible: step() == 'new-document'"> <button type="button" data-bind="disable: !setupTypeSelected(), click: selectSetupType" class="btn btn-primary">Next</button>
<h2>New document</h2>
<p>You're almost done with the setup. The last thing is to choose username and password using which you'll login to the application.
This password is also used for generating encryption key which encrypts protected notes.</p>
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" data-bind="value: username" placeholder="Choose alphanumeric username">
</div>
<div class="form-group">
<label for="password1">Password</label>
<input type="password" class="form-control" data-bind="value: password1" placeholder="Password">
</div>
<div class="form-group">
<label for="password2">Repeat password</label>
<input type="password" class="form-control" data-bind="value: password2" placeholder="Password">
</div> </div>
<button type="button" data-bind="click: back" class="btn btn-default">Back</button> <div data-bind="visible: step() == 'new-document'">
<h2>New document</h2>
&nbsp; <p>You're almost done with the setup. The last thing is to choose username and password using which you'll login to the application.
This password is also used for generating encryption key which encrypts protected notes.</p>
<button type="button" data-bind="click: finish" class="btn btn-primary">Finish setup</button> <div class="form-group">
</div> <label for="username">Username</label>
<input type="text" class="form-control" data-bind="value: username" placeholder="Choose alphanumeric username">
</div>
<div class="form-group">
<label for="password1">Password</label>
<input type="password" class="form-control" data-bind="value: password1" placeholder="Password">
</div>
<div class="form-group">
<label for="password2">Repeat password</label>
<input type="password" class="form-control" data-bind="value: password2" placeholder="Password">
</div>
<div data-bind="visible: step() == 'sync-from-desktop'"> <button type="button" data-bind="click: back" class="btn btn-default">Back</button>
<h2>Sync from Desktop</h2>
<p>This setup needs to be initiated from the desktop instance:</p> &nbsp;
<ol> <button type="button" data-bind="click: finish" class="btn btn-primary">Finish setup</button>
<li>please open your desktop instance of Trilium Notes</li>
<li>click on Options button in the top right</li>
<li>click on Sync tab</li>
<li>configure server instance address to the: <span id="current-host"></span> and click save.</li>
<li>click on "Test sync" button</li>
<li>once you've done all this, click <a href="/">here</a></li>
</ol>
<button type="button" data-bind="click: back" class="btn btn-default">Back</button>
</div>
<div data-bind="visible: step() == 'sync-from-server'">
<h2>Sync from Server</h2>
<p>Please enter Trilium server address and credentials below. This will download the whole Trilium document from server and setup sync to it. Depending on the document size and your connection speed, this may take a while.</p>
<div class="form-group">
<label for="sync-server-host">Trilium server address</label>
<input type="text" id="syncServerHost" class="form-control" data-bind="value: syncServerHost" placeholder="https://<hostname>:<port>">
</div>
<div class="form-group">
<label for="sync-proxy">Proxy server (optional)</label>
<input type="text" id="sync-proxy" class="form-control" data-bind="value: syncProxy" placeholder="https://<hostname>:<port>">
<p><strong>Note:</strong> If you leave proxy setting blank, system proxy will be used (applies to desktop/electron build only)</p>
</div>
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" class="form-control" data-bind="value: username" placeholder="Username">
</div>
<div class="form-group">
<label for="password1">Password</label>
<input type="password" id="password1" class="form-control" data-bind="value: password1" placeholder="Password">
</div> </div>
<button type="button" data-bind="click: back" class="btn btn-default">Back</button> <div data-bind="visible: step() == 'sync-from-desktop'">
<h2>Sync from Desktop</h2>
&nbsp; <p>This setup needs to be initiated from the desktop instance:</p>
<button type="button" data-bind="click: finish" class="btn btn-primary">Finish setup</button> <ol>
</div> <li>please open your desktop instance of Trilium Notes</li>
<li>click on Options button in the top right</li>
<li>click on Sync tab</li>
<li>configure server instance address to the: <span id="current-host"></span> and click save.</li>
<li>click on "Test sync" button</li>
<li>once you've done all this, click <a href="/">here</a></li>
</ol>
<div data-bind="visible: step() == 'sync-in-progress'"> <button type="button" data-bind="click: back" class="btn btn-default">Back</button>
<h2>Sync in progress</h2> </div>
<div class="alert alert-success">Sync has been correctly set up. It will take some time for the initial sync to finish. Once it's done, you'll be redirected to the login page.</div> <div data-bind="visible: step() == 'sync-from-server'">
<h2>Sync from Server</h2>
<div data-bind="if: instanceType == 'desktop'">
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong> <p>Please enter Trilium server address and credentials below. This will download the whole Trilium document from server and setup sync to it. Depending on the document size and your connection speed, this may take a while.</p>
<div class="form-group">
<label for="sync-server-host">Trilium server address</label>
<input type="text" id="syncServerHost" class="form-control" data-bind="value: syncServerHost" placeholder="https://<hostname>:<port>">
</div>
<div class="form-group">
<label for="sync-proxy">Proxy server (optional)</label>
<input type="text" id="sync-proxy" class="form-control" data-bind="value: syncProxy" placeholder="https://<hostname>:<port>">
<p><strong>Note:</strong> If you leave proxy setting blank, system proxy will be used (applies to desktop/electron build only)</p>
</div>
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" class="form-control" data-bind="value: username" placeholder="Username">
</div>
<div class="form-group">
<label for="password1">Password</label>
<input type="password" id="password1" class="form-control" data-bind="value: password1" placeholder="Password">
</div>
<button type="button" data-bind="click: back" class="btn btn-default">Back</button>
&nbsp;
<button type="button" data-bind="click: finish" class="btn btn-primary">Finish setup</button>
</div>
<div data-bind="visible: step() == 'sync-in-progress'">
<h2>Sync in progress</h2>
<div class="alert alert-success">Sync has been correctly set up. It will take some time for the initial sync to finish. Once it's done, you'll be redirected to the login page.</div>
<div data-bind="if: instanceType == 'desktop'">
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
</div>
</div> </div>
</div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
const baseApiUrl = 'api/'; const baseApiUrl = 'api/';
const glob = { const glob = {
sourceId: '' sourceId: ''
}; };
const syncInProgress = <%= syncInProgress ? 'true' : 'false' %>; const syncInProgress = <%= syncInProgress ? 'true' : 'false' %>;
</script> </script>
<!-- Required for correct loading of scripts in Electron --> <!-- Required for correct loading of scripts in Electron -->