mirror of
https://github.com/zadam/trilium.git
synced 2026-01-06 06:34:25 +01:00
feat(client): display mapped icon as default for notes
This commit is contained in:
parent
57ff2f4023
commit
2eef655ec2
@ -1,3 +1,5 @@
|
|||||||
|
import { MIME_TYPES_DICT } from "@triliumnext/commons";
|
||||||
|
|
||||||
import cssClassManager from "../services/css_class_manager.js";
|
import cssClassManager from "../services/css_class_manager.js";
|
||||||
import type { Froca } from "../services/froca-interface.js";
|
import type { Froca } from "../services/froca-interface.js";
|
||||||
import noteAttributeCache from "../services/note_attribute_cache.js";
|
import noteAttributeCache from "../services/note_attribute_cache.js";
|
||||||
@ -597,8 +599,9 @@ export default class FNote {
|
|||||||
return "bx bx-folder";
|
return "bx bx-folder";
|
||||||
}
|
}
|
||||||
return "bx bx-note";
|
return "bx bx-note";
|
||||||
} else if (this.type === "code" && this.mime.startsWith("text/x-sql")) {
|
} else if (this.type === "code") {
|
||||||
return "bx bx-data";
|
const correspondingMimeType = MIME_TYPES_DICT.find(m => m.mime === this.mime);
|
||||||
|
return correspondingMimeType?.icon ?? NOTE_TYPE_ICONS.code;
|
||||||
}
|
}
|
||||||
return NOTE_TYPE_ICONS[this.type];
|
return NOTE_TYPE_ICONS[this.type];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user