Procházet zdrojové kódy

add: new restdesc screen, all done. all done screens - tourse; update splashscreen, new animation, update style and hotel-attractionsdesc

Maksutka před 1 týdnem
rodič
revize
f8c740229d

+ 2 - 0
TripHelper/app/build.gradle.kts

@@ -90,4 +90,6 @@ dependencies {
     implementation(libs.androidx.navigation.compose)
 
     implementation (libs.ui)
+
+    implementation("androidx.compose.animation:animation:1.7.5")
 }

+ 92 - 42
TripHelper/app/src/main/java/com/example/triphelper/view/AppBar/bottombar/BottomBar.kt

@@ -3,6 +3,7 @@ package com.example.studybuddy.view.panels.bottombar
 import androidx.compose.foundation.background
 import androidx.compose.foundation.border
 import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
 import androidx.compose.foundation.layout.Row
 import androidx.compose.foundation.layout.fillMaxHeight
 import androidx.compose.foundation.layout.fillMaxWidth
@@ -12,6 +13,8 @@ import androidx.compose.foundation.shape.RoundedCornerShape
 import androidx.compose.material3.BottomAppBar
 import androidx.compose.material3.Icon
 import androidx.compose.material3.IconButton
+import androidx.compose.material3.ModalBottomSheet
+import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
 import androidx.compose.runtime.MutableState
 import androidx.compose.ui.Alignment
@@ -19,10 +22,12 @@ import androidx.compose.ui.Modifier
 import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
 import androidx.navigation.NavController
 import androidx.navigation.NavHostController
 import com.example.testirovanye_supabase.R
 import com.example.triphelper.view.navigation.NavigationRoutes
+import com.example.triphelper.view.theme.SeoulBold
 
 //Данная функция отвечает за отрисовку нижней части экрана - BottomAppBar
 @Composable
