refactor(ui, navigation): implement platform-specific routing and redesign components
- Added platform detection logic `currentPlatform()` in `PlatformType.js.kt`. - Introduced platform-based behavior for LandingScreen, Dashboard, and Login flow. - Replaced Row with FlowRow in PingScreen to improve button layout. - Updated Meldestelle Dashboard with platform-specific headers and authentication checks. - Adjusted AppHeader to accept `isAuthenticated` and `username` parameters. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -28,6 +28,7 @@ kotlin {
|
||||
implementation(projects.frontend.core.designSystem)
|
||||
implementation(projects.frontend.core.sync)
|
||||
implementation(projects.frontend.core.localDb)
|
||||
implementation(projects.frontend.core.auth) // Added auth module for AuthTokenManager
|
||||
implementation(libs.sqldelight.coroutines)
|
||||
implementation(projects.frontend.core.domain)
|
||||
|
||||
@@ -43,6 +44,7 @@ kotlin {
|
||||
implementation(libs.bundles.compose.common)
|
||||
|
||||
implementation(libs.koin.core)
|
||||
implementation(libs.koin.compose) // Added koin.compose for koinInject
|
||||
}
|
||||
|
||||
commonTest.dependencies {
|
||||
|
||||
+4
-2
@@ -133,9 +133,11 @@ private fun StatusBadge(text: String, color: Color) {
|
||||
@Composable
|
||||
private fun ActionToolbar(viewModel: PingViewModel) {
|
||||
// Wrap buttons to avoid overflow on small screens
|
||||
Row(
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
FlowRow(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.spacedBy(Dimens.SpacingXS)
|
||||
horizontalArrangement = Arrangement.spacedBy(Dimens.SpacingXS),
|
||||
verticalArrangement = Arrangement.spacedBy(Dimens.SpacingXS)
|
||||
) {
|
||||
DenseButton(text = "Simple", onClick = { viewModel.performSimplePing() })
|
||||
DenseButton(text = "Enhanced", onClick = { viewModel.performEnhancedPing() })
|
||||
|
||||
Reference in New Issue
Block a user