repositories / pi-ext
pi-ext
bugabingas pi extensions
owned by bugabinga
extensions/ui/web/components/digest-indicator.js.ts
Rawexport function digestIndicatorText(count: number): string {
return `digest ${count}`;
}
export function renderDigestIndicatorJs(): string {
return `let telemetryEventCount = 0;
function setDigestIndicator(count) {
telemetryEventCount = count;
const indicator = document.querySelector('#ui-digest');
if (!indicator) return;
indicator.textContent = 'digest ' + count;
indicator.dataset.pending = count > 0 ? 'true' : 'false';
}
`;
}