From ceed0a4e9dcc2c42e71134e6e393b3ea1aea7296 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 3 Jul 2026 21:13:16 -0700 Subject: Ark: give the boarding/refresh toasts time to be read toast() takes an optional duration; the two informational Ark messages (full sentences, not confirmations) show for 5s instead of 1.6s. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QFAcD4V284DvYZZHP7Rxxy --- src/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app.js b/src/app.js index 75c29b4..182c0ae 100644 --- a/src/app.js +++ b/src/app.js @@ -446,7 +446,7 @@ function goBack(toParent) { // ---------------------------------------------------------------- utilities let toastTimer; -function toast(msg) { +function toast(msg, ms = 1600) { let t = document.querySelector('.toast'); if (!t) { t = h('div', { class: 'toast' }); @@ -455,7 +455,7 @@ function toast(msg) { t.textContent = msg; requestAnimationFrame(() => t.classList.add('show')); clearTimeout(toastTimer); - toastTimer = setTimeout(() => t.classList.remove('show'), 1600); + toastTimer = setTimeout(() => t.classList.remove('show'), ms); } async function copy(text) { @@ -1923,7 +1923,7 @@ async function doArkBoard() { const txid = await wallet.broadcast(hexTx); await ark.completeBoard(actionId, txid); ui.arkBoardAmt = ''; - toast(t('arkBoardStarted')); + toast(t('arkBoardStarted'), 5000); wallet.scan().catch(() => {}); } catch (e) { ui.arkError = e.message; @@ -1935,7 +1935,7 @@ async function doArkRefresh() { ui.arkBusy = 'refresh'; ui.arkError = ''; render(); try { await ark.refresh(); - toast(t('arkRefreshStarted')); + toast(t('arkRefreshStarted'), 5000); } catch (e) { ui.arkError = e.message; } -- cgit v1.2.3