( mainRow: HTMLElement, indicator: HTMLElement, afterSelector: string )
| 135 | } |
| 136 | |
| 137 | function 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 | |
| 157 | export function updateStatusIndicator(config: StatusIndicatorConfig): HTMLElement | null { |
| 158 | const { mainRow, card, plugin, effectiveStatus, visibleProperties, hideStatusIndicator } = |
no outgoing calls
no test coverage detected