Przeglądaj źródła

App: страницы компаний и облака, начаты страницы about с передачей id

Blueris 4 dni temu
rodzic
commit
1c9f878220

+ 1 - 1
OscellaMobile/.idea/deploymentTargetSelector.xml

@@ -2,7 +2,7 @@
 <project version="4">
   <component name="deploymentTargetSelector">
     <selectionStates>
-      <SelectionState runConfigName="app">
+      <SelectionState runConfigName="Unnamed">
         <option name="selectionMode" value="DROPDOWN" />
       </SelectionState>
     </selectionStates>

+ 25 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/Navigation/Navigation.kt

@@ -4,8 +4,13 @@ import androidx.compose.runtime.Composable
 import androidx.navigation.compose.NavHost
 import androidx.navigation.compose.composable
 import androidx.navigation.compose.rememberNavController
+import com.example.oscellamobile.screens.AboutCloud
+import com.example.oscellamobile.screens.AboutCompany
+import com.example.oscellamobile.screens.AboutGame
 import com.example.oscellamobile.screens.Auth
 import com.example.oscellamobile.screens.AuthWithEmail
+import com.example.oscellamobile.screens.CloudList
+import com.example.oscellamobile.screens.CompanyList
 import com.example.oscellamobile.screens.MainWindow
 import com.example.oscellamobile.screens.Registration
 import com.example.oscellamobile.screens.RegistrationWithEmail
@@ -34,5 +39,25 @@ fun Navigation() {
         composable("MainWindow"){
             MainWindow(navController)
         }
+        composable("CompanyList")
+        {
+            CompanyList(navController)
+        }
+        composable("CloudList")
+        {
+            CloudList(navController)
+        }
+        composable("AboutGame/{id}") { backStackEntry ->
+            val id = backStackEntry.arguments?.getString("id")?.toInt() ?: 0
+            AboutGame(navController, id)
+        }
+        composable("AboutCloud/{id}") { backStackEntry ->
+            val id = backStackEntry.arguments?.getString("id")?.toInt() ?: 0
+            AboutCloud(navController, id)
+        }
+        composable("AboutCompany/{id}") { backStackEntry ->
+            val id = backStackEntry.arguments?.getString("id")?.toInt() ?: 0
+            AboutCompany(navController, id)
+        }
     }
 }

+ 9 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Advantages_of_the_cloud.kt

@@ -0,0 +1,9 @@
+package com.example.oscellamobile.models
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Advantages_of_the_cloud(
+    val id_cloud: Int,
+    val id_advantage: Int
+)

+ 9 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Cloud_advantage.kt

@@ -0,0 +1,9 @@
+package com.example.oscellamobile.models
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Cloud_advantage(
+    var id: Int,
+    var advantage: String
+)

+ 4 - 2
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Company.kt

@@ -4,7 +4,9 @@ import kotlinx.serialization.Serializable
 
 @Serializable
 data class Company(var id: Int,
-var name_company: String?,
+var name_company: String,
 var picture: String,
-var description: String?
+var description: String?,
+var short_description: String,
+var quotation: String
 )

+ 9 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Genre.kt

@@ -0,0 +1,9 @@
+package com.example.oscellamobile.models
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Genre(
+    var id: Int,
+    var genre_name: String
+)

+ 10 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Popular_games_of_the_company.kt

@@ -0,0 +1,10 @@
+package com.example.oscellamobile.models
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Popular_games_of_the_company(
+    var id: Int,
+    var id_company: Int,
+    var game_name: String
+)

+ 12 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/models/Сloud_gaming.kt

@@ -0,0 +1,12 @@
+package com.example.oscellamobile.models
+
+import kotlinx.serialization.Serializable
+
+@Serializable
+data class Сloud_gaming(
+var id: Int,
+var cloud_name: String,
+var link: String,
+var picture: String,
+var description: String,
+)

+ 117 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/AboutCloud.kt

