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:
+5
-2
@@ -5,7 +5,10 @@ sealed class AppScreen(val route: String) {
|
||||
data object Home : AppScreen("/home")
|
||||
data object Dashboard : AppScreen("/dashboard")
|
||||
data object CreateTournament : AppScreen("/tournament/create") // Neuer Screen
|
||||
data object Login : AppScreen(Routes.LOGIN)
|
||||
|
||||
// Login now accepts an optional returnTo screen to determine where to go after success
|
||||
data class Login(val returnTo: AppScreen? = null) : AppScreen(Routes.LOGIN)
|
||||
|
||||
data object Ping : AppScreen("/ping")
|
||||
data object Profile : AppScreen("/profile")
|
||||
data object AuthCallback : AppScreen("/auth/callback")
|
||||
@@ -17,7 +20,7 @@ sealed class AppScreen(val route: String) {
|
||||
"/home" -> Home
|
||||
"/dashboard" -> Dashboard
|
||||
"/tournament/create" -> CreateTournament
|
||||
Routes.LOGIN, Routes.Auth.LOGIN -> Login
|
||||
Routes.LOGIN, Routes.Auth.LOGIN -> Login()
|
||||
"/ping" -> Ping
|
||||
"/profile" -> Profile
|
||||
"/auth/callback" -> AuthCallback
|
||||
|
||||
Reference in New Issue
Block a user