display current note ID in editor (useful in Electron which doesn't have address bar)

This commit is contained in:
azivner
2017-12-25 09:46:11 -05:00
parent 31a4a201a8
commit 12f70b28c8
4 changed files with 10 additions and 2 deletions

View File

@@ -6,6 +6,8 @@ const noteEditor = (function() {
const protectButton = $("#protect-button");
const unprotectButton = $("#unprotect-button");
const noteDetailWrapperEl = $("#note-detail-wrapper");
const noteIdDisplayEl = $("#note-id-display");
let editor = null;
let currentNote = null;
@@ -101,6 +103,8 @@ const noteEditor = (function() {
noteTitleEl.focus().select();
}
noteIdDisplayEl.html(noteId);
await protected_session.ensureProtectedSession(currentNote.detail.is_protected, false);
if (currentNote.detail.is_protected) {