@@ -0,0 +1,117 @@
+package com.example.oscellamobile.screens
+
+import android.util.Log
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.gestures.snapping.SnapPosition
+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.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.SideEffect
+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.draw.clip
+import androidx.compose.ui.draw.shadow
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
+import androidx.compose.ui.graphics.Shape
+import androidx.compose.ui.graphics.drawscope.DrawScope
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.rememberAsyncImagePainter
+import com.example.oscellamobile.domain.utlis.Constant
+import com.example.oscellamobile.models.Game
+import com.google.accompanist.systemuicontroller.rememberSystemUiController
+import io.github.jan.supabase.postgrest.from
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import kotlin.math.cos
+import kotlin.math.sin
+import com.example.oscellamobile.R
+import com.example.oscellamobile.models.Company
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import coil.size.Size
+import com.example.oscellamobile.models.Age_rating
+import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Genre
+import com.example.oscellamobile.models.Label
+import com.example.oscellamobile.models.Сloud_gaming
+import org.intellij.lang.annotations.JdkConstants
+
+@Composable
+fun AboutCloud(navController: NavHostController, id: Int) {
+    var clouds by remember { mutableStateOf<List<Сloud_gaming>>(listOf()) }
+
+    LaunchedEffect(Unit) {
+        withContext(Dispatchers.IO) {
+            try {
+                clouds = Constant.supabase.from("Сloud_gaming").select().decodeList<Сloud_gaming>()
+                clouds.forEach { Cloud ->
+                    Log.d("C", Cloud.cloud_name)
+                }
+            } catch (e: Exception) {
+                Log.e("C", "Ошибка загрузки данных", e)
+            }
+        }
+    }
+
+    val filteredCloud = clouds.filter { it.id == id}
+
+    LazyColumn {
+        items(
+            filteredCloud,
+            key = { cloud -> cloud.id }
+        ) { cloud ->
+            CloudItem(cloud)
+        }
+    }
+}
+
+@Composable
+fun CloudItem(cloud: Сloud_gaming)
+{
+    Text(
+        cloud.cloud_name
+    )
+}

+ 116 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/AboutCompany.kt

@@ -0,0 +1,116 @@
+package com.example.oscellamobile.screens
+
+import android.util.Log
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.gestures.snapping.SnapPosition
+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.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.SideEffect
+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.draw.clip
+import androidx.compose.ui.draw.shadow
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
+import androidx.compose.ui.graphics.Shape
+import androidx.compose.ui.graphics.drawscope.DrawScope
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.rememberAsyncImagePainter
+import com.example.oscellamobile.domain.utlis.Constant
+import com.example.oscellamobile.models.Game
+import com.google.accompanist.systemuicontroller.rememberSystemUiController
+import io.github.jan.supabase.postgrest.from
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import kotlin.math.cos
+import kotlin.math.sin
+import com.example.oscellamobile.R
+import com.example.oscellamobile.models.Company
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import coil.size.Size
+import com.example.oscellamobile.models.Age_rating
+import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Genre
+import com.example.oscellamobile.models.Label
+import org.intellij.lang.annotations.JdkConstants
+
+@Composable
+fun AboutCompany(navController: NavHostController, id: Int) {
+    var company by remember { mutableStateOf<List<Company>>(listOf()) }
+
+    LaunchedEffect(Unit) {
+        withContext(Dispatchers.IO) {
+            try {
+                company = Constant.supabase.from("Company").select().decodeList<Company>()
+                company.forEach { Company ->
+                    Log.d("C", Company.name_company)
+                }
+            } catch (e: Exception) {
+                Log.e("C", "Ошибка загрузки данных", e)
+            }
+        }
+    }
+
+    val filteredCompany = company.filter { it.id == id}
+
+    LazyColumn {
+        items(
+            filteredCompany,
+            key = { company -> company.id }
+        ) { company ->
+            CompanyItem(company)
+        }
+    }
+}
+
+@Composable
+fun CompanyItem(Company: Company)
+{
+    Text(
+        Company.name_company
+    )
+}

+ 116 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/AboutGame.kt

@@ -0,0 +1,116 @@
+package com.example.oscellamobile.screens
+
+import android.util.Log
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.gestures.snapping.SnapPosition
+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.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.SideEffect
+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.draw.clip
+import androidx.compose.ui.draw.shadow
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
+import androidx.compose.ui.graphics.Shape
+import androidx.compose.ui.graphics.drawscope.DrawScope
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.rememberAsyncImagePainter
+import com.example.oscellamobile.domain.utlis.Constant
+import com.example.oscellamobile.models.Game
+import com.google.accompanist.systemuicontroller.rememberSystemUiController
+import io.github.jan.supabase.postgrest.from
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import kotlin.math.cos
+import kotlin.math.sin
+import com.example.oscellamobile.R
+import com.example.oscellamobile.models.Company
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import coil.size.Size
+import com.example.oscellamobile.models.Age_rating
+import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Genre
+import com.example.oscellamobile.models.Label
+import org.intellij.lang.annotations.JdkConstants
+
+@Composable
+fun AboutGame(navController: NavHostController, id: Int) {
+    var games by remember { mutableStateOf<List<Game>>(listOf()) }
+
+    LaunchedEffect(Unit) {
+        withContext(Dispatchers.IO) {
+            try {
+                games = Constant.supabase.from("Game").select().decodeList<Game>()
+                games.forEach { Game ->
+                    Log.d("C", Game.name_game)
+                }
+            } catch (e: Exception) {
+                Log.e("C", "Ошибка загрузки данных", e)
+            }
+        }
+    }
+
+    val filteredGames = games.filter { it.id == id}
+
+    LazyColumn {
+        items(
+            filteredGames,
+            key = { game -> game.id }
+        ) { game ->
+            GameItem(game)
+        }
+    }
+}
+
+@Composable
+fun GameItem(game: Game)
+{
+    Text(
+        game.name_game
+    )
+}

