refactor(theme): centralize colors and typography in AppColors and AppTypography
- Replaced hardcoded color values in `LightColorScheme` and `DarkColorScheme` with `AppColors`. - Updated `AppTypography` references in `AppMaterialTypography`. - Upgraded Kotlin, Compose Multiplatform, and Ktor to latest versions in `libs.versions.toml`. - Added `uiToolingPreview` dependency in `meldestelle-portal` build script. - Refactored config loading to include `RequestInit`. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -83,6 +83,7 @@ kotlin {
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.materialIconsExtended)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
|
||||
// Bundles
|
||||
implementation(libs.bundles.kmp.common) // Coroutines, Serialization, DateTime
|
||||
|
||||
@@ -2,6 +2,7 @@ import kotlinx.browser.window
|
||||
import kotlinx.coroutines.await
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.Json
|
||||
import org.w3c.fetch.RequestInit
|
||||
|
||||
private val AppJson = Json { ignoreUnknownKeys = true }
|
||||
|
||||
@@ -14,7 +15,7 @@ data class AppConfig(
|
||||
suspend fun loadAppConfig(): AppConfig {
|
||||
return try {
|
||||
// ?_nocache erzwingt einen SW-bypassing Request (SW sieht andere URL → Cache-Miss → Netzwerk)
|
||||
val response = window.fetch("/config.json?_nocache=1").await()
|
||||
val response = window.fetch("/config.json?_nocache=1", RequestInit()).await()
|
||||
if (!response.ok) {
|
||||
console.warn("[Config] Failed to load config.json, falling back to globalThis")
|
||||
return fallbackFromGlobal()
|
||||
|
||||
Reference in New Issue
Block a user