feat(ui): add reusable components for FIGMA-based UI system
- Implemented new reusable components including Label, Input, InputOTP, HoverCard, Popover, Pagination, NavigationMenu, Menubar, ScrollArea, Resizable, RadioGroup, and Progress under `docs/06_Frontend/FIGMA/src/app/components/ui/`. - Enhanced structural organization to improve scalability and maintainability. - Updated `settings.gradle.kts` to include the new module `frontend:features:nennung-feature`. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -93,6 +93,7 @@ kotlin {
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(libs.kotlinx.coroutines.swing)
|
||||
implementation(libs.koin.core)
|
||||
implementation(project(":frontend:features:nennung-feature"))
|
||||
}
|
||||
|
||||
jsMain.dependencies {
|
||||
|
||||
@@ -74,6 +74,7 @@ fun MainApp() {
|
||||
|
||||
is AppScreen.Dashboard -> DashboardScreen(
|
||||
authTokenManager = authTokenManager,
|
||||
onNennungOeffnen = { navigationPort.navigateToScreen(AppScreen.Nennung) },
|
||||
onLogout = {
|
||||
authTokenManager.clearToken()
|
||||
if (currentPlatform() == PlatformType.DESKTOP) {
|
||||
@@ -145,6 +146,7 @@ fun MainApp() {
|
||||
}
|
||||
}
|
||||
|
||||
is AppScreen.Nennung -> NennungScreenContent()
|
||||
is AppScreen.Profile -> AuthStatusScreen(
|
||||
authTokenManager = authTokenManager,
|
||||
onNavigateToLogin = {
|
||||
@@ -412,7 +414,8 @@ private fun FeatureCard(number: String, title: String, body: String) {
|
||||
private fun DashboardScreen(
|
||||
authTokenManager: AuthTokenManager,
|
||||
onLogout: () -> Unit,
|
||||
onCreateTournament: () -> Unit
|
||||
onCreateTournament: () -> Unit,
|
||||
onNennungOeffnen: () -> Unit = {},
|
||||
) {
|
||||
val authState by authTokenManager.authState.collectAsState()
|
||||
val scrollState = rememberScrollState()
|
||||
@@ -474,6 +477,15 @@ private fun DashboardScreen(
|
||||
if (isDesktop && isAdmin) {
|
||||
// DESKTOP VIEW - STEUERUNGSZENTRALE FÜR DEN ADMIN (DICH)
|
||||
// Neues Turnier anlegen Button
|
||||
Button(
|
||||
onClick = onNennungOeffnen,
|
||||
modifier = Modifier.fillMaxWidth().height(64.dp)
|
||||
) {
|
||||
Text(
|
||||
text = "📋 Nennungs-Maske öffnen",
|
||||
style = MaterialTheme.typography.titleMedium
|
||||
)
|
||||
}
|
||||
OutlinedButton(
|
||||
onClick = onCreateTournament,
|
||||
modifier = Modifier.fillMaxWidth().height(64.dp)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
expect fun NennungScreenContent()
|
||||
@@ -0,0 +1,8 @@
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
||||
@Composable
|
||||
actual fun NennungScreenContent() {
|
||||
// Nennungs-Maske ist nur für Desktop (JVM) verfügbar
|
||||
Text("Nennungs-Maske ist nur in der Desktop-App verfügbar.")
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import androidx.compose.runtime.Composable
|
||||
import at.mocode.nennung.feature.presentation.NennungsMaske
|
||||
import at.mocode.nennung.feature.presentation.NennungViewModel
|
||||
import org.koin.compose.viewmodel.koinViewModel
|
||||
|
||||
@Composable
|
||||
actual fun NennungScreenContent() {
|
||||
val viewModel: NennungViewModel = koinViewModel()
|
||||
NennungsMaske(viewModel = viewModel)
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import at.mocode.frontend.core.localdb.localDbModule
|
||||
import at.mocode.frontend.core.network.networkModule
|
||||
import at.mocode.frontend.core.sync.di.syncModule
|
||||
import at.mocode.ping.feature.di.pingFeatureModule
|
||||
import at.mocode.nennung.feature.di.nennungFeatureModule
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import navigation.navigationModule
|
||||
import org.koin.core.context.loadKoinModules
|
||||
@@ -19,7 +20,17 @@ fun main() = application {
|
||||
// Initialize DI (Koin) with shared modules + network module
|
||||
try {
|
||||
// Updated: Only load the consolidated pingFeatureModule from at.mocode.ping.feature.di
|
||||
startKoin { modules(networkModule, syncModule, pingFeatureModule, authModule, navigationModule, localDbModule) }
|
||||
startKoin {
|
||||
modules(
|
||||
networkModule,
|
||||
syncModule,
|
||||
pingFeatureModule,
|
||||
nennungFeatureModule,
|
||||
authModule,
|
||||
navigationModule,
|
||||
localDbModule
|
||||
)
|
||||
}
|
||||
println("[DesktopApp] Koin initialized with networkModule + authModule + navigationModule + pingFeatureModule + localDbModule")
|
||||
} catch (e: Exception) {
|
||||
println("[DesktopApp] Koin initialization warning: ${e.message}")
|
||||
|
||||
Reference in New Issue
Block a user