Notes/src/public/app/widgets/buttons/open_note_button_widget.js

13 lines
422 B
JavaScript
Raw Normal View History

2021-09-16 23:09:48 +02:00
import ButtonWidget from "./button_widget.js";
import appContext from "../../services/app_context.js";
2021-09-17 10:09:42 +02:00
// TODO: here we could read icon and title of the target note and use it for tooltip and displayed icon
2021-09-16 23:09:48 +02:00
export default class OpenNoteButtonWidget extends ButtonWidget {
targetNote(noteId) {
this.onClick(() => appContext.tabManager.openTabWithNoteWithHoisting(noteId, true));
return this;
}
}