Skip to content

Build your personal knowledge base with Trilium Notes

some tweaking of password input box

azivner1bc8a744a6e5
diff --git a/src/templates/app.html b/src/templates/app.html
index e9594d6f29..666dcfecc5 100644
--- a/src/templates/app.html
+++ b/src/templates/app.html
@@ -104,14 +104,13 @@
</form>
</div>
- <div id="encryptionPasswordDialog" title="Enter password" style="display: none;">
+ <div id="encryptionPasswordDialog" title="Encrypted note" style="display: none;">
<form id="encryptionPasswordForm">
<div class="form-group">
<label for="encryptionPassword">This note is encrypted. Enter password to show it:</label>
- <input id="encryptionPassword" type="password">
+ <input id="encryptionPassword" style="width: 250px;" type="password">
+ <button class="btn btn-sm">Show</button>
</div>
-
- <button class="btn btn-sm">Show</button>
</form>
</div>
diff --git a/static/js/note.js b/static/js/note.js
index d44fcf4363..f81a1be9f4 100644
--- a/static/js/note.js
+++ b/static/js/note.js
@@ -194,6 +194,8 @@ function loadNote(noteId) {
handleEncryption(note.detail.encryption > 0, false, () => {
$("#noteDetailWrapper").show();
+
+ // this may fal if the dialog has not been previously opened
try {
$("#encryptionPasswordDialog").dialog('close');
}