### 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 6m0s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 4m39s

- **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 10:16:08 +02:00
parent 8730ffa7db
commit af02e14f2d
3 changed files with 10 additions and 17 deletions

View File

@ -37,3 +37,10 @@ Die "Hallo Du!" Test-UI wurde durch produktive, fachlich korrekte Formulare erse
- `dc-planb.yaml`: Statische Konfiguration der HTTPS-URLs ohne Umgebungsvariablen-Platzhalter, um Fehlkonfigurationen am Host auszuschließen. - `dc-planb.yaml`: Statische Konfiguration der HTTPS-URLs ohne Umgebungsvariablen-Platzhalter, um Fehlkonfigurationen am Host auszuschließen.
- UI-Marker auf `v2026-04-23.12 - HARD-CODED HTTPS` aktualisiert. - UI-Marker auf `v2026-04-23.12 - HARD-CODED HTTPS` aktualisiert.
- Fehlerbehandlung in `OnlineNennungFormular.kt` zeigt nun explizit Netzwerkfehler an, falls diese auftreten. - Fehlerbehandlung in `OnlineNennungFormular.kt` zeigt nun explizit Netzwerkfehler an, falls diese auftreten.
### 2026-04-23 10:15 - Version 13: Radikale HTTPS-Priorisierung
- **Problem**: Trotz harten Fallbacks im Code versuchte der Browser weiterhin `http://10.0.0.50` (Mixed Content) aufzurufen. Ursache war die Priorisierung von dynamischen Variablen und `window.location.origin` in der `PlatformConfig.wasmJs.kt`.
- **Lösung**:
- `PlatformConfig.wasmJs.kt`: Alle Logiken zur Erkennung von URLs wurden temporär deaktiviert. Die Funktionen `resolveMailServiceUrl()` und `resolveApiBaseUrl()` geben nun **zwingend** `https://api.mo-code.at` zurück.
- Dies umgeht jegliches Caching von `index.html` oder fälschlich injizierte Umgebungsvariablen.
- UI-Marker auf `v2026-04-23.13 - RADICAL HTTPS PRIORITIZATION` aktualisiert.

View File

@ -7,8 +7,7 @@ package at.mocode.frontend.core.network
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING") @Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
actual object PlatformConfig { actual object PlatformConfig {
actual fun resolveMailServiceUrl(): String { actual fun resolveMailServiceUrl(): String {
val fromGlobal = getGlobalMailServiceUrl() // FORCE HTTPS for Plan-B Weekend
if (fromGlobal.isNotEmpty() && !fromGlobal.contains('$')) return fromGlobal.removeSuffix("/")
return "https://api.mo-code.at" return "https://api.mo-code.at"
} }
@ -21,20 +20,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) // FORCE HTTPS for Plan-B Weekend
val fromGlobal = getGlobalApiBaseUrl()
if (fromGlobal.isNotEmpty() && !fromGlobal.contains('$')) return fromGlobal.removeSuffix("/")
// 2) Try window location origin (same origin gateway/proxy setup)
val origin = try {
getOrigin()
} catch (_: Throwable) {
null
}
if (!origin.isNullOrBlank()) return origin.removeSuffix("/")
// 3) Fallback to the local gateway
return "https://api.mo-code.at" 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.12 - HARD-CODED HTTPS", text = "v2026-04-23.13 - RADICAL HTTPS PRIORITIZATION",
style = MaterialTheme.typography.labelSmall, style = MaterialTheme.typography.labelSmall,
color = Color.LightGray.copy(alpha = 0.5f) color = Color.LightGray.copy(alpha = 0.5f)
) )