mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 08:15:52 +01:00
feat(autocomplete): display note icon
This commit is contained in:
@@ -67,14 +67,14 @@ function getRecentNotes(activeNoteId: string) {
|
||||
return recentNotes.map((rn) => {
|
||||
const notePathArray = rn.notePath.split("/");
|
||||
|
||||
const noteTitle = beccaService.getNoteTitle(notePathArray[notePathArray.length - 1]);
|
||||
const { title, icon } = beccaService.getNoteTitleAndIcon(notePathArray[notePathArray.length - 1]);
|
||||
const notePathTitle = beccaService.getNoteTitleForPath(notePathArray);
|
||||
|
||||
return {
|
||||
notePath: rn.notePath,
|
||||
noteTitle,
|
||||
noteTitle: title,
|
||||
notePathTitle,
|
||||
highlightedNotePathTitle: utils.escapeHtml(notePathTitle)
|
||||
highlightedNotePathTitle: `<span class="${icon ?? "bx bx-note"}"></span> ${notePathTitle}`
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user