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

Function applyTaskCardPriorityColor

src/ui/taskCardPrimaryIndicators.ts:71–85  ·  view source on GitHub ↗
(
	card: HTMLElement,
	task: TaskInfo,
	plugin: TaskNotesPlugin
)

Source from the content-addressed store, hash-verified

69}
70
71export function applyTaskCardPriorityColor(
72 card: HTMLElement,
73 task: TaskInfo,
74 plugin: TaskNotesPlugin
75): PriorityConfig | null | undefined {
76 const priorityConfig = plugin.priorityManager.getPriorityConfig(task.priority);
77 if (priorityConfig?.color) {
78 card.style.setProperty("--priority-color", priorityConfig.color);
79 card.style.setProperty("--current-priority-color", priorityConfig.color);
80 } else {
81 card.style.removeProperty("--priority-color");
82 card.style.removeProperty("--current-priority-color");
83 }
84 return priorityConfig;
85}
86
87export function configureStatusIndicator(
88 statusDot: HTMLElement,

Callers 3

createTaskCardFunction · 0.90
updateTaskCardFunction · 0.90

Calls 1

getPriorityConfigMethod · 0.80

Tested by

no test coverage detected