chore(frontend): cleanup legacy code and improve localization consistency

- Removed deprecated `NotificationCard` component due to dependency on an outdated presentation layer.
- Translated comments and documentation to German for improved localization across `core.auth`, `ping-feature`, and `network`.
- Standardized comment formatting, improved doc clarity, and ensured consistent API documentation in all modules.
This commit is contained in:
2026-02-01 12:00:10 +01:00
parent 24c8a0c63d
commit af0b7c5f9b
16 changed files with 72 additions and 76 deletions
@@ -3,8 +3,8 @@ package at.mocode.frontend.core.network
import kotlin.native.concurrent.ThreadLocal
/**
* Network configuration with sensible defaults and environment overrides.
* Defaults to the local API Gateway on port 8081.
* Netzwerkkonfiguration mit sinnvollen Standardeinstellungen und Umgebungseinstellungen zum Überschreiben.
* Standardmäßig wird das lokale API-Gateway auf Port 8081 verwendet.
*/
@ThreadLocal
object NetworkConfig {
@@ -132,7 +132,7 @@ val networkModule = module {
// [baseClient] REQUEST: .../token
// Access to fetch at ... blocked by CORS policy
// This confirms it is a CORS issue on the Keycloak server side, or the browser side.
// This confirms it is a CORS issue on the Keycloak server side or the browser side.
// The JS error `TypeError` is GONE in the latest log!
// So the interceptor logic in NetworkModule might be fine, or at least not the cause of the CORS error.
@@ -140,7 +140,7 @@ val networkModule = module {
// We will use a safe lazy resolution pattern.
} catch (_: Exception) {
// ignore
// ignore
}
execute(request)
}
@@ -150,19 +150,19 @@ val networkModule = module {
client.plugin(HttpSend).intercept { request ->
try {
// Attempt to resolve TokenProvider from the capturing scope
val tokenProvider = try {
koinScope.get<TokenProvider>()
} catch (_: Exception) {
null
}
// Attempt to resolve TokenProvider from the capturing scope
val tokenProvider = try {
koinScope.get<TokenProvider>()
} catch (_: Exception) {
null
}
val token = tokenProvider?.getAccessToken()
if (token != null) {
request.header("Authorization", "Bearer $token")
}
val token = tokenProvider?.getAccessToken()
if (token != null) {
request.header("Authorization", "Bearer $token")
}
} catch (e: Exception) {
println("[apiClient] Error injecting auth header: $e")
println("[apiClient] Error injecting auth header: $e")
}
execute(request)
}
@@ -26,9 +26,9 @@ actual object PlatformConfig {
}
if (!origin.isNullOrBlank()) {
val resolvedUrl = origin.removeSuffix("/") + "/api"
console.log("[PlatformConfig] Resolved API_BASE_URL from window.location.origin: $resolvedUrl")
return resolvedUrl
val resolvedUrl = origin.removeSuffix("/") + "/api"
console.log("[PlatformConfig] Resolved API_BASE_URL from window.location.origin: $resolvedUrl")
return resolvedUrl
}
// 3) Fallback to the local gateway directly (e.g. for tests without window)