fix: rescan-status indicator now updates and is clickable after page reload

- Added defensive check for rescan-status element before adding event listener
- Added e.stopPropagation() to prevent click event bubbling issues
- Added console logging for debugging click events
- Call checkActiveScanStatus() directly in init() method, not just on socket connect
  This ensures scan status is checked immediately on page load even if WebSocket
  connection is delayed
This commit is contained in:
Lukas 2025-12-24 21:35:57 +01:00
parent 458ca1d776
commit 9e393adb00
6 changed files with 35 additions and 7 deletions

Binary file not shown.

Binary file not shown.

View File

@ -17,8 +17,7 @@
"keep_days": 30
},
"other": {
"master_password_hash": "$pbkdf2-sha256$29000$vrf2npNSKqVU6r137t27tw$XkJLRylHf84bQFQtXUKVSY7QsaMV1Z1Wgh41H3girGc",
"anime_directory": "/mnt/server/serien/Serien/"
"master_password_hash": "$pbkdf2-sha256$29000$PgeglJJSytlbqxUipJSylg$E.0KcXCc0.9cYnBCrNeVmZULQnvx2rgNLOFZjYyTiuA"
},
"version": "1.0.0"
}

View File

@ -17,8 +17,7 @@
"keep_days": 30
},
"other": {
"master_password_hash": "$pbkdf2-sha256$29000$tpaSEqI0BmCMsbb2HgOA0A$zF52br5qvqyA2ciQlDt7.Cdny2d2qaq1BPqNEntoMeY",
"anime_directory": "/mnt/server/serien/Serien/"
"master_password_hash": "$pbkdf2-sha256$29000$4tyb09q7F.I8JwSgtPYe4w$MpmQLy0b1tYvjqNwwbHy4b59AxtjZdQ8eqrYlbrwmO4"
},
"version": "1.0.0"
}

View File

@ -0,0 +1,23 @@
{
"name": "Aniworld",
"data_dir": "data",
"scheduler": {
"enabled": true,
"interval_minutes": 60
},
"logging": {
"level": "INFO",
"file": null,
"max_bytes": null,
"backup_count": 3
},
"backup": {
"enabled": false,
"path": "data/backups",
"keep_days": 30
},
"other": {
"master_password_hash": "$pbkdf2-sha256$29000$vBdCKMUYA.Dc.7.3NqbUGg$2GOV4HuUcrl8Dolk3bzmXsOqG/xC/rCmzd1G2lIWtog"
},
"version": "1.0.0"
}

View File

@ -26,6 +26,8 @@ class AniWorldApp {
this.loadSeries();
this.initTheme();
this.updateConnectionStatus();
// Check scan status on page load (in case socket connect event is delayed)
this.checkActiveScanStatus();
}
async checkAuthentication() {
@ -418,9 +420,14 @@ class AniWorldApp {
});
// Click on rescan status indicator to reopen scan overlay
document.getElementById('rescan-status').addEventListener('click', () => {
this.reopenScanOverlay();
});
const rescanStatus = document.getElementById('rescan-status');
if (rescanStatus) {
rescanStatus.addEventListener('click', (e) => {
e.stopPropagation();
console.log('Rescan status clicked');
this.reopenScanOverlay();
});
}
// Configuration modal
document.getElementById('config-btn').addEventListener('click', () => {