summaryrefslogtreecommitdiff
path: root/web/js/admin.js
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-09 20:16:41 +0300
committerPaul Buetow <paul@buetow.org>2026-05-09 20:16:41 +0300
commit8aa495df3b3da9213bdf29d7a15c1473fefcc63b (patch)
treefff04a324527e08b75a9667dd4e81b5a07a0ea0d /web/js/admin.js
parentc68965ac297f6b4f0da4ad541e921646c320c489 (diff)
s1 add media rescan hotkey and progress indicator
Diffstat (limited to 'web/js/admin.js')
-rw-r--r--web/js/admin.js4
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; }
});