added workspace icon and background color

This commit is contained in:
zadam
2020-11-25 20:25:55 +01:00
parent 61f30373d4
commit b9c0823abf
2 changed files with 31 additions and 7 deletions

View File

@@ -265,10 +265,14 @@ class NoteShort {
}
getIcon(isFolder = false) {
const iconCassLabels = this.getLabels('iconClass');
const iconClassLabels = this.getLabels('iconClass');
const workspaceIconClass = this.getWorkspaceIconClass();
if (iconCassLabels.length > 0) {
return iconCassLabels.map(l => l.value).join(' ');
if (iconClassLabels.length > 0) {
return iconClassLabels.map(l => l.value).join(' ');
}
else if (workspaceIconClass) {
return workspaceIconClass;
}
else if (this.noteId === 'root') {
return "bx bx-chevrons-right";
@@ -547,9 +551,14 @@ class NoteShort {
return labels.map(l => l.value).join(' ');
}
getHoistedCssClass() {
const labels = this.getLabels('hoistedCssClass');
return labels.map(l => l.value).join(' ');
getWorkspaceIconClass() {
const labels = this.getLabels('workspaceIconClass');
return labels.length > 0 ? labels[0].value : "";
}
getWorkspaceTabBackgroundColor() {
const labels = this.getLabels('workspaceTabBackgroundColor');
return labels.length > 0 ? labels[0].value : "";
}
}