File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,16 @@ export default class Entrypoints extends Component {
159159 this . openInWindowCommand ( { notePath : "" , hoistedNoteId : "root" } ) ;
160160 }
161161
162+ async openTodayNoteCommand ( ) {
163+ const todayNote = await dateNoteService . getTodayNote ( ) ;
164+ if ( ! todayNote ) {
165+ console . warn ( "Missing today note." ) ;
166+ return ;
167+ }
168+
169+ await appContext . tabManager . openTabWithNoteWithHoisting ( todayNote . noteId , { activate : true } ) ;
170+ }
171+
162172 async runActiveNoteCommand ( ) {
163173 const noteContext = appContext . tabManager . getActiveContext ( ) ;
164174 if ( ! noteContext ) {
Original file line number Diff line number Diff line change @@ -319,6 +319,14 @@ function getDefaultKeyboardActions() {
319319 description : t ( "keyboard_actions.open-new-window" ) ,
320320 scope : "window"
321321 } ,
322+ {
323+ actionName : "openTodayNote" ,
324+ friendlyName : t ( "keyboard_action_names.open-today-note" ) ,
325+ iconClass : "bx bx-calendar" ,
326+ defaultShortcuts : [ ] ,
327+ description : t ( "keyboard_actions.open-today-note" ) ,
328+ scope : "window"
329+ } ,
322330 {
323331 actionName : "toggleTray" ,
324332 friendlyName : t ( "keyboard_action_names.toggle-system-tray-icon" ) ,
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ const enum KeyboardActionNamesEnum {
3535 activateNextTab ,
3636 activatePreviousTab ,
3737 openNewWindow ,
38+ openTodayNote ,
3839 toggleTray ,
3940 toggleZenMode ,
4041 firstTab ,
You can’t perform that action at this time.
0 commit comments