Skip to content

Build your personal knowledge base with Trilium Notes

feat(tray): display recent note date as detail

Elian Doran50514e2418e9
diff --git a/src/services/tray.ts b/src/services/tray.ts
index e896e13e57..b5cd8de922 100644
--- a/src/services/tray.ts
+++ b/src/services/tray.ts
@@ -126,11 +126,18 @@ function updateTrayMenu() {
LIMIT 10
`);
const menuItems: Electron.MenuItemConstructorOptions[] = [];
+ const formatter = new Intl.DateTimeFormat(undefined, {
+ dateStyle: "medium",
+ timeStyle: "short"
+ });
for (const recentNote of recentNotes) {
+ const date = new Date(recentNote.utcDateCreated);
+
menuItems.push({
label: becca_service.getNoteTitle(recentNote.noteId),
type: "normal",
+ sublabel: formatter.format(date),
click: () => openInSameTab(recentNote)
})
}