MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / createActionButtons

Function createActionButtons

src/modals/TaskModal.ts:916–939  ·  view source on GitHub ↗
(container: HTMLElement)

Source from the content-addressed store, hash-verified

914 }
915
916 protected createActionButtons(container: HTMLElement): void {
917 const leadingButtons: TaskModalLeadingButton[] = [];
918 if (this.isEditMode()) {
919 leadingButtons.push({
920 className: "tn-task-modal__open-note-button",
921 text: this.t("modals.task.buttons.openNote"),
922 onClick: () => {
923 void this.openTaskNote();
924 },
925 });
926 }
927
928 createTaskModalActionButtons(this.getActionButtonContext(), {
929 container,
930 leadingButtons,
931 onSave: () => this.handleSave(),
932 onSaved: () => {
933 this.close();
934 },
935 onCancel: () => {
936 this.close();
937 },
938 });
939 }
940
941 protected getActionButtonContext(): TaskModalActionButtonContext {
942 return {

Callers

nothing calls this directly

Calls 6

isEditModeMethod · 0.80
closeMethod · 0.65
tMethod · 0.45
openTaskNoteMethod · 0.45
handleSaveMethod · 0.45

Tested by

no test coverage detected