Reset picker status between selections and harden upload guards

This commit is contained in:
Repinoid
2026-10-24 08:31:19 +03:00
parent eb61a1b356
commit 3c0c3a2043
7 changed files with 48 additions and 10 deletions
+2
View File
@@ -156,6 +156,7 @@ export function initFilePicker(config) {
if (root.querySelector('#fp-clear-btn')) listen(root.querySelector('#fp-clear-btn'), 'click', () => {
state.nodes = [];
state.fileKeys.clear();
if (elements.statusEl) elements.statusEl.textContent = '';
redraw();
notify(cfg, state);
});
@@ -174,6 +175,7 @@ export function initFilePicker(config) {
clear: () => {
state.nodes = [];
state.fileKeys.clear();
if (elements.statusEl) elements.statusEl.textContent = '';
redraw();
notify(cfg, state);
},