mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
hiding protected session dialog when moving over to unprotected note
This commit is contained in:
@@ -169,7 +169,7 @@ const noteEditor = (function() {
|
||||
|
||||
function setTreeBasedOnProtectedStatus(note) {
|
||||
const node = treeUtils.getNodeByKey(note.detail.note_id);
|
||||
node.toggleClass("protected", note.detail.is_protected);
|
||||
node.toggleClass("protected", !!note.detail.is_protected);
|
||||
}
|
||||
|
||||
function setNoteBackgroundIfProtected(note) {
|
||||
@@ -202,6 +202,10 @@ const noteEditor = (function() {
|
||||
protected_session.touchProtectedSession();
|
||||
}
|
||||
|
||||
// this might be important if we focused on protected note when not in protected note and we got a dialog
|
||||
// to login, but we chose instead to come to another node - at that point the dialog is still visible and this will close it.
|
||||
protected_session.ensureDialogIsClosed();
|
||||
|
||||
noteDetailWrapperEl.show();
|
||||
|
||||
noteTitleEl.val(currentNote.detail.note_title);
|
||||
|
||||
Reference in New Issue
Block a user