[UX+SEC] Eccellenza pre-audit: idle timeout, loading states, i18n, UX polish
- common.js: idle session timeout 30min con avviso countdown 5min prima del logout - common.js: checkAuth() attiva automaticamente il monitor di inattività - api.js: messaggi errore connessione usano i18n (IT/EN) tramite I18n.t() - risks.html: saveRisk() e aiSuggest() con setButtonLoading durante salvataggio - risks.html: deleteRisk() ricarica la matrice se si è in matrix view - incidents.html: createIncident() con setButtonLoading durante registrazione - policies.html: savePolicy() e saveAIGeneratedPolicy() con setButtonLoading - policies.html: banner AI-draft con pulsante X per dismissione Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
a56401f5a9
commit
59fad22c0e
@@ -607,6 +607,8 @@
|
||||
if (!data.description) { showNotification('La descrizione e\' obbligatoria', 'warning'); return; }
|
||||
if (!data.detected_at) { showNotification('La data di rilevamento e\' obbligatoria', 'warning'); return; }
|
||||
|
||||
const btn = document.querySelector('#modal-overlay .btn-primary');
|
||||
setButtonLoading(btn, true);
|
||||
try {
|
||||
const result = await api.createIncident(data);
|
||||
if (result.success) {
|
||||
@@ -617,9 +619,11 @@
|
||||
showNotification(msg, 'success');
|
||||
loadIncidents();
|
||||
} else {
|
||||
setButtonLoading(btn, false);
|
||||
showNotification(result.message || 'Errore nella creazione', 'error');
|
||||
}
|
||||
} catch (e) {
|
||||
setButtonLoading(btn, false);
|
||||
showNotification('Errore di connessione', 'error');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user