added today launcher

This commit is contained in:
zadam
2022-12-18 23:25:35 +01:00
parent 5fca606730
commit e41104208a
4 changed files with 22 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import NoteLauncher from "../buttons/launcher/note_launcher.js";
import ScriptLauncher from "../buttons/launcher/script_launcher.js";
import CommandButtonWidget from "../buttons/command_button.js";
import utils from "../../services/utils.js";
import TodayLauncher from "../buttons/launcher/today_launcher.js";
export default class LauncherWidget extends BasicWidget {
constructor() {
@@ -101,6 +102,8 @@ export default class LauncherWidget extends BasicWidget {
return new BackInHistoryButtonWidget();
} else if (builtinWidget === 'forwardInHistoryButton') {
return new ForwardInHistoryButtonWidget();
} else if (builtinWidget === 'todayInJournal') {
return new TodayLauncher(note);
} else {
throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`);
}