diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-09 20:16:41 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-09 20:16:41 +0300 |
| commit | 8aa495df3b3da9213bdf29d7a15c1473fefcc63b (patch) | |
| tree | fff04a324527e08b75a9667dd4e81b5a07a0ea0d /web/js/admin.js | |
| parent | c68965ac297f6b4f0da4ad541e921646c320c489 (diff) | |
s1 add media rescan hotkey and progress indicator
Diffstat (limited to 'web/js/admin.js')
| -rw-r--r-- | web/js/admin.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/js/admin.js b/web/js/admin.js index 86ad471..ac43643 100644 --- a/web/js/admin.js +++ b/web/js/admin.js @@ -1,5 +1,6 @@ import { API } from './api.js'; import { escapeHtml, toast } from './utils.js'; +import { triggerRescan } from './views/admin-status.js'; export function initAdmin() { const btn = document.getElementById('admin-toggle'); @@ -18,8 +19,7 @@ export function initAdmin() { rescanBtn?.addEventListener('click', async () => { rescanBtn.disabled = true; - try { await API.rescan(); toast('Rescan triggered'); } - catch (err) { toast(err.message, 'error'); } + try { await triggerRescan(); } finally { rescanBtn.disabled = false; } }); |
