fix(backup/webui): hold Refresh spin ~450ms so instant refetches still pulse
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ac07420ef1
commit
6bed124984
@ -127,7 +127,10 @@ class BackupPage {
|
||||
if (refreshBtn.classList.contains('is-refreshing')) return;
|
||||
refreshBtn.classList.add('is-refreshing');
|
||||
const done = () => refreshBtn.classList.remove('is-refreshing');
|
||||
this.refreshAll().then(() => this.render()).then(done, done);
|
||||
// Hold the spin for a beat even when the refetch is instant (local
|
||||
// data) so the click always registers as a visible pulse.
|
||||
const minSpin = new Promise((r) => setTimeout(r, 450));
|
||||
Promise.all([this.refreshAll().then(() => this.render()), minSpin]).then(done, done);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user