mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
grey out archived items in the tree
This commit is contained in:
@@ -156,6 +156,10 @@ async function getExtraClasses(note) {
|
||||
extraClasses.push(utils.getMimeTypeClass(note.mime));
|
||||
}
|
||||
|
||||
if (note.archived) {
|
||||
extraClasses.push("archived");
|
||||
}
|
||||
|
||||
return extraClasses.join(" ");
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user