Skip to content

Commit 06a94c1

Browse files
author
Franz646
committed
fix: reset counters on page load, use applyIgnore after delete — v2.4.8
1 parent 197a6e1 commit 06a94c1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

custom_components/orphan_cleaner/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
PANEL_ICON = "mdi:broom"
4848

4949
# Versione corrente (usata per cache-busting)
50-
VERSION = "2.4.7"
50+
VERSION = "2.4.8"

custom_components/orphan_cleaner/frontend/panel.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,8 @@ <h2>Confirm deletion</h2>
707707
addLog('✓ Deleted: '+id,'ok');
708708
});
709709
(data.failed||[]).forEach(id => addLog('✗ Failed: '+id,'err'));
710-
document.getElementById('s-orphan').textContent = allOrphans.length;
711-
document.getElementById('s-heur').textContent = allOrphans.filter(o=>o.method==='heuristic').length;
712-
renderTable(filteredOrphans());
710+
document.getElementById('s-heur').textContent = allOrphans.filter(o=>o.method==='heuristic').length;
711+
applyIgnore();
713712
updateSelCount();
714713
addLog('Done: '+data.deleted_count+' deleted, '+data.failed_count+' failed.',
715714
data.failed_count > 0 ? 'warn' : 'ok');
@@ -800,6 +799,13 @@ <h2>Confirm deletion</h2>
800799
document.getElementById('ignore-input').addEventListener('keydown', e => { if (e.key==='Enter') ignoreAdd(); });
801800
document.getElementById('saved-ig-input').addEventListener('keydown', e => { if (e.key==='Enter') savedIgAdd(); });
802801
loadSavedIgnoreList();
802+
// Reset contatori a — ad ogni caricamento pagina
803+
['s-total','s-orphan','s-heur','s-sel'].forEach(id => {
804+
document.getElementById(id).textContent = '—';
805+
});
806+
document.getElementById('s-orphan').closest('.stat').className = 'stat';
807+
document.getElementById('s-heur').closest('.stat').className = 'stat';
808+
document.getElementById('s-sel').closest('.stat').className = 'stat';
803809
</script>
804810
</body>
805811
</html>

custom_components/orphan_cleaner/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"iot_class": "local_push",
1414
"issue_tracker": "https://github.com/Franz646/orphan-cleaner/issues",
1515
"requirements": [],
16-
"version": "2.4.7"
16+
"version": "2.4.8"
1717
}

0 commit comments

Comments
 (0)