using jam font icon pack instead of feather, fixes #204

This commit is contained in:
azivner
2018-11-09 11:57:52 +01:00
parent 8be328cb3b
commit 232f135843
39 changed files with 1034 additions and 99 deletions

View File

@@ -22,6 +22,38 @@ async function prepareBranch(note) {
}
}
function getIcon(note) {
if (note.noteId === 'root') {
return "jam jam-chevrons-right";
}
else if (note.type === 'text') {
if (note.hasChildren()) {
return "jam jam-folder";
}
else {
return "jam jam-file";
}
}
else if (note.type === 'file') {
return "jam jam-attachment"
}
else if (note.type === 'image') {
return "jam jam-picture"
}
else if (note.type === 'code') {
return "jam jam-terminal"
}
else if (note.type === 'render') {
return "jam jam-play"
}
else if (note.type === 'search') {
return "jam jam-search-folder"
}
else if (note.type === 'relation-map') {
return "jam jam-map"
}
}
async function prepareNode(branch) {
const note = await branch.getNote();
const title = (branch.prefix ? (branch.prefix + " - ") : "") + note.title;
@@ -33,6 +65,7 @@ async function prepareNode(branch) {
isProtected: note.isProtected,
title: utils.escapeHtml(title),
extraClasses: await getExtraClasses(note),
icon: getIcon(note),
refKey: note.noteId,
expanded: note.type !== 'search' && branch.isExpanded
};