#260: replace Success! feedback with a compact checkmark #262

Merged
fen merged 1 commits from fix-260 into dev 2026-09-17 19:34:34 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit a4e1abfaae - Show all commits
+1 -1
View File
@@ -197,7 +197,7 @@ function finishCreate(data) {
try { try {
navigator.clipboard.writeText(url); navigator.clipboard.writeText(url);
copyBtn.classList.add('ok'); // in-place success feedback (#53) copyBtn.classList.add('ok'); // in-place success feedback (#53)
copyBtn.textContent = 'Success!'; copyBtn.textContent = '';
setTimeout(() => { copyBtn.classList.remove('ok'); copyBtn.textContent = '⧉'; }, 2000); setTimeout(() => { copyBtn.classList.remove('ok'); copyBtn.textContent = '⧉'; }, 2000);
} catch(e) { toast('Copy failed', 'error'); } } catch(e) { toast('Copy failed', 'error'); }
}); });
+1 -1
View File
@@ -20,7 +20,7 @@ function copyFeedback(btn) {
if (!btn) return; if (!btn) return;
if (!btn.dataset.label) btn.dataset.label = btn.textContent; // remember the original label (Copy/Link) if (!btn.dataset.label) btn.dataset.label = btn.textContent; // remember the original label (Copy/Link)
btn.classList.add('ok'); btn.classList.add('ok');
btn.textContent = 'Success!'; btn.textContent = '';
clearTimeout(btn._okh); clearTimeout(btn._okh);
btn._okh = setTimeout(() => { btn.classList.remove('ok'); btn.textContent = btn.dataset.label; }, 2000); btn._okh = setTimeout(() => { btn.classList.remove('ok'); btn.textContent = btn.dataset.label; }, 2000);
} }