From 6b3501911e3e78a8ad87fac9b2abd7a86ac2c17a Mon Sep 17 00:00:00 2001 From: Kiryanick Date: Thu, 12 Dec 2024 11:45:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D1=8D?= =?UTF-8?q?=D0=BA=D1=80=D0=B0=D0=BD=D1=8B=20GUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commonMain/kotlin/ru/csasq/beeapp/App.kt | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/App.kt b/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/App.kt index 5b1862c..ba2f27f 100644 --- a/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/App.kt +++ b/composeApp/src/commonMain/kotlin/ru/csasq/beeapp/App.kt @@ -28,8 +28,13 @@ import org.jetbrains.compose.resources.painterResource import bee_app_frontend.composeapp.generated.resources.Res import bee_app_frontend.composeapp.generated.resources.round_accessible_forward_24 import bee_app_frontend.composeapp.generated.resources.round_elderly_24 +import bee_app_frontend.composeapp.generated.resources.round_group_24 import bee_app_frontend.composeapp.generated.resources.round_sports_kabaddi_24 import org.jetbrains.compose.resources.DrawableResource +import ru.csasq.beeapp.ui.screens.AuthorRequestsScreen +import ru.csasq.beeapp.ui.screens.CustomerRequestsScreen +import ru.csasq.beeapp.ui.screens.SignaturesScreen +import ru.csasq.beeapp.ui.screens.UsersScreen import ru.csasq.beeapp.ui.theme.darkScheme sealed class Screen( @@ -37,17 +42,22 @@ sealed class Screen( val title: String, val icon: DrawableResource, ) { - data object Dashboard : Screen( + data object Users : Screen( + route = "users", + title = "Пользователи", + icon = Res.drawable.round_group_24, + ) + data object AuthorRequests : Screen( route = "author-requests", title = "Запросы авторов", icon = Res.drawable.round_elderly_24, ) - data object Scenarios : Screen( + data object CustomerRequests : Screen( route = "customer-requests", title = "Запросы пользователей", icon = Res.drawable.round_sports_kabaddi_24, ) - data object Chats : Screen( + data object Signatures : Screen( route = "signatures", title = "Подписи", icon = Res.drawable.round_accessible_forward_24, @@ -93,9 +103,10 @@ fun App() { NavigationBar { val navBackStackEntry = navController.currentBackStackEntryAsState() val items = listOf( - Screen.Dashboard, - Screen.Scenarios, - Screen.Chats, + Screen.Users, + Screen.AuthorRequests, + Screen.CustomerRequests, + Screen.Signatures, ) items.forEach { screen -> NavigationBarItem( @@ -142,16 +153,31 @@ fun App() { ) { paddingValues -> NavHost( navController = navController, - startDestination = Screen.Dashboard.route, + startDestination = Screen.Users.route, ) { - composable(Screen.Dashboard.route) { - + composable(Screen.Users.route) { + UsersScreen( + navController = navController, + paddingValues = paddingValues, + ) } - composable(Screen.Scenarios.route) { - + composable(Screen.AuthorRequests.route) { + AuthorRequestsScreen( + navController = navController, + paddingValues = paddingValues, + ) } - composable(Screen.Chats.route) { - + composable(Screen.CustomerRequests.route) { + CustomerRequestsScreen( + navController = navController, + paddingValues = paddingValues, + ) + } + composable(Screen.Signatures.route) { + SignaturesScreen( + navController = navController, + paddingValues = paddingValues, + ) } } }