@@ -57,64 +62,109 @@ fun BottomBar(controller: NavController,
                     verticalAlignment = Alignment.CenterVertically,
                     modifier = Modifier.fillMaxWidth()
                 ) {
-                    IconButton(
-                        onClick = {
-                            controller.navigate(NavigationRoutes.MAIN)
-                        },
+                    Column(
                         modifier = Modifier
-                            .size(55.dp)
-                            .weight(1.6f, true)
+                            .weight(1.2f, true)
+                            .padding(start = 10.dp)
                     ) {
-                        Icon(
-                            painter = painterResource(id = if(iconsMainIsActivity.value) R.drawable.mainscreen_active else R.drawable.mainscreen_not_active),
-                            contentDescription = "Главный экран",
-                            tint = Color.Unspecified,
-                            modifier = Modifier.size(40.dp)
+                        IconButton(
+                            onClick = {
+                                controller.navigate(NavigationRoutes.MAIN)
+                            },
+                            modifier = Modifier
+                                .size(55.dp)
+                        ) {
+                            Icon(
+                                painter = painterResource(id = if(iconsMainIsActivity.value) R.drawable.mainscreen_active else R.drawable.mainscreen_not_active),
+                                contentDescription = "Главный экран",
+                                tint = Color.Unspecified,
+                                modifier = Modifier.size(40.dp)
+                            )
+                        }
+                        Text(
+                            text = "Главная",
+                            fontFamily = SeoulBold,
+                            fontSize = 14.sp,
+                            color = Color(0xFFDC5B6E),
+                            modifier = Modifier.padding(start = 5.dp)
                         )
                     }
-                    IconButton(
-                        onClick = {
-                            controller.navigate(NavigationRoutes.LAW)
-                        },
+                    Column(
                         modifier = Modifier
-                            .size(50.dp)
-                            .weight(3f, true)
+                            .weight(1.9f, true)
                             .padding(end = 30.dp)
                     ) {
-                        Icon(
-                            painter = painterResource(id = if(iconsLawIsActivity.value) R.drawable.lawscreen_active else R.drawable.lawscreen_not_active),
-                            contentDescription = "Законы и правила",
-                            tint = Color(0xFFDC5B6E),
-                            modifier = Modifier.size(40.dp)
+                        IconButton(
+                            onClick = {
+                                controller.navigate(NavigationRoutes.LAW)
+                            },
+                            modifier = Modifier
+                                .size(50.dp)
+
+                        ) {
+                            Icon(
+                                painter = painterResource(id = if(iconsLawIsActivity.value) R.drawable.lawscreen_active else R.drawable.lawscreen_not_active),
+                                contentDescription = "Законы и правила",
+                                tint = Color(0xFFDC5B6E),
+                                modifier = Modifier.size(40.dp)
+                            )
+                        }
+                        Text(
+                            text = "Законы",
+                            fontFamily = SeoulBold,
+                            fontSize = 14.sp,
+                            color = Color(0xFFDC5B6E),
+                            modifier = Modifier.padding(start = 5.dp)
                         )
                     }
-
-                    IconButton(
-                        onClick = {
-                        },
+                    Column(
                         modifier = Modifier
-                            .size(50.dp)
-                            .weight(3f, true)
+                            .weight(1.4f, true)
                             .padding(start = 30.dp)
                     ) {
-                        Icon(
-                            painter = painterResource(id = if(iconsAdviceIsActivity.value) R.drawable.advicescreen_active else R.drawable.advicescreen_not_active),
-                            contentDescription = "Советы и помощь",
-                            tint = Color(0xFFDC5B6E),
-                            modifier = Modifier.size(40.dp)
+                        IconButton(
+                            onClick = {
+                            },
+                            modifier = Modifier
+                                .size(50.dp)
+
+                        ) {
+                            Icon(
+                                painter = painterResource(id = if(iconsAdviceIsActivity.value) R.drawable.advicescreen_active else R.drawable.advicescreen_not_active),
+                                contentDescription = "Советы и помощь",
+                                tint = Color(0xFFDC5B6E),
+                                modifier = Modifier.size(40.dp)
+                            )
+                        }
+                        Text(
+                            text = "Советы",
+                            fontFamily = SeoulBold,
+                            fontSize = 14.sp,
+                            color = Color(0xFFDC5B6E),
+                            modifier = Modifier.padding(start = 5.dp)
                         )
                     }
-                    IconButton(
-                        onClick = {},
+                    Column(
                         modifier = Modifier
-                            .size(50.dp)
-                            .weight(1.6f, true)
+                            .weight(0.9f, true)
                     ) {
-                        Icon(
-                            painter = painterResource(id = if(iconsProfileIsActivity.value) R.drawable.profilescreen_active else R.drawable.profilescreen_not_active),
-                            contentDescription = "Профиль",
-                            tint = Color.Unspecified,
-                            modifier = Modifier.size(40.dp),
+                        IconButton(
+                            onClick = {},
+                            modifier = Modifier
+                                .size(50.dp)
+                        ) {
+                            Icon(
+                                painter = painterResource(id = if(iconsProfileIsActivity.value) R.drawable.profilescreen_active else R.drawable.profilescreen_not_active),
+                                contentDescription = "Профиль",
+                                tint = Color.Unspecified,
+                                modifier = Modifier.size(40.dp),
+                            )
+                        }
+                        Text(
+                            text = "Профиль",
+                            fontFamily = SeoulBold,
+                            fontSize = 14.sp,
+                            color = Color(0xFFDC5B6E)
                         )
                     }
                 }

+ 6 - 1
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/AttractionsDesc.kt

@@ -45,7 +45,7 @@ import com.example.triphelper.model.Attractions
 import com.example.triphelper.view.MainScreen.LawScreenViewModel
 import com.example.triphelper.view.style.StyleMainFone
 import com.example.triphelper.view.theme.Roboto
-import com.example.triphelper.view.theme.RobotoB
+import com.example.triphelper.view.theme.Roboto
 import com.example.triphelper.view.theme.SeoulBold
 
 @Composable
@@ -141,6 +141,7 @@ fun AttractionsDesc(navController: NavController, iconsRouteIsActivity: MutableS
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -156,6 +157,7 @@ fun AttractionsDesc(navController: NavController, iconsRouteIsActivity: MutableS
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -171,6 +173,7 @@ fun AttractionsDesc(navController: NavController, iconsRouteIsActivity: MutableS
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -186,6 +189,7 @@ fun AttractionsDesc(navController: NavController, iconsRouteIsActivity: MutableS
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -201,6 +205,7 @@ fun AttractionsDesc(navController: NavController, iconsRouteIsActivity: MutableS
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                                 modifier = Modifier
                                     .padding(bottom = 40.dp)

+ 7 - 0
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/HotelsDesc.kt

@@ -150,6 +150,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -165,6 +166,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -195,6 +197,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -225,6 +228,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start,
                             )
                             Text(
@@ -240,6 +244,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start
                             )
                             Text(
@@ -255,6 +260,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
                                 color = Color(0xFF000000),
                                 fontSize = 20.sp,
                                 fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
                                 textAlign = TextAlign.Start
                             )
                             Text(
@@ -270,6 +276,7 @@ fun HotelsDesc(navController: NavController, iconsRouteIsActivity: MutableState<
 //                                color = Color(0xFF000000),
 //                                fontSize = 20.sp,
 //                                fontFamily = Roboto,
+//                                fontWeight = FontWeight.Bold,
 //                                textAlign = TextAlign.Start,
 //                                modifier = Modifier
 //                                    .padding(bottom = 40.dp)

+ 222 - 0
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/RestaurantsDesc.kt

@@ -0,0 +1,222 @@
+package com.example.triphelper.view.RouteScreens
+
+import android.media.audiofx.AudioEffect.Descriptor
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.layout.wrapContentSize
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.MutableState
+import androidx.compose.runtime.collectAsState
+import androidx.compose.runtime.getValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import androidx.hilt.navigation.compose.hiltViewModel
+import androidx.navigation.NavController
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import com.example.triphelper.model.Attractions
+import com.example.triphelper.model.Restaurants
+import com.example.triphelper.view.MainScreen.LawScreenViewModel
+import com.example.triphelper.view.style.StyleMainFone
+import com.example.triphelper.view.theme.Roboto
+import com.example.triphelper.view.theme.RobotoB
+import com.example.triphelper.view.theme.SeoulBold
+
+@Composable
+fun RestaurantsDesc(navController: NavController, iconsRouteIsActivity: MutableState<Boolean>,idRestaurants: Int, titleRestaurants:String, viewModel: RouteViewModel = hiltViewModel()) {
+    iconsRouteIsActivity.value = true
+    val restaurants by viewModel.restaurants.collectAsState(initial = emptyList())
+
+    LaunchedEffect(key1 = viewModel.navigationTo) {
+        viewModel.navigationTo.collect { destination ->
+            destination?.let {
+                navController.navigate(destination)
+            }
+        }
+    }
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .background(Color.White),
+        verticalArrangement = Arrangement.Top,
+        horizontalAlignment = Alignment.CenterHorizontally
+    ) {
+        Column {
+            Text(
+                text = titleRestaurants,
+                color = Color(0xFF510B3C),
+                fontSize = 28.sp,
+                fontFamily = SeoulBold,
+                fontWeight = FontWeight.Bold,
+                textAlign = TextAlign.Center,
+                modifier = Modifier.padding(top = 60.dp)
+            )
+        }
+        LaunchedEffect(Unit) {
+            viewModel.GetRestaurants(idRestaurants)
+        }
+        LazyColumn(
+            modifier = Modifier
+                .padding(top = 20.dp, bottom = 60.dp)
+                .fillMaxHeight(0.94f)
+        ) {
+            items(
+                restaurants,
+                key = { restaurants -> restaurants.id },
+            ) { restaurants ->
+                val imageState = rememberAsyncImagePainter(
+                    model = ImageRequest.Builder(LocalContext.current).data(restaurants.photo)
+                        .size(coil.size.Size.ORIGINAL).build()
+                ).state
+                if (imageState is AsyncImagePainter.State.Error) {
+                    Box(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .height(200.dp),
+                        contentAlignment = Alignment.Center
+                    ) {
+                        CircularProgressIndicator()
+                    }
+                }
+                if (imageState is AsyncImagePainter.State.Success) {
+                    Column(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                    ) {
+                        Box(
+                            contentAlignment = Alignment.Center,
+                            modifier = Modifier.padding(bottom = 20.dp).fillMaxWidth()
+                        ) {
+                            Image(
+                                modifier = Modifier
+                                    .fillMaxWidth(0.9f)
+                                    .height(190.dp)
+                                    .clip(RoundedCornerShape(10.dp)),
+                                painter = imageState.painter,
+                                contentDescription = "",
+                                contentScale = ContentScale.Crop,
+                                alignment = Alignment.Center
+                            )
+                        }
+                        Column(
+                            horizontalAlignment = Alignment.Start,
+                            verticalArrangement = Arrangement.spacedBy(20.dp),
+                            modifier = Modifier.padding(start = 20.dp).fillMaxWidth(0.9f)
+                        ) {
+                            Text(
+                                text = "Адрес",
+                                color = Color(0xFF510B3C),
+                                fontSize = 26.sp,
+                                fontFamily = SeoulBold,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = restaurants.address,
+                                color = Color(0xFF000000),
+                                fontSize = 20.sp,
+                                fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start,
+                            )
+                            Text(
+                                text = "Основная информация",
+                                color = Color(0xFF510B3C),
+                                fontSize = 26.sp,
+                                fontFamily = SeoulBold,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = restaurants.basic_info,
+                                color = Color(0xFF000000),
+                                fontSize = 20.sp,
+                                fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = "Интерьер",
+                                color = Color(0xFF510B3C),
+                                fontSize = 26.sp,
+                                fontFamily = SeoulBold,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = restaurants.interior,
+                                color = Color(0xFF000000),
+                                fontSize = 20.sp,
+                                fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start,
+                            )
+                            Text(
+                                text = "Цены",
+                                color = Color(0xFF510B3C),
+                                fontSize = 26.sp,
+                                fontFamily = SeoulBold,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = restaurants.price,
+                                color = Color(0xFF000000),
+                                fontSize = 20.sp,
+                                fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start,
+                            )
+                            Text(
+                                text = "Рекомендации",
+                                color = Color(0xFF510B3C),
+                                fontSize = 26.sp,
+                                fontFamily = SeoulBold,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start
+                            )
+                            Text(
+                                text = restaurants.recommendations,
+                                color = Color(0xFF000000),
+                                fontSize = 20.sp,
+                                fontFamily = Roboto,
+                                fontWeight = FontWeight.Bold,
+                                textAlign = TextAlign.Start,
+                                modifier = Modifier
+                                    .padding(bottom = 40.dp)
+                            )
+                        }
+                    }
+                }
+            }
+
+        }
+    }
+}

+ 42 - 0
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/RouteViewModel.kt

@@ -11,6 +11,7 @@ import com.example.triphelper.model.Country
 import com.example.triphelper.model.Hotels
 import com.example.triphelper.model.Metro
 import com.example.triphelper.model.Organization_of_tours
+import com.example.triphelper.model.Restaurants
 import com.example.triphelper.model.Rules
 import com.example.triphelper.model.Tours
 import dagger.hilt.android.lifecycle.HiltViewModel
@@ -63,6 +64,9 @@ class RouteViewModel @Inject constructor() : ViewModel() {
     private var _hotels: MutableStateFlow<List<Hotels>> = MutableStateFlow(listOf())
     val hotels: StateFlow<List<Hotels>> = _hotels.asStateFlow()
 
+    private var _restaurants: MutableStateFlow<List<Restaurants>> = MutableStateFlow(listOf())
+    val restaurants: StateFlow<List<Restaurants>> = _restaurants.asStateFlow()
+
     private var _metro: MutableStateFlow<List<Metro>> = MutableStateFlow(listOf())
     val metro: StateFlow<List<Metro>> = _metro.asStateFlow()
 
@@ -174,6 +178,7 @@ class RouteViewModel @Inject constructor() : ViewModel() {
     fun GetOrgTour(numberTour: Int, titleCity:String) {
         viewModelScope.launch {
             try {
+                GetMetro(titleCity)
                 withContext(Dispatchers.IO) {
                     val columns = Columns.raw(
                         """
@@ -274,6 +279,42 @@ class RouteViewModel @Inject constructor() : ViewModel() {
             }
         }
     }
+    fun GetRestaurants(idRestaurants: Int){
+        viewModelScope.launch {
+            try {
+                withContext(Dispatchers.IO) {
+                    val columns = Columns.raw("""
+                    id,
+                    city!inner(id,country!inner(id,title,flag),title),
+                    currency!inner(id,country!inner(id,title,flag),title),
+                    name,
+                    work_schedule,
+                    phone,
+                    photo,
+                    address,
+                    basic_info,
+                    interior,
+                    recommendations,
+                    price,
+                    average_check,
+                    coordinates
+                """.trimIndent()
+                    )
+                    val responce = Constants.supabase.from("restaurants").select(
+                        columns = columns
+                    ) {
+                        filter {
+                            eq("id", idRestaurants)
+                        }
+                    }.decodeList<Restaurants>()
+                    _restaurants.value = responce
+                    Log.i("RestDesc", "Success")
+                }
+            }catch (e:Exception){
+                Log.e("RestDesc", "Error")
+            }
+        }
+    }
     fun GetMetro(titleCity: String){
         viewModelScope.launch {
             withContext(Dispatchers.IO){
@@ -296,6 +337,7 @@ class RouteViewModel @Inject constructor() : ViewModel() {
                     _metro.value = responce
                     Log.i("metro", "Success")
                 }
+                Log.i("metro", "${_metro.value}")
             }
         }
     }

+ 0 - 1
TripHelper/app/src/main/java/com/example/triphelper/view/RouteScreens/Tours.kt

@@ -224,7 +224,6 @@ fun Tours(navController: NavController, iconsRouteIsActivity: MutableState<Boole
         }
         LaunchedEffect(Unit) {
             viewModel.GetOrgTour(numberTour.toInt(), titleCity)
-            viewModel.GetMetro(titleCity)
         }
         if (attarctionsColumn) {
             AttractionsLazy(navController,orgTour)

+ 18 - 16
TripHelper/app/src/main/java/com/example/triphelper/view/SplashScreen/SplashScreen.kt

@@ -7,12 +7,9 @@ import androidx.compose.animation.core.FastOutSlowInEasing
 import androidx.compose.animation.core.LinearEasing
 import androidx.compose.animation.core.animateDpAsState
 import androidx.compose.animation.core.tween
-import androidx.compose.animation.expandHorizontally
-import androidx.compose.animation.fadeIn
-import androidx.compose.animation.fadeOut
-import androidx.compose.animation.shrinkHorizontally
-import androidx.compose.animation.slideInHorizontally
-import androidx.compose.animation.slideOutHorizontally
+import androidx.compose.animation.core.tween
+import androidx.compose.animation.core.animateFloat
+import androidx.compose.animation.core.updateTransition
 import androidx.compose.foundation.Image
 import androidx.compose.foundation.background
 import androidx.compose.foundation.layout.Arrangement
@@ -43,8 +40,11 @@ import androidx.compose.animation.core.infiniteRepeatable
 import androidx.compose.animation.core.tween
 import androidx.compose.animation.core.RepeatMode
 import androidx.compose.animation.core.FastOutSlowInEasing
+import androidx.compose.animation.core.LinearOutSlowInEasing
 import androidx.compose.animation.core.animateFloat
+import androidx.compose.animation.core.animateFloatAsState
 import androidx.compose.runtime.getValue
+import androidx.compose.runtime.setValue
 
 @SuppressLint("RememberReturnType")
 @Composable
@@ -52,18 +52,20 @@ fun SplashScreen(navController: NavHostController) {
     val configuration = LocalConfiguration.current
     if (configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
         val infiniteTransition = rememberInfiniteTransition()
-        val offsetY by infiniteTransition.animateFloat(
-            initialValue = 0f,
-            targetValue = 1000f, // Значение смещения вниз
+
+        // Анимация движения логотипа
+        val animateX by infiniteTransition.animateFloat(
+            initialValue = -900f,
+            targetValue = 1000f,
             animationSpec = infiniteRepeatable(
-                animation = tween(durationMillis = 1000, easing = FastOutSlowInEasing),
-                repeatMode = RepeatMode.Restart // Анимация будет перезапускаться
-            ), label = ""
+                animation = tween(durationMillis = 6000, easing = LinearOutSlowInEasing),
+                repeatMode = RepeatMode.Restart
+            ),
+            label = ""
         )
-
         LaunchedEffect(key1 = true) {
-            delay(1000L) // Задержка перед переходом на другой экран (на всякий случай)
-            navController.navigate(NavigationRoutes.CH_LOC) {
+            delay(2000L)
+            navController.navigate(NavigationRoutes.AUTH) {
                 popUpTo(NavigationRoutes.SPLASH) { inclusive = true }
             }
         }
@@ -79,7 +81,7 @@ fun SplashScreen(navController: NavHostController) {
                 contentDescription = "",
                 modifier = Modifier
                     .size(200.dp)
-                    .offset(y = offsetY.dp) //  Анимация смещения по Y
+                    .offset(x = animateX.dp)
             )
         }
     }

+ 16 - 1
TripHelper/app/src/main/java/com/example/triphelper/view/navigation/Navigation.kt

@@ -17,6 +17,7 @@ import com.example.triphelper.view.RouteScreens.AttractionsDesc
 import com.example.triphelper.view.RouteScreens.ChoiceLocation
 import com.example.triphelper.view.RouteScreens.ChoiceTour
 import com.example.triphelper.view.RouteScreens.HotelsDesc
+import com.example.triphelper.view.RouteScreens.RestaurantsDesc
 import com.example.triphelper.view.RouteScreens.Tours
 import com.example.triphelper.view.SplashScreen.SplashScreen
 
@@ -26,7 +27,7 @@ fun Navigation(controller: NavHostController, barsIsVisible: MutableState<Boolea
                iconsLawIsActivity: MutableState<Boolean>, iconsProfileIsActivity: MutableState<Boolean>,
                iconsAdviceIsActivity: MutableState<Boolean>,iconsMainIsActivity: MutableState<Boolean>, iconsRoutsIsActivity: MutableState<Boolean>) {
     NavHost(navController = controller,
-        startDestination = NavigationRoutes.SPLASH)
+        startDestination = NavigationRoutes.MAIN)
     {
         composable( NavigationRoutes.SPLASH){
             barsIsVisible.value = false
@@ -135,5 +136,19 @@ fun Navigation(controller: NavHostController, barsIsVisible: MutableState<Boolea
                 HotelsDesc(controller, iconsRoutsIsActivity, idHotels.toInt(), titleHotels)
             }
         }
+        composable(route =  "${NavigationRoutes.REST_DESC}/{idRest}/{titleRest}"){
+                backStackEntry ->
+            val idRest = backStackEntry.arguments?.getString("idRest")
+            val titleRest = backStackEntry.arguments?.getString("titleRest")
+            barsIsVisible.value = true
+            iconsLawIsActivity.value = false
+            iconsAdviceIsActivity.value = false
+            iconsProfileIsActivity.value = false
+            iconsMainIsActivity.value = false
+            iconsRoutsIsActivity.value = false
+            if (idRest != null && titleRest != null) {
+                RestaurantsDesc(controller, iconsRoutsIsActivity, idRest.toInt(), titleRest)
+            }
+        }
     }
 }

+ 1 - 0
TripHelper/app/src/main/java/com/example/triphelper/view/navigation/NavigationRoutes.kt

@@ -12,4 +12,5 @@ object NavigationRoutes {
     const val TOURS = "tours"
     const val ATT_DESC = "attractionsdesc"
     const val HOTEL_DESC = "hotelsdesc"
+    const val REST_DESC = "restauransdesc"
 }

+ 40 - 18
TripHelper/app/src/main/java/com/example/triphelper/view/style/LazyColumnStyle.kt

@@ -395,6 +395,9 @@ fun RestaurantsLazy(navController: NavController,orgTour:List<Organization_of_to
                         Modifier
                             .fillMaxWidth()
                             .fillMaxHeight()
+                            .clickable {
+                                navController.navigate("${NavigationRoutes.REST_DESC}/${orgTour.restaurants.id}/${orgTour.restaurants.name}")
+                            }
                             .clip(RoundedCornerShape(15.dp))
                             .background(Color.White)
                     ) {
@@ -404,7 +407,9 @@ fun RestaurantsLazy(navController: NavController,orgTour:List<Organization_of_to
                                     .width(140.dp)
                                     .fillMaxHeight()
                                     .clip(RoundedCornerShape(15.dp))
-                                    .clickable {},
+                                    .clickable {
+                                        navController.navigate("${NavigationRoutes.REST_DESC}/${orgTour.restaurants.id}/${orgTour.restaurants.name}")
+                                    },
                                 painter = imageState.painter,
                                 contentDescription = "",
                                 contentScale = ContentScale.Crop
@@ -497,35 +502,52 @@ fun RestaurantsLazy(navController: NavController,orgTour:List<Organization_of_to
 @Composable
 fun MetroLazy(metro:List<Metro>, viewModel: RouteViewModel = hiltViewModel()){
     LazyColumn(
-        modifier = Modifier.fillMaxHeight(0.84f)
+        modifier = Modifier.fillMaxHeight(0.7f),
+        verticalArrangement = Arrangement.Center
     ) {
         items(
             metro,
             key = { metro -> metro.id },
-        ) { metro ->
-            val imageState = rememberAsyncImagePainter(
-                model = ImageRequest.Builder(LocalContext.current).data(metro.photo)
-                    .size(coil.size.Size.ORIGINAL).build()
-            ).state
-            if (imageState is AsyncImagePainter.State.Error) {
+        ) { metroItem ->
+            //Не работает условие
+            if(metroItem.photo == ""){
                 Box(
                     modifier = Modifier
                         .fillMaxWidth()
+                        .fillMaxHeight()
+                        .background(Color.Red)
                         .height(200.dp),
                     contentAlignment = Alignment.Center
                 ) {
-                    CircularProgressIndicator()
+                    Text(text = "kjhdwhjdwjjdw", fontSize = 50.sp)
                 }
             }
-            if (imageState is AsyncImagePainter.State.Success) {
-                Image(
-                    modifier = Modifier
-                        .fillMaxSize()
-                        .clip(RoundedCornerShape(5.dp)),
-                    painter = imageState.painter,
-                    contentDescription = "",
-                    contentScale = ContentScale.Crop
-                )
+            else{
+                val imageState = rememberAsyncImagePainter(
+                    model = ImageRequest.Builder(LocalContext.current).data(metroItem.photo)
+                        .size(coil.size.Size.ORIGINAL).build()
+                ).state
+                if (imageState is AsyncImagePainter.State.Error) {
+                    Box(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .height(200.dp),
+                        contentAlignment = Alignment.Center
+                    ) {
+                        CircularProgressIndicator()
+                    }
+                }
+                if (imageState is AsyncImagePainter.State.Success) {
+                    Image(
+                        modifier = Modifier
+                            .fillMaxHeight()
+                            .fillMaxWidth(0.9f)
+                            .clip(RoundedCornerShape(5.dp)),
+                        painter = imageState.painter,
+                        contentDescription = "",
+                        contentScale = ContentScale.Crop
+                    )
+                }
             }
         }
     }

+ 1 - 2
TripHelper/app/src/main/java/com/example/triphelper/view/style/StyleTextField.kt

@@ -70,7 +70,7 @@ fun TextFieldStyleAuth(text: String, mutableState: MutableState<String>, check:
             unfocusedContainerColor = Color.White,
             unfocusedPlaceholderColor = Color(0xFF939396)
         ),
-        keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Text,
+        keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email,
             imeAction = if (check) ImeAction.Next else ImeAction.Done),
         textStyle = TextStyle(
             color = Color(0xFFDC5B6E),
@@ -86,7 +86,6 @@ fun TextFieldStyleAuth(text: String, mutableState: MutableState<String>, check:
 @Composable
 fun TextFieldStylePasswordAuth(text: String, mutableState: MutableState<String>, check:Boolean) {
     var passwordVisibility by remember { mutableStateOf(false) }
-    val focusManager = LocalFocusManager.current // Получаем менеджер фокуса
     TextField(
         value = mutableState.value,
         onValueChange = { newText -> mutableState.value = newText },