MCPcopy
hub / github.com/callumalpass/tasknotes / handleActionClick

Method handleActionClick

src/bases/TaskListView.ts:2484–2530  ·  view source on GitHub ↗
(
		action: string,
		task: TaskInfo,
		target: HTMLElement,
		event: MouseEvent
	)

Source from the content-addressed store, hash-verified

2482 };
2483
2484 private async handleActionClick(
2485 action: string,
2486 task: TaskInfo,
2487 target: HTMLElement,
2488 event: MouseEvent
2489 ): Promise<void> {
2490 switch (action) {
2491 case "toggle-status":
2492 await this.handleToggleStatus(task, event);
2493 return;
2494 case "priority-menu":
2495 this.showPriorityMenu(task, event);
2496 return;
2497 case "recurrence-menu":
2498 this.showRecurrenceMenu(task, event);
2499 return;
2500 case "reminder-menu":
2501 this.showReminderModal(task);
2502 return;
2503 case "task-context-menu":
2504 await showTaskContextMenu(
2505 event,
2506 task.path,
2507 this.plugin,
2508 this.getTaskActionDate(task)
2509 );
2510 return;
2511 case "edit-date":
2512 await this.openDateContextMenu(
2513 task,
2514 target.dataset.tnDateType as "due" | "scheduled" | undefined,
2515 event
2516 );
2517 return;
2518 case "filter-project-subtasks":
2519 await this.filterProjectSubtasks(task);
2520 return;
2521 case "toggle-subtasks":
2522 await this.toggleSubtasks(task, target);
2523 return;
2524 case "toggle-blocking-tasks":
2525 await this.toggleBlockingTasks(task, target);
2526 return;
2527 default:
2528 await this.handleCardClick(task, event);
2529 }
2530 }
2531
2532 private async handleToggleStatus(task: TaskInfo, event: MouseEvent): Promise<void> {
2533 try {

Callers

nothing calls this directly

Calls 11

handleToggleStatusMethod · 0.95
showPriorityMenuMethod · 0.95
showRecurrenceMenuMethod · 0.95
showReminderModalMethod · 0.95
getTaskActionDateMethod · 0.95
openDateContextMenuMethod · 0.95
filterProjectSubtasksMethod · 0.95
toggleSubtasksMethod · 0.95
toggleBlockingTasksMethod · 0.95
handleCardClickMethod · 0.95
showTaskContextMenuFunction · 0.85

Tested by

no test coverage detected