fix protected shield background visibility

This commit is contained in:
zadam 2019-05-22 22:26:55 +02:00
parent 494a980ecb
commit 35648b9f37

View File

@ -97,13 +97,6 @@ class TabContext {
this.attributes.invalidateAttributes();
this.$noteTitleRow.show(); // might be hidden from empty detail
this.$tabContent.toggleClass("protected", this.note.isProtected);
this.$protectButton.toggleClass("active", this.note.isProtected);
this.$protectButton.prop("disabled", this.note.isProtected);
this.$unprotectButton.toggleClass("active", !this.note.isProtected);
this.$unprotectButton.prop("disabled", !this.note.isProtected || !protectedSessionHolder.isProtectedSessionAvailable());
this.setupClasses();
this.setCurrentNotePathToHash();
@ -169,6 +162,13 @@ class TabContext {
this.$tabContent.addClass(this.note.cssClass);
this.$tabContent.addClass(utils.getNoteTypeClass(this.note.type));
this.$tabContent.addClass(utils.getMimeTypeClass(this.note.mime));
this.$noteTitleRow.show(); // might be hidden from empty detail
this.$tabContent.toggleClass("protected", this.note.isProtected);
this.$protectButton.toggleClass("active", this.note.isProtected);
this.$protectButton.prop("disabled", this.note.isProtected);
this.$unprotectButton.toggleClass("active", !this.note.isProtected);
this.$unprotectButton.prop("disabled", !this.note.isProtected || !protectedSessionHolder.isProtectedSessionAvailable());
}
getComponent() {