feat(umgebung): Server-Umgebung im Login-Screen waehlbar (Produktion/Test)
- Umgebungen (Name, API-URL, Keycloak-Issuer) kommen aus assets/hl_server_config.json statt hartcodiertem BackendConfig.prod; Testumgebung 192.168.1.9:3001 ist dort hinterlegt - AppBloc laedt die Config, aktiviert die gespeicherte Wahl (Fallback Default) und registriert das Networking; Wechsel persistiert per SharedPreferences und registriert neu - Bloc-Baum ist pro Umgebung gekeyt: beim Wechsel entstehen alle Blocs mit dem neuen API-Client neu - Login-Screen: Zahnrad oben rechts oeffnet Einstellungen mit Umgebungs- Cards (Name + IP:Port); Hinweis auf aktive Umgebung unter dem Button - Fahrzeugauswahl pro Umgebung getrennt (eigene DB = eigene Car-IDs) - Tests fuer Config-Parsing, Auswahl-Fallback, Card-Wechsel, Re-Registrierung Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -1,7 +1,16 @@
|
||||
abstract class AppEvents {}
|
||||
|
||||
/// Lädt die Server-Config aus den Assets und aktiviert die gespeicherte
|
||||
/// (oder die Default-)Umgebung. [path] ist relativ zu `assets/`.
|
||||
class AppLoadConfig extends AppEvents {
|
||||
String path;
|
||||
|
||||
AppLoadConfig({required this.path});
|
||||
}
|
||||
}
|
||||
|
||||
/// Wechselt auf die Umgebung mit [environmentId] und speichert die Wahl.
|
||||
class AppSwitchEnvironment extends AppEvents {
|
||||
AppSwitchEnvironment({required this.environmentId});
|
||||
|
||||
final String environmentId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user