This commit is contained in:
MEGASOL\simon.adams
2025-08-30 20:17:22 +02:00
parent b714134f2e
commit 6a4e7fdb65
2 changed files with 27 additions and 2 deletions

View File

@@ -253,8 +253,18 @@ if (!isTouch) {
}
// --- Clear buttons ---
btnClearFinished.onclick = ()=>{ items = items.filter(i => !['done','duplicate'].includes(i.status)); render(); };
btnClearAll.onclick = ()=>{ items = []; render(); };
btnClearFinished.onclick = ()=>{
items = items.filter(i => !['done','duplicate'].includes(i.status));
render();
// also tell server to refresh album cache so a renamed album triggers a new one
fetch('/api/album/reset', { method: 'POST' }).catch(()=>{});
};
btnClearAll.onclick = ()=>{
items = [];
render();
// also reset album cache server-side
fetch('/api/album/reset', { method: 'POST' }).catch(()=>{});
};
// --- Dark mode toggle ---
btnTheme.onclick = toggleDarkMode;