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

Function insertPrimaryIndicator

src/ui/taskCardPrimaryIndicators.ts:137–155  ·  view source on GitHub ↗
(
	mainRow: HTMLElement,
	indicator: HTMLElement,
	afterSelector: string
)

Source from the content-addressed store, hash-verified

135}
136
137function insertPrimaryIndicator(
138 mainRow: HTMLElement,
139 indicator: HTMLElement,
140 afterSelector: string
141): void {
142 const previous = mainRow.querySelector(afterSelector);
143 if (previous) {
144 previous.insertAdjacentElement("afterend", indicator);
145 return;
146 }
147
148 const checkbox = mainRow.querySelector(".task-card__checkbox");
149 if (checkbox) {
150 checkbox.insertAdjacentElement("afterend", indicator);
151 return;
152 }
153
154 mainRow.insertBefore(indicator, mainRow.firstChild);
155}
156
157export function updateStatusIndicator(config: StatusIndicatorConfig): HTMLElement | null {
158 const { mainRow, card, plugin, effectiveStatus, visibleProperties, hideStatusIndicator } =

Callers 2

updateStatusIndicatorFunction · 0.85
updatePriorityIndicatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected