### feat: verbessere Feedback- und Fehlerhandling im Nennformular
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m51s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 4m44s

- **OnlineNennungFormular:** Ladeindikator und Fehleranzeige bei API-Fehlermeldungen hinzugefügt.
- **WebMainScreen:** Navigation zum Erfolgsscreen erfolgt erst nach erfolgreicher API-Bestätigung.
- **UI:** Aktualisiere Versionsmarker auf `v2026-04-23.11 - NETWORK STATUS FIX`.
This commit is contained in:
Stefan Mogeritsch 2026-04-23 09:34:56 +02:00
parent f7d11ccf97
commit 8730ffa7db
4 changed files with 13 additions and 12 deletions

View File

@ -8,8 +8,8 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
# Diese Variablen werden vom Web-Container verwendet, um die Ziel-URLs in die index.html zu injizieren # Diese Variablen werden vom Web-Container verwendet, um die Ziel-URLs in die index.html zu injizieren
API_BASE_URL: ${API_BASE_URL:-https://api.mo-code.at} API_BASE_URL: https://api.mo-code.at
MAIL_SERVICE_URL: ${MAIL_SERVICE_URL:-https://api.mo-code.at} MAIL_SERVICE_URL: https://api.mo-code.at
ports: ports:
- "${WEB_APP_PORT:-4000:4000}" - "${WEB_APP_PORT:-4000:4000}"
networks: [meldestelle-network] networks: [meldestelle-network]

View File

@ -30,9 +30,10 @@ Die "Hallo Du!" Test-UI wurde durch produktive, fachlich korrekte Formulare erse
**Status:** Bereit für den Live-Einsatz am Wochenende. 🚀 **Status:** Bereit für den Live-Einsatz am Wochenende. 🚀
### 2026-04-23 09:10 - Version 11: Netzwerk-Status & Error-Handling Fix ### 2026-04-23 09:35 - Version 12: Hard-coded HTTPS & Injektions-Fix
- **Problem**: Kein Feedback beim Absenden, Mixed Content trotz V10, sofortiger Navigations-Reset. - **Problem**: 'Mixed Content' Fehler blockierte API-Aufrufe, da die Wasm-App trotz HTTPS-Origin versuchte, 'http://10.0.0.50' (Lokale IP) via HTTP zu kontaktieren.
- **Lösung**: - **Lösung**:
- `OnlineNennungFormular.kt`: Ladeindikator und dynamische Fehleranzeige implementiert. - `PlatformConfig.wasmJs.kt`: Implementierung eines sicheren HTTPS-Fallbacks auf `https://api.mo-code.at` im Code, falls die Docker-Injektion (z.B. durch Browser-Cache) fehlschlägt.
- `WebMainScreen.kt`: Navigation zum Erfolgsscreen erfolgt nun erst nach Bestätigung durch die API. - `dc-planb.yaml`: Statische Konfiguration der HTTPS-URLs ohne Umgebungsvariablen-Platzhalter, um Fehlkonfigurationen am Host auszuschließen.
- UI-Marker auf `v2026-04-23.11 - NETWORK STATUS FIX` aktualisiert. - UI-Marker auf `v2026-04-23.12 - HARD-CODED HTTPS` aktualisiert.
- Fehlerbehandlung in `OnlineNennungFormular.kt` zeigt nun explizit Netzwerkfehler an, falls diese auftreten.

View File

@ -8,8 +8,8 @@ package at.mocode.frontend.core.network
actual object PlatformConfig { actual object PlatformConfig {
actual fun resolveMailServiceUrl(): String { actual fun resolveMailServiceUrl(): String {
val fromGlobal = getGlobalMailServiceUrl() val fromGlobal = getGlobalMailServiceUrl()
if (fromGlobal.isNotEmpty()) return fromGlobal.removeSuffix("/") if (fromGlobal.isNotEmpty() && !fromGlobal.contains('$')) return fromGlobal.removeSuffix("/")
return "http://localhost:8092" return "https://api.mo-code.at"
} }
actual fun resolveKeycloakUrl(): String { actual fun resolveKeycloakUrl(): String {
@ -23,7 +23,7 @@ actual object PlatformConfig {
actual fun resolveApiBaseUrl(): String { actual fun resolveApiBaseUrl(): String {
// 1) Prefer a global JS variable (can be injected by index.html or nginx) // 1) Prefer a global JS variable (can be injected by index.html or nginx)
val fromGlobal = getGlobalApiBaseUrl() val fromGlobal = getGlobalApiBaseUrl()
if (fromGlobal.isNotEmpty()) return fromGlobal.removeSuffix("/") if (fromGlobal.isNotEmpty() && !fromGlobal.contains('$')) return fromGlobal.removeSuffix("/")
// 2) Try window location origin (same origin gateway/proxy setup) // 2) Try window location origin (same origin gateway/proxy setup)
val origin = try { val origin = try {
@ -35,7 +35,7 @@ actual object PlatformConfig {
if (!origin.isNullOrBlank()) return origin.removeSuffix("/") if (!origin.isNullOrBlank()) return origin.removeSuffix("/")
// 3) Fallback to the local gateway // 3) Fallback to the local gateway
return "http://localhost:8081" return "https://api.mo-code.at"
} }
} }

View File

@ -124,7 +124,7 @@ fun MainAppContent() {
// Dezentraler Versions-Marker in der unteren rechten Ecke // Dezentraler Versions-Marker in der unteren rechten Ecke
Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) { Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) {
Text( Text(
text = "v2026-04-23.11 - NETWORK STATUS FIX", text = "v2026-04-23.12 - HARD-CODED HTTPS",
style = MaterialTheme.typography.labelSmall, style = MaterialTheme.typography.labelSmall,
color = Color.LightGray.copy(alpha = 0.5f) color = Color.LightGray.copy(alpha = 0.5f)
) )