mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
encrypted notes have grey background to see immediatelly their status
This commit is contained in:
parent
49db61e5e0
commit
b2338c31d7
@ -139,6 +139,15 @@ function createNote(node, parentKey, target) {
|
|||||||
|
|
||||||
recentNotes = [];
|
recentNotes = [];
|
||||||
|
|
||||||
|
function setNoteBackgroundIfEncrypted(note) {
|
||||||
|
if (note.detail.encryption > 0) {
|
||||||
|
$(".note-editable").addClass("encrypted");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(".note-editable").removeClass("encrypted");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function loadNote(noteId) {
|
function loadNote(noteId) {
|
||||||
$.get(baseUrl + 'notes/' + noteId).then(function(note) {
|
$.get(baseUrl + 'notes/' + noteId).then(function(note) {
|
||||||
globalNote = note;
|
globalNote = note;
|
||||||
@ -179,6 +188,8 @@ function loadNote(noteId) {
|
|||||||
addRecentNote(noteId, note.detail.note_id);
|
addRecentNote(noteId, note.detail.note_id);
|
||||||
|
|
||||||
noteChangeDisabled = false;
|
noteChangeDisabled = false;
|
||||||
|
|
||||||
|
setNoteBackgroundIfEncrypted(note);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -253,7 +264,7 @@ function getAes() {
|
|||||||
|
|
||||||
function encryptNote() {
|
function encryptNote() {
|
||||||
getAes().then(aes => {
|
getAes().then(aes => {
|
||||||
const note = globalNote;
|
const note = globalNote;
|
||||||
|
|
||||||
updateNoteFromInputs(note);
|
updateNoteFromInputs(note);
|
||||||
|
|
||||||
@ -270,6 +281,8 @@ function encryptNote() {
|
|||||||
note.detail.encryption = 1;
|
note.detail.encryption = 1;
|
||||||
|
|
||||||
saveNoteToServer(note);
|
saveNoteToServer(note);
|
||||||
|
|
||||||
|
setNoteBackgroundIfEncrypted(note);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.note-editable.encrypted {
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
#top-message {
|
#top-message {
|
||||||
display: none; /* initial state is hidden */
|
display: none; /* initial state is hidden */
|
||||||
background-color: #e0e0e0;
|
background-color: #e0e0e0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user