protected notes detail is now marked with shield background instead of just grey background

This commit is contained in:
azivner
2018-08-17 09:32:07 +02:00
parent 02c0f9a6cd
commit 427ce3972e
3 changed files with 8 additions and 5 deletions

View File

@@ -25,7 +25,6 @@ const $noteDetailComponents = $(".note-detail-component");
const $protectButton = $("#protect-button");
const $unprotectButton = $("#unprotect-button");
const $noteDetailWrapper = $("#note-detail-wrapper");
const $noteDetailComponentWrapper = $("#note-detail-component-wrapper");
const $noteIdDisplay = $("#note-id-display");
const $attributeList = $("#attribute-list");
const $attributeListInner = $("#attribute-list-inner");
@@ -122,7 +121,7 @@ async function saveNoteIfChanged() {
function setNoteBackgroundIfProtected(note) {
const isProtected = !!note.isProtected;
$noteDetailComponentWrapper.toggleClass("protected", isProtected);
$noteDetailWrapper.toggleClass("protected", isProtected);
$protectButton.toggleClass("active", isProtected);
$unprotectButton.toggleClass("active", !isProtected);
}