+ 9 - 10
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/Auth.kt

@@ -41,7 +41,6 @@ import org.w3c.dom.Text
 @Composable
 fun Auth(navController: NavHostController) {
     val viewModel = Auth()
-    //val kdamFontFamily = FontFamily(Font(R.font.kdam))
     val email = remember { mutableStateOf("") }
     val password = remember { mutableStateOf("") }
 
@@ -90,13 +89,13 @@ fun Auth(navController: NavHostController) {
         Spacer(modifier = Modifier.height(180.dp))
         Text(
             text = "Oscella", fontSize = 40.sp,
-            //fontFamily = kdamFontFamily
+            fontFamily = kdamFontFamily
         )
         Spacer(modifier = Modifier.height(29.dp))
         TextField(
             value = email.value,
             onValueChange = { newText -> email.value = newText },
-            //placeholder = { Text("Email", fontSize = 24.sp, fontFamily = kdamFontFamily) },
+            placeholder = { Text("Email", fontSize = 24.sp, fontFamily = kdamFontFamily) },
             shape = RoundedCornerShape(20.dp),
             colors = TextFieldDefaults.textFieldColors(
                 focusedIndicatorColor = Color.Transparent,
@@ -104,7 +103,7 @@ fun Auth(navController: NavHostController) {
             ),
             textStyle = TextStyle(
                 fontSize = 20.sp,
-                //fontFamily = kdamFontFamily
+                fontFamily = kdamFontFamily
             ),
             modifier = Modifier
                 .width(330.dp)
@@ -114,7 +113,7 @@ fun Auth(navController: NavHostController) {
         TextField(
             value = password.value,
             onValueChange = {newText -> password.value = newText},
-            //placeholder = { Text("Password", fontSize = 24.sp, fontFamily = kdamFontFamily) },
+            placeholder = { Text("Password", fontSize = 24.sp, fontFamily = kdamFontFamily) },
             shape = RoundedCornerShape(20.dp),
             colors = TextFieldDefaults.textFieldColors(
                 focusedIndicatorColor = Color.Transparent,
@@ -122,7 +121,7 @@ fun Auth(navController: NavHostController) {
             ),
             textStyle = TextStyle(
                 fontSize = 20.sp,
-                //fontFamily = kdamFontFamily
+                fontFamily = kdamFontFamily
             ),
             modifier = Modifier
                 .width(330.dp)
@@ -143,12 +142,12 @@ fun Auth(navController: NavHostController) {
             )
 
         ) {
-           // Text("Login", color = Color.White, fontFamily = kdamFontFamily, fontSize = 24.sp)
+            Text("Login", color = Color.White, fontFamily = kdamFontFamily, fontSize = 24.sp)
         }
         Text(
             text = "Don’t have account?",
             color = Color.White,
-            //fontFamily = kdamFontFamily,
+            fontFamily = kdamFontFamily,
             fontSize = 14.sp
         )
         Spacer(modifier = Modifier.height(10.dp))
@@ -166,7 +165,7 @@ fun Auth(navController: NavHostController) {
                 )
 
             ) {
-             //   Text("SignUp", color = Color.White, fontFamily = kdamFontFamily, fontSize = 14.sp)
+               Text("SignUp", color = Color.White, fontFamily = kdamFontFamily, fontSize = 14.sp)
             }
             Spacer(modifier = Modifier.width(16.dp))
             Button(
@@ -180,7 +179,7 @@ fun Auth(navController: NavHostController) {
                 )
 
             ) {
-               // Text("Guest", color = Color.White, fontFamily = kdamFontFamily, fontSize = 14.sp)
+                Text("Guest", color = Color.White, fontFamily = kdamFontFamily, fontSize = 14.sp)
             }
         }
     }

+ 372 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/CloudList.kt

@@ -0,0 +1,372 @@
+package com.example.oscellamobile.screens
+
+import android.util.Log
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.gestures.snapping.SnapPosition
+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.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.SideEffect
+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.draw.clip
+import androidx.compose.ui.draw.shadow
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
+import androidx.compose.ui.graphics.Shape
+import androidx.compose.ui.graphics.drawscope.DrawScope
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.rememberAsyncImagePainter
+import com.example.oscellamobile.domain.utlis.Constant
+import com.example.oscellamobile.models.Game
+import com.google.accompanist.systemuicontroller.rememberSystemUiController
+import io.github.jan.supabase.postgrest.from
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import kotlin.math.cos
+import kotlin.math.sin
+import com.example.oscellamobile.R
+import com.example.oscellamobile.models.Company
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import coil.size.Size
+import com.example.oscellamobile.models.Advantages_of_the_cloud
+import com.example.oscellamobile.models.Age_rating
+import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Cloud_advantage
+import com.example.oscellamobile.models.Сloud_gaming
+import com.example.oscellamobile.models.Genre
+import com.example.oscellamobile.models.Label
+import com.example.oscellamobile.models.Popular_games_of_the_company
+import io.github.jan.supabase.realtime.Column
+import org.intellij.lang.annotations.JdkConstants
+
+
+@Composable
+fun CloudList(navHost: NavHostController) {
+
+    var cloud by remember { mutableStateOf<List<Сloud_gaming>>(listOf()) }
+    var advantage by remember { mutableStateOf<List<Cloud_advantage>>(listOf()) }
+    var cloudadvantage by remember { mutableStateOf<List<Advantages_of_the_cloud>>(listOf()) }
+
+    LaunchedEffect(Unit) {
+        withContext(Dispatchers.IO) {
+            try {
+                cloud = Constant.supabase.from("Сloud_gaming").select().decodeList<Сloud_gaming>()
+                advantage = Constant.supabase.from("Cloud_advantage").select().decodeList<Cloud_advantage>()
+                cloudadvantage = Constant.supabase.from("Advantages_of_the_cloud").select().decodeList<Advantages_of_the_cloud>()
+                cloud.forEach { Cloud ->
+                    Log.d("C", Cloud.cloud_name)
+                }
+            } catch (e: Exception) {
+                Log.e("C", "Ошибка загрузки данных", e)
+            }
+        }
+    }
+
+    val systemUiController = rememberSystemUiController()
+
+    LaunchedEffect(Unit) {
+        systemUiController.isStatusBarVisible = false
+        delay(5000)
+        systemUiController.isStatusBarVisible = false
+    }
+
+    Canvas(
+        modifier = Modifier
+            .fillMaxWidth()
+            .fillMaxHeight()
+    ) {
+        val gradient = Brush.linearGradient(
+            colors = listOf(
+                Color(0xFFFF9F1C),
+                Color(0xFFE71D36)
+            ),
+            start = Offset(size.width, 1200f),
+            end = Offset(150f, size.height)
+        )
+
+        drawRect(brush = gradient)
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxWidth()
+            .fillMaxHeight()
+    ) {
+        Spacer(modifier = Modifier.height(10.dp))
+        Row {
+            Spacer(modifier = Modifier.width(13.dp))
+            Text(text = "Osccela", fontSize = 40.sp, fontFamily = kdamFontFamily)
+            Spacer(modifier = Modifier.width(145.dp))
+            Image(
+                painter = painterResource(id = R.drawable.personall),
+                contentDescription = "Описание изображения",
+                modifier = Modifier.size(90.dp)
+            )
+        }
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .height(70.dp)
+                .padding(10.dp, 0.dp, 10.dp, 0.dp)
+                .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(5.dp)),
+            horizontalArrangement = Arrangement.SpaceBetween,
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            Spacer(Modifier.width(10.dp))
+            Button(
+                onClick = {navHost.navigate("MainWindow")},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(93.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Игры",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+
+            Button(
+                onClick = {navHost.navigate("CompanyList")},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(135.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Компании",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+
+            Button(
+                onClick = {},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(107.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Облако",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+            Spacer(Modifier.width(10.dp))
+        }
+        Spacer(Modifier.height(100.dp))
+        LazyColumn {
+            items(
+                cloud,
+                key = { Cloud -> Cloud.id },
+            ) { Cloud ->
+                CloudItem(
+                    cloud = Cloud,
+                    advantage = advantage,
+                    cloudadvantage = cloudadvantage,
+                    navHost = navHost
+                )
+            }
+        }
+    }
+}
+
+@Composable
+fun CloudItem(
+    cloud: Сloud_gaming,
+    advantage: List<Cloud_advantage>,
+    cloudadvantage: List<Advantages_of_the_cloud>,
+    navHost: NavHostController
+) {
+    val imageState = rememberAsyncImagePainter(
+        model = ImageRequest.Builder(LocalContext.current).data(cloud.picture)
+            .size(Size.ORIGINAL).build()
+    ).state
+
+    Card(
+        modifier = Modifier
+            .padding(20.dp, 10.dp)
+            .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(15.dp)),
+    ) {
+        Row(
+            modifier = Modifier.padding(10.dp)
+        ) {
+            Column {
+                Text(
+                    text = "Плюсы облака:",
+                    fontSize = 14.sp,
+                    fontFamily = kdamFontFamily,
+                    color = Color(0xFF7F807E)
+                )
+
+                val CloudId = cloud.id
+                val cloudForGame = cloudadvantage.filter { it.id_cloud == CloudId }
+                val labelIds = cloudForGame.map { it.id_advantage }
+                val labels = labelIds.mapNotNull { id ->
+                    advantage.find { it.id == id }
+                }
+                for (advantage in labels) {
+                    Spacer(modifier = Modifier.padding(7.dp))
+                    Box(
+                        modifier = Modifier
+                            .width(107.dp)
+                            .background(
+                                color = Color(0xFF2EC4B6),
+                                shape = RoundedCornerShape(20.dp)
+                            ),
+                        contentAlignment = Alignment.Center
+                    ) {
+                        Text(
+                            text = advantage.advantage,
+                            color = Color(0xFFFDFFFC),
+                            fontFamily = caveat,
+                            fontSize = 20.sp,
+                            textAlign = TextAlign.Center
+                        )
+                    }
+                }
+            }
+
+            Spacer(modifier = Modifier.width(10.dp))
+            Column(
+                horizontalAlignment = Alignment.CenterHorizontally
+            ) {
+                Text(
+                    text = cloud.cloud_name,
+                    fontSize = 20.sp,
+                    fontFamily = kdamFontFamily,
+                    color = Color(0xFF7F807E),
+                    textAlign = TextAlign.Center
+                )
+
+                if (imageState is AsyncImagePainter.State.Success) {
+                    Image(
+                        painter = imageState.painter,
+                        contentDescription = "Описание изображения",
+                        modifier = Modifier
+                            .width(230.dp)
+                            .clip(RoundedCornerShape(20.dp))
+
+                    )
+                }
+            }
+        }
+        Column {
+            Box(
+                modifier = Modifier
+                    .fillMaxWidth()
+                    .padding(5.dp)
+                    .background(brush = gradientBox, shape = RoundedCornerShape(10.dp))
+            ) {
+                Text(
+                    text = cloud.description,
+                    fontSize = 9.sp,
+                    textAlign = TextAlign.Center,
+                    fontFamily = ibmplexmono
+                )
+            }
+            Spacer(modifier = Modifier.height(5.dp))
+        }
+        Row(
+            modifier = Modifier
+                .height(60.dp)
+        ) {
+            Spacer(modifier = Modifier.width(200.dp))
+            Button(
+                onClick = {navHost.navigate("AboutCloud/${cloud.id}")},
+                modifier = Modifier
+                    .background(
+                        color = Color(0xFFE71D36),
+                        shape = RoundedCornerShape(20.dp)
+                    ),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Text(
+                    text = "Подробности",
+                    textAlign = TextAlign.Center,
+                    fontFamily = playfairdisplay,
+                    fontSize = 16.sp,
+                    color = Color(0xFFFDFFFC)
+                )
+            }
+        }
+    }
+}

+ 370 - 0
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/CompanyList.kt

@@ -0,0 +1,370 @@
+package com.example.oscellamobile.screens
+
+import android.util.Log
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.gestures.snapping.SnapPosition
+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.layout.width
+import androidx.compose.foundation.lazy.LazyColumn
+import androidx.compose.foundation.lazy.items
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
+import androidx.compose.material3.CircularProgressIndicator
+import androidx.compose.material3.Icon
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.SideEffect
+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.draw.clip
+import androidx.compose.ui.draw.shadow
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.graphics.Brush
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
+import androidx.compose.ui.graphics.Shape
+import androidx.compose.ui.graphics.drawscope.DrawScope
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.res.painterResource
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+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.rememberAsyncImagePainter
+import com.example.oscellamobile.domain.utlis.Constant
+import com.example.oscellamobile.models.Game
+import com.google.accompanist.systemuicontroller.rememberSystemUiController
+import io.github.jan.supabase.postgrest.from
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.withContext
+import kotlin.math.cos
+import kotlin.math.sin
+import com.example.oscellamobile.R
+import com.example.oscellamobile.models.Company
+import coil.compose.AsyncImagePainter
+import coil.compose.rememberAsyncImagePainter
+import coil.request.ImageRequest
+import coil.size.Size
+import com.example.oscellamobile.models.Age_rating
+import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Genre
+import com.example.oscellamobile.models.Label
+import com.example.oscellamobile.models.Popular_games_of_the_company
+import io.github.jan.supabase.realtime.Column
+import org.intellij.lang.annotations.JdkConstants
+
+
+@Composable
+fun CompanyList(navHost: NavHostController) {
+
+    var сompany by remember { mutableStateOf<List<Company>>(listOf()) }
+    var games by remember { mutableStateOf<List<Popular_games_of_the_company>>(listOf()) }
+
+    LaunchedEffect(Unit) {
+        withContext(Dispatchers.IO) {
+            try {
+                сompany = Constant.supabase.from("Company").select().decodeList<Company>()
+                games = Constant.supabase.from("Popular_games_of_the_company").select().decodeList<Popular_games_of_the_company>()
+                сompany.forEach { Comp ->
+                    Log.d("C", Comp.name_company)
+                }
+            } catch (e: Exception) {
+                Log.e("C", "Ошибка загрузки данных", e)
+            }
+        }
+    }
+
+    val systemUiController = rememberSystemUiController()
+
+    LaunchedEffect(Unit) {
+        systemUiController.isStatusBarVisible = false
+        delay(5000)
+        systemUiController.isStatusBarVisible = false
+    }
+
+    Canvas(
+        modifier = Modifier
+            .fillMaxWidth()
+            .fillMaxHeight()
+    ) {
+        val gradient = Brush.linearGradient(
+            colors = listOf(
+                Color(0xFFFF9F1C),
+                Color(0xFFE71D36)
+            ),
+            start = Offset(size.width, 1200f),
+            end = Offset(150f, size.height)
+        )
+
+        drawRect(brush = gradient)
+    }
+
+    Column(
+        modifier = Modifier
+            .fillMaxWidth()
+            .fillMaxHeight()
+    ) {
+        Spacer(modifier = Modifier.height(10.dp))
+        Row {
+            Spacer(modifier = Modifier.width(13.dp))
+            Text(text = "Osccela", fontSize = 40.sp, fontFamily = kdamFontFamily)
+            Spacer(modifier = Modifier.width(145.dp))
+            Image(
+                painter = painterResource(id = R.drawable.personall),
+                contentDescription = "Описание изображения",
+                modifier = Modifier.size(90.dp)
+            )
+        }
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .height(70.dp)
+                .padding(10.dp, 0.dp, 10.dp, 0.dp)
+                .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(5.dp)),
+            horizontalArrangement = Arrangement.SpaceBetween,
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            Spacer(Modifier.width(10.dp))
+            Button(
+                onClick = {navHost.navigate("MainWindow")},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(93.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Игры",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+
+            Button(
+                onClick = {},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(135.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Компании",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+
+            Button(
+                onClick = {navHost.navigate("CloudList")},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(107.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text(
+                        "Облако",
+                        color = Color(0xFFFDFFFC),
+                        fontFamily = playfairdisplay,
+                        fontSize = 17.sp
+                    )
+                }
+            }
+            Spacer(Modifier.width(10.dp))
+        }
+        Spacer(Modifier.height(100.dp))
+        LazyColumn {
+            items(
+                сompany,
+                key = { Comp -> Comp.id },
+            ) { Comp ->
+                CompanyItem(
+                    company = Comp,
+                    gamecompany = games,
+                    navHost = navHost
+                )
+            }
+        }
+    }
+}
+
+@Composable
+fun CompanyItem(
+    company: Company,
+    gamecompany: List<Popular_games_of_the_company>,
+    navHost: NavHostController
+) {
+    val imageState = rememberAsyncImagePainter(
+        model = ImageRequest.Builder(LocalContext.current).data(company.picture)
+            .size(Size.ORIGINAL).build()
+    ).state
+
+    Card(
+        modifier = Modifier
+            .padding(20.dp, 10.dp)
+            .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(15.dp)),
+    ) {
+        Text(
+            company.quotation,
+            fontSize = 10.sp,
+            fontFamily = kdamFontFamily,
+            color = Color(0xFFE71D36),
+            textAlign = TextAlign.Left,
+            modifier = Modifier.padding(2.dp)
+            )
+        Row(
+            modifier = Modifier.padding(10.dp)
+            .fillMaxWidth()
+        ) {
+            Column {
+                Text(
+                    text = "Популярные игры:",
+                    fontSize = 14.sp,
+                    fontFamily = kdamFontFamily,
+                    color = Color(0xFF7F807E),
+                    modifier = Modifier.padding(0.dp,20.dp,0.dp,0.dp)
+                )
+
+                val companyID = company.id
+                val popularGames = gamecompany.filter { it.id_company == companyID }
+                for (game in popularGames) {
+                    Spacer(modifier = Modifier.padding(7.dp))
+                    Box(
+                        modifier = Modifier
+                            .width(107.dp)
+                            .background(
+                                color = Color(0xFF2EC4B6),
+                                shape = RoundedCornerShape(20.dp)
+                            ),
+                        contentAlignment = Alignment.Center
+                    ) {
+                        Text(
+                            text = game.game_name,
+                            color = Color(0xFFFDFFFC),
+                            fontFamily = caveat,
+                            fontSize = 20.sp,
+                            textAlign = TextAlign.Center
+                        )
+                    }
+                }
+            }
+
+            Spacer(modifier = Modifier.height(10.dp))
+            Column(
+                horizontalAlignment = Alignment.CenterHorizontally,
+            ) {
+                Text(
+                    text = company.name_company,
+                    fontSize = 20.sp,
+                    fontFamily = kdamFontFamily,
+                    color = Color(0xFF7F807E),
+                    textAlign = TextAlign.Center
+                )
+
+                if (imageState is AsyncImagePainter.State.Success) {
+                    Image(
+                        painter = imageState.painter,
+                        contentDescription = "Описание изображения",
+                        modifier = Modifier
+                            .width(280.dp)
+                            .clip(RoundedCornerShape(20.dp))
+                    )
+                }
+            }
+        }
+        Column {
+            Box(
+                modifier = Modifier
+                    .fillMaxWidth()
+                    .padding(5.dp)
+                    .background(brush = gradientBox, shape = RoundedCornerShape(10.dp))
+            ) {
+                Text(
+                    text = company.short_description,
+                    fontSize = 9.sp,
+                    textAlign = TextAlign.Center,
+                    fontFamily = ibmplexmono
+                )
+            }
+            Spacer(modifier = Modifier.height(5.dp))
+        }
+            Row(
+                modifier = Modifier
+                    .height(60.dp)
+            ) {
+                Spacer(modifier = Modifier.width(200.dp))
+                Button(
+                    onClick = {navHost.navigate("AboutCompany/${company.id}")},
+                    modifier = Modifier
+                        .background(
+                            color = Color(0xFFE71D36),
+                            shape = RoundedCornerShape(20.dp)
+                        ),
+                    colors = ButtonDefaults.buttonColors(
+                        containerColor = Color.Transparent
+                    )
+                ) {
+                    Text(
+                        text = "Подробности",
+                        textAlign = TextAlign.Center,
+                        fontFamily = playfairdisplay,
+                        fontSize = 16.sp,
+                        color = Color(0xFFFDFFFC)
+                    )
+                }
+            }
+    }
+}

+ 28 - 15
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/MainWindow.kt

@@ -55,6 +55,7 @@ import androidx.compose.ui.text.font.FontFamily
 import androidx.compose.ui.text.style.TextAlign
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
+import androidx.navigation.NavHost
 import androidx.navigation.NavHostController
 import coil.compose.rememberAsyncImagePainter
 import com.example.oscellamobile.domain.utlis.Constant
@@ -74,6 +75,7 @@ import coil.request.ImageRequest
 import coil.size.Size
 import com.example.oscellamobile.models.Age_rating
 import com.example.oscellamobile.models.Basic_labels
+import com.example.oscellamobile.models.Genre
 import com.example.oscellamobile.models.Label
 import org.intellij.lang.annotations.JdkConstants
 
@@ -101,13 +103,14 @@ val gradientBox = Brush.linearGradient(
 )
 
 @Composable
-fun MainWindow(navController: NavHostController) {
+fun MainWindow(navHost: NavHostController) {
 
     var games by remember { mutableStateOf<List<Game>>(listOf()) }
     var сompany by remember { mutableStateOf<List<Company>>(listOf()) }
     var labels by remember{ mutableStateOf<List<Label>>(listOf()) }
     var basiclabels by remember{ mutableStateOf<List<Basic_labels>>(listOf()) }
     var age by remember{ mutableStateOf<List<Age_rating>>(listOf()) }
+    var genres by remember{ mutableStateOf<List<Genre>>(listOf()) }
 
     LaunchedEffect(Unit) {
         withContext(Dispatchers.IO) {
@@ -117,6 +120,7 @@ fun MainWindow(navController: NavHostController) {
                 labels = Constant.supabase.from("Label").select().decodeList<Label>()
                 basiclabels = Constant.supabase.from("Basic_labels").select().decodeList<Basic_labels>()
                 age = Constant.supabase.from("Age_rating").select().decodeList<Age_rating>()
+                genres = Constant.supabase.from("Genre").select().decodeList<Genre>()
                 games.forEach { Game ->
                     Log.d("C", Game.name_game)
                 }
@@ -202,7 +206,7 @@ fun MainWindow(navController: NavHostController) {
             }
 
             Button(
-                onClick = {},
+                onClick = {navHost.navigate("CompanyList")},
                 modifier = Modifier
                     .shadow(100.dp)
                     .width(135.dp)
@@ -226,7 +230,7 @@ fun MainWindow(navController: NavHostController) {
             }
 
             Button(
-                onClick = {},
+                onClick = {navHost.navigate("CloudList")},
                 modifier = Modifier
                     .shadow(100.dp)
                     .width(107.dp)
@@ -261,7 +265,9 @@ fun MainWindow(navController: NavHostController) {
                     company = сompany,
                     label = labels,
                     basic = basiclabels,
-                    age = age
+                    age = age,
+                    genre = genres,
+                    navHost = navHost
                 )
             }
         }
@@ -274,7 +280,9 @@ fun MainWindow(navController: NavHostController) {
         company: List<Company>,
         label: List<Label>,
         basic: List<Basic_labels>,
-        age: List<Age_rating>
+        age: List<Age_rating>,
+        genre: List<Genre>,
+        navHost: NavHostController
     ) {
     val imageState = rememberAsyncImagePainter(
         model = ImageRequest.Builder(LocalContext.current).data(game.picture)
@@ -291,19 +299,23 @@ fun MainWindow(navController: NavHostController) {
             Column {
                 val companyId = game.company
                 val companyy = company.find { it.id == companyId }
-                if (company != null) {
+                if (companyy != null) {
                     Text(
                         "${companyy?.name_company}",
                         fontSize = 20.sp,
                         fontFamily = kdamFontFamily,
                         color = Color(0xFF2EC4B6)
                     )
-                    Text(
-                        text = "Фэнтези",
-                        fontSize = 12.sp,
-                        fontFamily = kdamFontFamily,
-                        color = Color(0xFFE71D36)
-                    )
+                    val genreId = game.genre
+                    val genree = genre.find { it.id == genreId }
+                    if(genree != null) {
+                        Text(
+                            "${genree?.genre_name}",
+                            fontSize = 12.sp,
+                            fontFamily = kdamFontFamily,
+                            color = Color(0xFFE71D36)
+                        )
+                    }
                     Spacer(Modifier.width(20.dp))
                     Column {
                         Text(
@@ -325,7 +337,6 @@ fun MainWindow(navController: NavHostController) {
                                 Box(
                                     modifier = Modifier
                                         .width(107.dp)
-                                        .height(22.dp)
                                         .background(
                                             color = Color(0xFF2EC4B6),
                                             shape = RoundedCornerShape(20.dp)
@@ -337,7 +348,8 @@ fun MainWindow(navController: NavHostController) {
                                         "${label.label_name}",
                                         color = Color(0xFFFDFFFC),
                                         fontFamily = caveat,
-                                        fontSize = 20.sp
+                                        fontSize = 20.sp,
+                                        textAlign = TextAlign.Center
                                     )
                                 }
                             }
@@ -470,7 +482,8 @@ fun MainWindow(navController: NavHostController) {
                 }
                 Spacer(modifier = Modifier.width(70.dp))
                 Button(
-                    onClick = { /*TODO*/ }, modifier = Modifier
+                    onClick = {navHost.navigate("AboutGame/${game.id}")},
+                    modifier = Modifier
                         .background(
                             color = Color(0xFFE71D36),
                             shape = RoundedCornerShape(20.dp)

+ 1 - 1
OscellaMobile/gradle/libs.versions.toml

@@ -1,6 +1,6 @@
 [versions]
 accompanistSystemuicontroller = "0.36.0"
-agp = "8.5.1"
+agp = "8.6.0"
 bom = "VERSION"
 bomVersion = "2.0"
 coilComposeVersion = "2.4.0"