feat(frontend): improve application feedback messages
This commit is contained in:
@@ -4,6 +4,7 @@ import "../demo_identity.dart";
|
||||
import "../services/api_client.dart";
|
||||
import "../services/auth_service.dart";
|
||||
import "../theme/ensup_colors.dart";
|
||||
import "../widgets/app_message.dart";
|
||||
import "../widgets/ensup_top_bar.dart";
|
||||
import "../widgets/identification_option.dart";
|
||||
import "../widgets/brand_corners.dart";
|
||||
@@ -72,10 +73,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
}
|
||||
} catch (_) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text("La session Microsoft doit etre renouvelee."),
|
||||
),
|
||||
AppMessage.alerte(
|
||||
context,
|
||||
"La session Microsoft doit être renouvelée.",
|
||||
titre: "Session expirée",
|
||||
);
|
||||
} finally {
|
||||
if (mounted) {
|
||||
@@ -87,12 +88,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
Future<void> _identifierParQr() async {
|
||||
if (_connexionEnCours) return;
|
||||
if (AuthService.mode == AuthenticationMode.azure) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text(
|
||||
"L'identification QR securisee n'est pas encore configuree.",
|
||||
),
|
||||
),
|
||||
AppMessage.information(
|
||||
context,
|
||||
"L'identification QR sécurisée n'est pas encore configurée.",
|
||||
titre: "QR code indisponible",
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -121,9 +120,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
_ouvrirPourRole(profile.roleCode);
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(error.toString())));
|
||||
AppMessage.erreur(context, error, titre: "Connexion impossible");
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() => _connexionEnCours = false);
|
||||
|
||||
Reference in New Issue
Block a user