2026-03-08 17:41:38 +01:00
|
|
|
/**
|
|
|
|
|
* Status bar: status text + refresh button.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/** Update the status text. */
|
|
|
|
|
export function setStatus(text: string): void {
|
|
|
|
|
const el = document.getElementById('status-text');
|
|
|
|
|
if (el) el.textContent = text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Set the refresh button click handler. */
|
|
|
|
|
export function onRefreshClick(handler: () => void): void {
|
|
|
|
|
const btn = document.getElementById('refresh-btn');
|
2026-03-09 10:01:58 +01:00
|
|
|
if (btn) btn.addEventListener('click', () => {
|
|
|
|
|
navigator.vibrate?.(10);
|
|
|
|
|
handler();
|
|
|
|
|
});
|
2026-03-08 17:41:38 +01:00
|
|
|
}
|