mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
feat(tray): display recent note date as detail
This commit is contained in:
parent
495fce7594
commit
50514e2418
@ -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)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user