aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-07-03 21:13:16 -0700
committerAdam Soltys <[email protected]>2026-07-03 21:13:16 -0700
commitceed0a4e9dcc2c42e71134e6e393b3ea1aea7296 (patch)
treeb17f62006635f00e14d5e10673e529e054773233
parent97ccbbca7a2e914e69e163ca05d1d0427d31596a (diff)
downloadcoinosv3-ceed0a4e9dcc2c42e71134e6e393b3ea1aea7296.tar.gz
coinosv3-ceed0a4e9dcc2c42e71134e6e393b3ea1aea7296.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01QFAcD4V284DvYZZHP7Rxxy
-rw-r--r--src/app.js8
1 files 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;
}