костюниноа 6 dagar sedan
förälder
incheckning
d29eeda4a1

+ 2 - 2
.idea/deploymentTargetSelector.xml

@@ -4,10 +4,10 @@
     <selectionStates>
       <SelectionState runConfigName="app">
         <option name="selectionMode" value="DROPDOWN" />
-        <DropdownSelection timestamp="2024-09-24T15:41:07.206885200Z">
+        <DropdownSelection timestamp="2024-11-19T09:56:03.583239500Z">
           <Target type="DEFAULT_BOOT">
             <handle>
-              <DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\olegm\.android\avd\Pixel_6_Pro_API_27.avd" />
+              <DeviceId pluginId="LocalEmulator" identifier="path=C:\AndroidSettings\.android\avd\Pixel_8_Pro_API_34.avd" />
             </handle>
           </Target>
         </DropdownSelection>

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/model/Concerts.kt

@@ -0,0 +1,13 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Concerts(
+    val id: Int,
+    val singer: String,
+    val genre: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+)

+ 16 - 0
app/src/main/java/com/example/lectionsupabase/model/Exhibition.kt

@@ -0,0 +1,16 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+
+@Serializable
+data class Exhibition(
+    val id: Int,
+    val name: String,
+    val location: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+
+
+)

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/model/Movie.kt

@@ -0,0 +1,13 @@
+package com.example.lectionsupabase.model
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Movie(
+    val id: Int,
+    val name: String,
+    val genre: String,
+    val price: String,
+    val date: String,
+    val picture: String?
+)

+ 13 - 0
app/src/main/java/com/example/lectionsupabase/navigation/Navigation.kt

@@ -6,7 +6,10 @@ import androidx.navigation.compose.composable
 import androidx.navigation.compose.rememberNavController
 import auth
 import com.example.lectionsupabase.view.mainActivity.MainViewModel
+import com.example.lectionsupabase.view.mainActivity.components.Cinema
+import com.example.lectionsupabase.view.mainActivity.components.Concerts
 import com.example.lectionsupabase.view.mainActivity.components.DealersList
+import com.example.lectionsupabase.view.mainActivity.components.Exhibition
 import com.example.lectionsupabase.view.mainActivity.components.InsertCar
 import com.example.lectionsupabase.view.mainActivity.components.Restaurants
 import com.example.lectionsupabase.view.mainActivity.components.reg
