feat: add command openTodayNote with empty keyboard shortcut #7472

This commit is contained in:
contributor
2025-10-28 16:27:46 +02:00
parent 69b262040a
commit 5620e7f4a7
3 changed files with 19 additions and 0 deletions

View File

@@ -159,6 +159,16 @@ export default class Entrypoints extends Component {
this.openInWindowCommand({ notePath: "", hoistedNoteId: "root" });
}
async openTodayNoteCommand() {
const todayNote = await dateNoteService.getTodayNote();
if (!todayNote) {
console.warn("Missing today note.");
return;
}
await appContext.tabManager.openTabWithNoteWithHoisting(todayNote.noteId, { activate: true });
}
async runActiveNoteCommand() {
const noteContext = appContext.tabManager.getActiveContext();
if (!noteContext) {