grey out archived items in the tree

This commit is contained in:
zadam
2019-10-15 19:16:44 +02:00
parent 80a6361cf1
commit 22c4859d42
5 changed files with 67 additions and 44 deletions

View File

@@ -156,6 +156,10 @@ async function getExtraClasses(note) {
extraClasses.push(utils.getMimeTypeClass(note.mime));
}
if (note.archived) {
extraClasses.push("archived");
}
return extraClasses.join(" ");
}

View File

@@ -213,6 +213,10 @@ span.fancytree-node:hover span.fancytree-title {
border-radius: 5px;
}
span.fancytree-node.archived {
opacity: 0.6;
}
.ui-autocomplete {
max-height: 300px;
overflow-y: auto;

View File

@@ -3,6 +3,7 @@
const sql = require('../../services/sql');
const optionService = require('../../services/options');
const protectedSessionService = require('../../services/protected_session');
const noteCacheService = require('../../services/note_cache');
async function getNotes(noteIds) {
const notes = await sql.getManyRows(`
@@ -31,7 +32,11 @@ async function getNotes(noteIds) {
protectedSessionService.decryptNotes(notes);
notes.forEach(note => note.isProtected = !!note.isProtected);
notes.forEach(note => {
note.isProtected = !!note.isProtected;
note.archived = noteCacheService.isArchived(note.noteId)
});
return notes;
}