@@ -40,6 +43,16 @@ fun Navigation() {
         composable("Restaurants"){
             Restaurants(navController)
         }
+
+        composable("Cinema") {
+            Cinema(navController)
+        }
+        composable("Concerts") {
+            Concerts(navController)
+        }
+        composable("Exhibition") {
+            Exhibition(navController)
+        }
         composable("DealersList"){
             DealersList(navController)
         }

+ 222 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Cinema.kt

@@ -0,0 +1,222 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Cinema(navHost: NavHostController) {
+    var movies by remember { mutableStateOf<List<Movie>>(listOf()) }
+    var loadingMovie by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            movies = Constants.supabase.from("Movie")
+                .select()
+                .decodeList<Movie>()
+            loadingMovie = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingMovie = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Киноафиша",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Concerts") },
+                modifier = Modifier.padding(start = 8.dp) // Отступ слева для стрелки
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingMovie) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(movies, key = { movie -> movie.id }) { movie ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = movie.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото ресторана",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Название: ${movie.name}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Жанр: ${movie.genre}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${movie.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${movie.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 223 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Concerts.kt

@@ -0,0 +1,223 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Concerts
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Concerts(navHost: NavHostController) {
+    var concerts by remember { mutableStateOf<List<Concerts>>(listOf()) }
+    var loadingConcert by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            concerts = Constants.supabase.from("Concerts")
+                .select()
+                .decodeList<Concerts>()
+            loadingConcert = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingConcert = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Концерты",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Exhibition") },
+                modifier = Modifier.padding(start = 8.dp)
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingConcert) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(concerts, key = { concert -> concert.id }) { concert ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = concert.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото концерта",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Исполнитель: ${concert.singer}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Жанр: ${concert.genre}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${concert.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${concert.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 223 - 0
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Exhibition.kt

@@ -0,0 +1,223 @@
+package com.example.lectionsupabase.view.mainActivity.components
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
+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.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.ArrowForward
+import androidx.compose.material3.Card
+import androidx.compose.material3.CardDefaults
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.IconButton
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.navigation.NavHostController
+import coil.compose.rememberImagePainter
+import com.example.lectionsupabase.R
+import com.example.lectionsupabase.domain.utils.Constants
+import com.example.lectionsupabase.model.Admin
+import com.example.lectionsupabase.model.Exhibition
+import com.example.lectionsupabase.model.Movie
+import io.github.jan.supabase.postgrest.from
+
+@Composable
+fun Exhibition(navHost: NavHostController) {
+    var ex by remember { mutableStateOf<List<Exhibition>>(listOf()) }
+    var loadingEx by remember { mutableStateOf(true) }
+    var loadingUsers by remember { mutableStateOf(true) }
+    var users by remember { mutableStateOf<List<Admin>>(listOf()) }
+    val montserratSemiBold = FontFamily(Font(R.font.mon_semibold))
+    val montserratExtraBold = FontFamily(Font(R.font.mon_extrabold))
+    val montserratRegular = FontFamily(Font(R.font.mon_regular))
+    val montserratMedium = FontFamily(Font(R.font.mon_medium))
+    val montserratLigth = FontFamily(Font(R.font.mon_light))
+
+    LaunchedEffect(Unit) {
+        try {
+            ex = Constants.supabase.from("Exhibition")
+                .select()
+                .decodeList<Exhibition>()
+            loadingEx = false
+        } catch (e: Exception) {
+            println("Error loading movies: ${e.message}")
+            loadingEx = false
+        }
+    }
+
+    LaunchedEffect(Unit) {
+        try {
+            users = Constants.supabase.from("Admin")
+                .select()
+                .decodeList<Admin>()
+            loadingUsers = false
+        } catch (e: Exception) {
+            println("Error loading users: ${e.message}")
+            loadingUsers = false
+        }
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxSize()
+            .padding(16.dp)
+    ) {
+
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .padding(vertical = 16.dp),
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            // Spacer для создания пространства между текстом и иконкой
+            Spacer(modifier = Modifier.weight(1f))
+
+            Text(
+                text = "Выставки",
+                style = MaterialTheme.typography.headlineMedium,
+                fontWeight = FontWeight.Bold,
+                color = MaterialTheme.colorScheme.onBackground,
+                textAlign = TextAlign.Center,
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
+            )
+
+            // Стрелка с отступом
+            IconButton(
+                onClick = { navHost.navigate("Concerts") },
+                modifier = Modifier.padding(start = 8.dp) // Отступ слева для стрелки
+            ) {
+                Icon(
+                    imageVector = Icons.Default.ArrowForward,
+                    contentDescription = "Перейти к киноафише",
+                    tint = Color.Black
+                )
+            }
+        }
+
+
+        // Загрузка ресторанов
+        if (loadingEx) {
+            Box(
+                modifier = Modifier.fillMaxSize(),
+                contentAlignment = Alignment.Center
+            ) {
+                CircularProgressIndicator(modifier = Modifier.size(72.dp))
+            }
+        } else {
+            // Список ресторанов
+            LazyColumn(
+                modifier = Modifier
+                    .fillMaxHeight() // Оставляем немного места для кнопки
+                    .padding(bottom = 16.dp),
+                verticalArrangement = Arrangement.spacedBy(16.dp)
+            ) {
+                items(ex, key = { exx -> exx.id }) { exx ->
+                    Card(
+                        modifier = Modifier
+                            .fillMaxWidth()
+                            .padding(8.dp),
+                        elevation = CardDefaults.cardElevation(0.dp),
+                        shape = RoundedCornerShape(20.dp),
+                        colors = CardDefaults.cardColors(containerColor = Color.White),
+                        border = BorderStroke(0.5.dp, Color.LightGray) // Светло-серая окантовка
+                    ) {
+                        Column(modifier = Modifier.fillMaxWidth()) {
+                            val painter = rememberImagePainter(
+                                data = exx.picture,
+                                builder = {
+                                    crossfade(true)
+                                }
+                            )
+
+                            Image(
+                                painter = painter,
+                                contentDescription = "Фото ресторана",
+                                modifier = Modifier
+                                    .fillMaxWidth()
+                                    .height(190.dp),
+                                contentScale = ContentScale.Crop
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                            // Информация о ресторане
+                            Text(
+                                text = "Название: ${exx.name}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Локация: ${exx.location}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular
+                            )
+                            Text(
+                                text = "Цена: ${exx.price}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Дата: ${exx.date}",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratRegular,
+
+                                )
+                            Text(
+                                text = "Посмотреть на карте",
+                                style = MaterialTheme.typography.titleMedium,
+                                fontWeight = FontWeight.SemiBold,
+                                fontSize = 14.sp,
+                                modifier = Modifier.padding(horizontal = 10.dp)
+                                    .padding(start = 3.dp),
+                                fontFamily = montserratMedium,
+                                color = Color(0xFF72C3F1)
+                            )
+                            Spacer(modifier = Modifier.height(10.dp))
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 5 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/Restaurants.kt

@@ -112,7 +112,8 @@ fun Restaurants(navHost: NavHostController) {
                 fontWeight = FontWeight.Bold,
                 color = MaterialTheme.colorScheme.onBackground,
                 textAlign = TextAlign.Center,
-                fontSize = 25.sp
+                fontSize = 20.sp,
+                fontFamily = montserratSemiBold
             )
 
             // Стрелка с отступом
@@ -123,7 +124,7 @@ fun Restaurants(navHost: NavHostController) {
                 Icon(
                     imageVector = Icons.Default.ArrowForward,
                     contentDescription = "Перейти к киноафише",
-                    tint = MaterialTheme.colorScheme.primary
+                    tint = Color.Black
                 )
             }
         }
@@ -141,7 +142,7 @@ fun Restaurants(navHost: NavHostController) {
             // Список ресторанов
             LazyColumn(
                 modifier = Modifier
-                    .fillMaxHeight(0.9f) // Оставляем немного места для кнопки
+                    .fillMaxHeight() // Оставляем немного места для кнопки
                     .padding(bottom = 16.dp),
                 verticalArrangement = Arrangement.spacedBy(16.dp)
             ) {
@@ -208,7 +209,7 @@ fun Restaurants(navHost: NavHostController) {
                                 fontFamily = montserratMedium,
                                 color = Color(0xFF72C3F1)
                             )
-                            Spacer(modifier = Modifier.height(10.dp))
+                            Spacer(modifier = Modifier.height(15.dp))
                         }
                     }
                 }

+ 4 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/auth.kt

@@ -109,10 +109,10 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Логин", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email),
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -128,7 +128,7 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Пароль", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
                     visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
@@ -143,7 +143,7 @@ fun auth(navHostController: NavHostController, viewModel: MainViewModel) {
                             )
                         }
                     },
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,

+ 4 - 4
app/src/main/java/com/example/lectionsupabase/view/mainActivity/components/reg.kt

@@ -106,7 +106,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                         .height(46.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email),
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color.Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -122,7 +122,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                     label = { Text("Пароль", color = Color.White, fontFamily = montserratMedium) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp) // Фиксированная высота для поля
+                        .height(48.dp) // Фиксированная высота для поля
                         .clip(RoundedCornerShape(5.dp)), // Закругление полей
                     keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password),
                     visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
@@ -136,7 +136,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                             )
                         }
                     },
-                    textStyle = TextStyle(fontSize = 18.sp, color = Color.White),
+                    textStyle = TextStyle(fontSize = 17.sp, color = Color.White),
                     colors = TextFieldDefaults.textFieldColors(
                         focusedIndicatorColor = Color .Transparent,
                         unfocusedIndicatorColor = Color.Transparent,
@@ -150,7 +150,7 @@ fun reg(navHostController: NavHostController, viewModel: MainViewModel) {
                     onClick = { viewModel.onSignUpEmail(email.value, password.value) },
                     modifier = Modifier
                         .fillMaxWidth()
-                        .height(46.dp),
+                        .height(48.dp),
                     shape = RoundedCornerShape(5.dp), // Закругление кнопки
                     colors = ButtonDefaults.buttonColors(
                         containerColor = Color(0xFF7DBCDF),