[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:
DevEnv nis2-agile
2026-02-20 12:25:52 +01:00
co-authored by Claude Sonnet 4.6
parent a56401f5a9
commit 59fad22c0e
5 changed files with 134 additions and 5 deletions
+4 -2
View File
@@ -55,7 +55,8 @@ class NIS2API {
return json;
} catch (error) {
console.error(`[API] Network error: ${method} ${endpoint}`, error);
return { success: false, message: 'Errore di connessione al server' };
const msg = typeof I18n !== 'undefined' ? I18n.t('msg.error_connection') : 'Errore di connessione al server';
return { success: false, message: msg };
}
}
@@ -274,7 +275,8 @@ class NIS2API {
});
return response.json();
} catch (error) {
return { success: false, message: 'Errore di connessione al server' };
const msg = typeof I18n !== 'undefined' ? I18n.t('msg.error_connection') : 'Errore di connessione al server';
return { success: false, message: msg };
}
}