Files
Trilium/apps/client/src/widgets/buttons/launcher/today_launcher.ts

16 lines
473 B
TypeScript
Raw Normal View History

2022-12-18 23:25:35 +01:00
import NoteLauncher from "./note_launcher.js";
import dateNotesService from "../../../services/date_notes.js";
import appContext from "../../../components/app_context.js";
export default class TodayLauncher extends NoteLauncher {
async getTargetNoteId() {
const todayNote = await dateNotesService.getTodayNote();
return todayNote?.noteId;
2022-12-18 23:25:35 +01:00
}
getHoistedNoteId() {
2025-03-03 21:02:18 +01:00
return appContext.tabManager.getActiveContext()?.hoistedNoteId;
2022-12-18 23:25:35 +01:00
}
}