(container: HTMLElement)
| 676 | } |
| 677 | |
| 678 | protected createActionButtons(container: HTMLElement): void { |
| 679 | createTaskModalActionButtons(this.getActionButtonContext(), { |
| 680 | container, |
| 681 | leadingButtons: [ |
| 682 | { |
| 683 | className: "tn-task-modal__open-note-button", |
| 684 | text: this.t("modals.task.buttons.openNote"), |
| 685 | onClick: () => { |
| 686 | void this.openTaskNote(); |
| 687 | }, |
| 688 | }, |
| 689 | { |
| 690 | className: "mod-warning tn-task-modal__archive-button", |
| 691 | text: this.task.archived |
| 692 | ? this.t("modals.taskEdit.buttons.unarchive") |
| 693 | : this.t("modals.taskEdit.buttons.archive"), |
| 694 | onClick: () => { |
| 695 | void this.archiveTask(); |
| 696 | }, |
| 697 | }, |
| 698 | { |
| 699 | className: "mod-warning tn-task-modal__delete-button", |
| 700 | text: this.t("contextMenus.task.delete"), |
| 701 | onClick: () => { |
| 702 | void this.deleteTask(); |
| 703 | }, |
| 704 | }, |
| 705 | ], |
| 706 | onSave: () => this.handleSave(), |
| 707 | onSaved: () => { |
| 708 | this.forceClose(); |
| 709 | }, |
| 710 | onCancel: () => { |
| 711 | this.close(); |
| 712 | }, |
| 713 | }); |
| 714 | } |
| 715 | |
| 716 | protected async initializeSubtasks(): Promise<void> { |
| 717 | try { |
no test coverage detected