mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 07:15:51 +01:00
feat(tabs): experiment with note icons instead of workspace icons
This commit is contained in:
@@ -671,11 +671,6 @@ export default class TabRowWidget extends BasicWidget {
|
|||||||
const hoistedNote = froca.getNoteFromCache(noteContext.hoistedNoteId);
|
const hoistedNote = froca.getNoteFromCache(noteContext.hoistedNoteId);
|
||||||
|
|
||||||
if (hoistedNote) {
|
if (hoistedNote) {
|
||||||
$tab.find('.note-tab-icon')
|
|
||||||
.removeClass()
|
|
||||||
.addClass("note-tab-icon")
|
|
||||||
.addClass(hoistedNote.getWorkspaceIconClass());
|
|
||||||
|
|
||||||
$tab.find('.note-tab-wrapper').css("background", hoistedNote.getWorkspaceTabBackgroundColor());
|
$tab.find('.note-tab-wrapper').css("background", hoistedNote.getWorkspaceTabBackgroundColor());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -696,6 +691,11 @@ export default class TabRowWidget extends BasicWidget {
|
|||||||
$tab.addClass(note.getCssClass());
|
$tab.addClass(note.getCssClass());
|
||||||
$tab.addClass(utils.getNoteTypeClass(note.type));
|
$tab.addClass(utils.getNoteTypeClass(note.type));
|
||||||
$tab.addClass(utils.getMimeTypeClass(note.mime));
|
$tab.addClass(utils.getMimeTypeClass(note.mime));
|
||||||
|
|
||||||
|
$tab.find('.note-tab-icon')
|
||||||
|
.removeClass()
|
||||||
|
.addClass("note-tab-icon")
|
||||||
|
.addClass(note.getIcon());
|
||||||
}
|
}
|
||||||
|
|
||||||
async entitiesReloadedEvent({loadResults}) {
|
async entitiesReloadedEvent({loadResults}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user