feat: enhance routing and connectivity handling
- Added a new route for connection issues, allowing users to navigate to a dedicated page when the server is unreachable. - Updated the RouterNotifier to manage navigation based on server connectivity status and authentication state. - Improved the handling of offline scenarios by integrating connectivity checks into the routing logic. - Enhanced localization support for connection issue messages in multiple languages. - Refactored the OfflineIndicator widget to streamline the display of connectivity status without unnecessary complexity.
This commit is contained in:
@@ -8,6 +8,18 @@
|
||||
"loadingProfile": "Profil wird geladen...",
|
||||
"unableToLoadProfile": "Profil konnte nicht geladen werden",
|
||||
"pleaseCheckConnection": "Bitte überprüfe deine Verbindung und versuche es erneut",
|
||||
"connectionIssueTitle": "Server nicht erreichbar",
|
||||
"@connectionIssueTitle": {
|
||||
"description": "Titel, wenn der konfigurierte Server nicht erreichbar ist"
|
||||
},
|
||||
"connectionIssueSubtitle": "Verbindung wiederherstellen oder abmelden, um einen anderen Server zu wählen.",
|
||||
"@connectionIssueSubtitle": {
|
||||
"description": "Untertitel mit den verfügbaren Aktionen, wenn der Server nicht erreichbar ist"
|
||||
},
|
||||
"stillOfflineMessage": "Der Server ist weiterhin nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.",
|
||||
"@stillOfflineMessage": {
|
||||
"description": "Statusnachricht nach einem erneuten Versuch ohne wiederhergestellte Verbindung"
|
||||
},
|
||||
"account": "Konto",
|
||||
"signOut": "Abmelden",
|
||||
"endYourSession": "Sitzung beenden",
|
||||
@@ -129,7 +141,6 @@
|
||||
"invalidImageFormat": "Ungültiges Bildformat",
|
||||
"emptyImageData": "Leere Bilddaten"
|
||||
,
|
||||
"offlineBanner": "Du bist offline. Einige Funktionen sind eingeschränkt.",
|
||||
"featureRequiresInternet": "Diese Funktion erfordert eine Internetverbindung",
|
||||
"messagesWillSendWhenOnline": "Nachrichten werden gesendet, sobald du wieder online bist",
|
||||
"confirm": "Bestätigen",
|
||||
|
||||
@@ -15,6 +15,18 @@
|
||||
"unableToLoadProfile": "Unable to load profile",
|
||||
"@unableToLoadProfile": {"description": "Error title shown when profile request fails."},
|
||||
"pleaseCheckConnection": "Please check your connection and try again",
|
||||
"connectionIssueTitle": "Can't reach your server",
|
||||
"@connectionIssueTitle": {
|
||||
"description": "Title shown when the configured server is unreachable"
|
||||
},
|
||||
"connectionIssueSubtitle": "Reconnect to continue or sign out to choose a different server.",
|
||||
"@connectionIssueSubtitle": {
|
||||
"description": "Subtitle explaining available actions when the server cannot be reached"
|
||||
},
|
||||
"stillOfflineMessage": "We still can't reach the server. Double-check your connection and try again.",
|
||||
"@stillOfflineMessage": {
|
||||
"description": "Status message after a retry when connectivity has not been restored"
|
||||
},
|
||||
"@pleaseCheckConnection": {"description": "Generic connectivity hint after an error."},
|
||||
"account": "Account",
|
||||
"@account": {"description": "Section header for account-related options."},
|
||||
@@ -282,8 +294,6 @@
|
||||
"emptyImageData": "Empty image data",
|
||||
"@emptyImageData": {"description": "Error when image data buffer is empty."}
|
||||
,
|
||||
"offlineBanner": "You're offline. Some features may be limited.",
|
||||
"@offlineBanner": {"description": "Banner warning when device is offline."},
|
||||
"featureRequiresInternet": "This feature requires an internet connection",
|
||||
"@featureRequiresInternet": {"description": "Informational text explaining internet requirement."},
|
||||
"messagesWillSendWhenOnline": "Messages will be sent when you're back online",
|
||||
|
||||
@@ -8,6 +8,18 @@
|
||||
"loadingProfile": "Chargement du profil...",
|
||||
"unableToLoadProfile": "Impossible de charger le profil",
|
||||
"pleaseCheckConnection": "Veuillez vérifier votre connexion et réessayer",
|
||||
"connectionIssueTitle": "Impossible d'atteindre votre serveur",
|
||||
"@connectionIssueTitle": {
|
||||
"description": "Titre affiché lorsque le serveur configuré est injoignable"
|
||||
},
|
||||
"connectionIssueSubtitle": "Reconnectez-vous pour continuer ou déconnectez-vous pour choisir un autre serveur.",
|
||||
"@connectionIssueSubtitle": {
|
||||
"description": "Sous-titre expliquant les actions possibles quand le serveur est injoignable"
|
||||
},
|
||||
"stillOfflineMessage": "Nous ne pouvons toujours pas joindre le serveur. Vérifiez votre connexion et réessayez.",
|
||||
"@stillOfflineMessage": {
|
||||
"description": "Message d'état après une tentative de reconnexion sans succès"
|
||||
},
|
||||
"account": "Compte",
|
||||
"signOut": "Se déconnecter",
|
||||
"endYourSession": "Terminer votre session",
|
||||
@@ -129,7 +141,6 @@
|
||||
"invalidImageFormat": "Format d'image invalide",
|
||||
"emptyImageData": "Données d'image vides"
|
||||
,
|
||||
"offlineBanner": "Vous êtes hors ligne. Certaines fonctions peuvent être limitées.",
|
||||
"featureRequiresInternet": "Cette fonctionnalité nécessite une connexion Internet",
|
||||
"messagesWillSendWhenOnline": "Les messages seront envoyés lorsque vous serez de nouveau en ligne",
|
||||
"confirm": "Confirmer",
|
||||
|
||||
@@ -8,6 +8,18 @@
|
||||
"loadingProfile": "Caricamento profilo...",
|
||||
"unableToLoadProfile": "Impossibile caricare il profilo",
|
||||
"pleaseCheckConnection": "Controlla la connessione e riprova",
|
||||
"connectionIssueTitle": "Impossibile raggiungere il server",
|
||||
"@connectionIssueTitle": {
|
||||
"description": "Titolo mostrato quando il server configurato non è raggiungibile"
|
||||
},
|
||||
"connectionIssueSubtitle": "Riconnettiti per continuare oppure esci per scegliere un server diverso.",
|
||||
"@connectionIssueSubtitle": {
|
||||
"description": "Sottotitolo che spiega le azioni disponibili quando il server non è raggiungibile"
|
||||
},
|
||||
"stillOfflineMessage": "Non riusciamo ancora a raggiungere il server. Controlla la connessione e riprova.",
|
||||
"@stillOfflineMessage": {
|
||||
"description": "Messaggio di stato dopo un tentativo di riconnessione senza successo"
|
||||
},
|
||||
"account": "Account",
|
||||
"signOut": "Esci",
|
||||
"endYourSession": "Termina la sessione",
|
||||
@@ -129,7 +141,6 @@
|
||||
"invalidImageFormat": "Formato immagine non valido",
|
||||
"emptyImageData": "Dati immagine vuoti"
|
||||
,
|
||||
"offlineBanner": "Sei offline. Alcune funzioni potrebbero essere limitate.",
|
||||
"featureRequiresInternet": "Questa funzione richiede una connessione Internet",
|
||||
"messagesWillSendWhenOnline": "I messaggi verranno inviati quando tornerai online",
|
||||
"confirm": "Conferma",
|
||||
|
||||
@@ -150,6 +150,24 @@ abstract class AppLocalizations {
|
||||
/// **'Please check your connection and try again'**
|
||||
String get pleaseCheckConnection;
|
||||
|
||||
/// Title shown when the configured server is unreachable
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Can\'t reach your server'**
|
||||
String get connectionIssueTitle;
|
||||
|
||||
/// Subtitle explaining available actions when the server cannot be reached
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Reconnect to continue or sign out to choose a different server.'**
|
||||
String get connectionIssueSubtitle;
|
||||
|
||||
/// Status message after a retry when connectivity has not been restored
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'We still can\'t reach the server. Double-check your connection and try again.'**
|
||||
String get stillOfflineMessage;
|
||||
|
||||
/// Section header for account-related options.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
@@ -864,12 +882,6 @@ abstract class AppLocalizations {
|
||||
/// **'Empty image data'**
|
||||
String get emptyImageData;
|
||||
|
||||
/// Banner warning when device is offline.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'You\'re offline. Some features may be limited.'**
|
||||
String get offlineBanner;
|
||||
|
||||
/// Informational text explaining internet requirement.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -33,6 +33,17 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get pleaseCheckConnection =>
|
||||
'Bitte überprüfe deine Verbindung und versuche es erneut';
|
||||
|
||||
@override
|
||||
String get connectionIssueTitle => 'Server nicht erreichbar';
|
||||
|
||||
@override
|
||||
String get connectionIssueSubtitle =>
|
||||
'Verbindung wiederherstellen oder abmelden, um einen anderen Server zu wählen.';
|
||||
|
||||
@override
|
||||
String get stillOfflineMessage =>
|
||||
'Der Server ist weiterhin nicht erreichbar. Prüfe deine Verbindung und versuche es erneut.';
|
||||
|
||||
@override
|
||||
String get account => 'Konto';
|
||||
|
||||
@@ -434,10 +445,6 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
@override
|
||||
String get emptyImageData => 'Leere Bilddaten';
|
||||
|
||||
@override
|
||||
String get offlineBanner =>
|
||||
'Du bist offline. Einige Funktionen sind eingeschränkt.';
|
||||
|
||||
@override
|
||||
String get featureRequiresInternet =>
|
||||
'Diese Funktion erfordert eine Internetverbindung';
|
||||
|
||||
@@ -33,6 +33,17 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get pleaseCheckConnection =>
|
||||
'Please check your connection and try again';
|
||||
|
||||
@override
|
||||
String get connectionIssueTitle => 'Can\'t reach your server';
|
||||
|
||||
@override
|
||||
String get connectionIssueSubtitle =>
|
||||
'Reconnect to continue or sign out to choose a different server.';
|
||||
|
||||
@override
|
||||
String get stillOfflineMessage =>
|
||||
'We still can\'t reach the server. Double-check your connection and try again.';
|
||||
|
||||
@override
|
||||
String get account => 'Account';
|
||||
|
||||
@@ -430,9 +441,6 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get emptyImageData => 'Empty image data';
|
||||
|
||||
@override
|
||||
String get offlineBanner => 'You\'re offline. Some features may be limited.';
|
||||
|
||||
@override
|
||||
String get featureRequiresInternet =>
|
||||
'This feature requires an internet connection';
|
||||
|
||||
@@ -33,6 +33,17 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get pleaseCheckConnection =>
|
||||
'Veuillez vérifier votre connexion et réessayer';
|
||||
|
||||
@override
|
||||
String get connectionIssueTitle => 'Impossible d\'atteindre votre serveur';
|
||||
|
||||
@override
|
||||
String get connectionIssueSubtitle =>
|
||||
'Reconnectez-vous pour continuer ou déconnectez-vous pour choisir un autre serveur.';
|
||||
|
||||
@override
|
||||
String get stillOfflineMessage =>
|
||||
'Nous ne pouvons toujours pas joindre le serveur. Vérifiez votre connexion et réessayez.';
|
||||
|
||||
@override
|
||||
String get account => 'Compte';
|
||||
|
||||
@@ -439,10 +450,6 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
@override
|
||||
String get emptyImageData => 'Données d\'image vides';
|
||||
|
||||
@override
|
||||
String get offlineBanner =>
|
||||
'Vous êtes hors ligne. Certaines fonctions peuvent être limitées.';
|
||||
|
||||
@override
|
||||
String get featureRequiresInternet =>
|
||||
'Cette fonctionnalité nécessite une connexion Internet';
|
||||
|
||||
@@ -32,6 +32,17 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get pleaseCheckConnection => 'Controlla la connessione e riprova';
|
||||
|
||||
@override
|
||||
String get connectionIssueTitle => 'Impossibile raggiungere il server';
|
||||
|
||||
@override
|
||||
String get connectionIssueSubtitle =>
|
||||
'Riconnettiti per continuare oppure esci per scegliere un server diverso.';
|
||||
|
||||
@override
|
||||
String get stillOfflineMessage =>
|
||||
'Non riusciamo ancora a raggiungere il server. Controlla la connessione e riprova.';
|
||||
|
||||
@override
|
||||
String get account => 'Account';
|
||||
|
||||
@@ -431,10 +442,6 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
@override
|
||||
String get emptyImageData => 'Dati immagine vuoti';
|
||||
|
||||
@override
|
||||
String get offlineBanner =>
|
||||
'Sei offline. Alcune funzioni potrebbero essere limitate.';
|
||||
|
||||
@override
|
||||
String get featureRequiresInternet =>
|
||||
'Questa funzione richiede una connessione Internet';
|
||||
|
||||
Reference in New Issue
Block a user