Kaynağa Gözat

feat: process creatin bottombar

Bax 1 hafta önce
ebeveyn
işleme
00c1dcffe6
17 değiştirilmiş dosya ile 363 ekleme ve 121 silme
  1. 33 5
      mobile_app/wabi/app/src/main/java/com/example/wabi/domain/navigation/Navigation.kt
  2. 20 5
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/MainActivity.kt
  3. 103 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/bars/bottom/BottomBar.kt
  4. 20 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/bars/bottom/DestinationsBB.kt
  5. 0 1
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/button/ButtonLink.kt
  6. 0 1
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/button/MainButton.kt
  7. 46 79
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/Basket.kt
  8. 1 20
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/BasketVM.kt
  9. 32 4
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/items/CostCounter.kt
  10. 3 1
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/items/CostRow.kt
  11. 13 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/catalog/Catalog.kt
  12. 0 3
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/onboard/items/OnBoardState.kt
  13. 13 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/profile/Profile.kt
  14. 37 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signIn/SignIn.kt
  15. 27 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signIn/SignInViewModel.kt
  16. 14 0
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signUp/SignUp.kt
  17. 1 2
      mobile_app/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Type.kt

+ 33 - 5
mobile_app/wabi/app/src/main/java/com/example/wabi/domain/navigation/Navigation.kt

@@ -1,23 +1,51 @@
 package com.example.wabi.domain.navigation
 
 import androidx.compose.runtime.Composable
+import androidx.compose.runtime.MutableState
 import androidx.navigation.NavHostController
 import androidx.navigation.compose.NavHost
 import androidx.navigation.compose.composable
 import com.example.wabi.view.screens.basket.Basket
+import com.example.wabi.view.screens.catalog.Catalog
 import com.example.wabi.view.screens.onboard.screeen.Onboard
+import com.example.wabi.view.screens.profile.Profile
+import com.example.wabi.view.screens.signIn.SignIn
+import com.example.wabi.view.screens.signUp.SignUp
 
+//инициализация контроллера навигации
 @Composable
-fun Navigation(controller: NavHostController) {
+fun Navigation(
+    controller: NavHostController,
+    visibleBB: MutableState<Boolean>,
+    visibleTB: MutableState<Boolean>
+) {
     NavHost(
-        navController = controller,
-        startDestination = Routes.BASKET) {
+        navController = controller, startDestination = Routes.BASKET
+    ) {
 
-        composable(Routes.BASKET){
+        composable(Routes.BASKET) {
+            visibleBB.value = true
             Basket(navController = controller)
         }
-        composable(Routes.ONBOARD){
+        composable(Routes.ONBOARD) {
+            visibleBB.value = false
             Onboard(navController = controller)
         }
+        composable(Routes.SIGNIN) {
+            visibleBB.value = true
+            SignIn(navController = controller)
+        }
+        composable(Routes.SIGNUP) {
+            visibleBB.value = false
+            SignUp(navController = controller)
+        }
+        composable(Routes.PROFILE) {
+            visibleBB.value = true
+            Profile(navController = controller)
+        }
+        composable(Routes.CATALOG) {
+            visibleBB.value = true
+            Catalog(navController = controller)
+        }
     }
 }

+ 20 - 5
mobile_app/wabi/app/src/main/java/com/example/wabi/view/MainActivity.kt

@@ -7,6 +7,8 @@ import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.fillMaxSize
 import androidx.compose.foundation.layout.padding
 import androidx.compose.material3.Scaffold
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.platform.LocalContext
 import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
@@ -16,6 +18,7 @@ import com.example.wabi.domain.navigation.Routes
 import com.example.wabi.domain.repository.PrefManager
 import com.example.wabi.ui.theme.ThemeMode
 import com.example.wabi.ui.theme.WabiTheme
+import com.example.wabi.view.common_elements.bars.bottom.BottomBar
 import dagger.hilt.android.AndroidEntryPoint
 
 @AndroidEntryPoint
@@ -28,22 +31,34 @@ class MainActivity : ComponentActivity() {
 
         setContent {
             PrefManager.initPrefManager(LocalContext.current)
+
             val navHostController = rememberNavController()
+            val visibleBB = remember { mutableStateOf(false) }
+            val visibleTB = remember { mutableStateOf(false) }
 
             WabiTheme(themeState = ThemeMode.System) {
-                Scaffold(
-                    modifier = Modifier.fillMaxSize(),
-                    containerColor = WabiTheme.colors.backgroundColor
-                ) { paddingValues ->
+                Scaffold(modifier = Modifier.fillMaxSize(),
+                    containerColor = WabiTheme.colors.backgroundColor,
+                    bottomBar = {
+                        if (visibleBB.value) {
+                            BottomBar(navController = navHostController)
+                        }
+                    }) { paddingValues ->
                     Box(
                         modifier = Modifier.padding(paddingValues)
                     ) {
-                        Navigation(navHostController)
+                        Navigation(
+                            controller = navHostController,
+                            visibleBB = visibleBB,
+                            visibleTB = visibleTB
+                        )
 
                         if (PrefManager.onboard) {
                             PrefManager.onboard = false
+                            visibleBB.value = false
                             navHostController.navigate(Routes.ONBOARD)
                         } else {
+                            visibleBB.value = true
                             navHostController.navigate(Routes.BASKET)
                         }
                     }

+ 103 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/bars/bottom/BottomBar.kt

@@ -0,0 +1,103 @@
+package com.example.wabi.view.common_elements.bars.bottom
+
+import androidx.compose.foundation.BorderStroke
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.PaddingValues
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.offset
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Icon
+import androidx.compose.material3.NavigationBar
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.vector.ImageVector
+import androidx.compose.ui.res.vectorResource
+import androidx.compose.ui.unit.dp
+import androidx.navigation.NavHostController
+import androidx.navigation.compose.currentBackStackEntryAsState
+import com.example.wabi.domain.navigation.NavigationFun
+import com.example.wabi.ui.theme.WabiTheme
+
+@Composable
+fun BottomBar(
+    navController: NavHostController, modifier: Modifier = Modifier
+) {
+    val screens = listOf(
+        DestinationsBB.Catalog, DestinationsBB.Basket, DestinationsBB.Profile
+    )
+
+    NavigationBar(
+        modifier = Modifier
+            .fillMaxWidth()
+            .height(70.dp)
+            .clip(shape = RoundedCornerShape(topEnd = 15.dp, topStart = 15.dp))
+    ) {
+
+        val navBackStackEntry by navController.currentBackStackEntryAsState()
+        val currentRoute = navBackStackEntry?.destination?.route
+        val nav = NavigationFun()
+
+        screens.forEach { screen ->
+            if (screen.route == currentRoute) {
+                Box(
+                    modifier = Modifier
+                        .offset(y = 0.dp)
+                        .offset(y = -10.dp),
+                ) {
+                    Button(
+                        onClick = {
+                            nav.NextScreen(
+                                navController = navController,
+                                whereFrom = currentRoute,
+                                where = screen.route
+                            )
+                        },
+                        contentPadding = PaddingValues(10.dp),
+                        modifier = Modifier.size(70.dp),
+                        colors = ButtonDefaults.buttonColors(
+                            contentColor = WabiTheme.colors.backgroundColor,
+                            containerColor = WabiTheme.colors.mainColor
+                        ),
+                        border = BorderStroke(
+                            width = 3.dp, color = WabiTheme.colors.backgroundColor
+                        )
+                    ) {
+                        Icon(
+                            imageVector = ImageVector.vectorResource(screen.iconId),
+                            contentDescription = screen.route,
+                            modifier = Modifier.size(35.dp)
+                        )
+                    }
+                }
+            } else {
+                Button(
+                    onClick = {
+                        nav.NextScreen(
+                            navController = navController,
+                            whereFrom = currentRoute!!,
+                            where = screen.route
+                        )
+                    },
+                    contentPadding = PaddingValues(10.dp),
+                    modifier = Modifier.size(70.dp),
+                    colors = ButtonDefaults.buttonColors(
+                        contentColor = WabiTheme.colors.backgroundColor,
+                        containerColor = WabiTheme.colors.mainColor
+                    ),
+                ) {
+                    Icon(
+                        imageVector = ImageVector.vectorResource(screen.iconId),
+                        contentDescription = screen.route,
+                        modifier = Modifier.size(35.dp)
+                    )
+                }
+            }
+        }
+    }
+}

+ 20 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/bars/bottom/DestinationsBB.kt

@@ -0,0 +1,20 @@
+package com.example.wabi.view.common_elements.bars.bottom
+
+import com.example.wabi.R
+import com.example.wabi.domain.navigation.Routes
+
+sealed class DestinationsBB(
+    val route: String, val anotherRoute: String? = "", val iconId: Int
+) {
+    object Basket : DestinationsBB(
+        route = Routes.BASKET, iconId = R.drawable.user_basket_vector
+    )
+
+    object Catalog : DestinationsBB(
+        route = Routes.CATALOG, iconId = R.drawable.catalog_vector
+    )
+
+    object Profile : DestinationsBB(
+        route = Routes.PROFILE, anotherRoute = Routes.SIGNIN, iconId = R.drawable.man_vector
+    )
+}

+ 0 - 1
mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/button/ButtonLink.kt

@@ -7,7 +7,6 @@ import androidx.compose.runtime.Composable
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.graphics.Color
 import com.example.wabi.ui.theme.WabiTheme
-import kotlin.reflect.jvm.internal.impl.types.checker.TypeRefinementSupport.Enabled
 
 //функция, создающая кнопку в виде сслыки (подчёркнутого текста)
 @Composable

+ 0 - 1
mobile_app/wabi/app/src/main/java/com/example/wabi/view/common_elements/button/MainButton.kt

@@ -1,7 +1,6 @@
 package com.example.wabi.view.common_elements.button
 
 import androidx.compose.foundation.BorderStroke
-import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.material3.Button
 import androidx.compose.material3.ButtonColors
 import androidx.compose.material3.Text

+ 46 - 79
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/Basket.kt

@@ -1,92 +1,59 @@
 package com.example.wabi.view.screens.basket
 
-import androidx.compose.foundation.background
-import androidx.compose.foundation.layout.Arrangement
-import androidx.compose.foundation.layout.Column
 import androidx.compose.foundation.layout.Row
-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.material3.Text
 import androidx.compose.runtime.Composable
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.unit.dp
 import androidx.hilt.navigation.compose.hiltViewModel
 import androidx.navigation.NavHostController
-import com.example.wabi.ui.theme.WabiTheme
-import com.example.wabi.view.common_elements.button.MainButton
-import com.example.wabi.view.common_elements.button.SearchButton
-import com.example.wabi.view.common_elements.textfields.CodeTextField
-import com.example.wabi.view.common_elements.textfields.MainTextField
-import com.example.wabi.view.common_elements.textfields.PasswordTextField
-import com.example.wabi.view.screens.basket.items.CostRow
 
 @Composable
 fun Basket(navController: NavHostController, vm: BasketVM = hiltViewModel()) {
-    val data = vm.data
+//        CostRow(
+//            cost = 9999999.99,
+//            linkUserBasket = "ссылка",
+//            modifier = Modifier
+//                .height(60.dp)
+//        )
 
-    Column(
-        modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Bottom
-    ) {
-        CostRow(
-            cost = 100.0,
-            linkUserBasket = "ссылка",
-            modifier = Modifier
-                .height(50.dp)
-        )
+//        Row(
+//            modifier = Modifier
+//                .fillMaxWidth()
+//                .height(120.dp)
+//                .background(color = WabiTheme.colors.singleColor),
+//            verticalAlignment = Alignment.CenterVertically,
+//            horizontalArrangement = Arrangement.SpaceAround
+//        ) {
+//            SearchButton(
+//                onClick = { /*TODO*/ },
+//                textContent = "Чужой список",
+//                enabled = true,
+//                modifier = Modifier
+//                    .weight(0.5f)
+//                    .padding(
+//                        10.dp,
+//                        10.dp
+//                    )
+//            )
+//            SearchButton(
+//                onClick = { /*TODO*/ },
+//                textContent = "Чек-лист",
+//                enabled = false,
+//                modifier = Modifier
+//                    .weight(0.5f)
+//                    .padding(
+//                        10.dp,
+//                        10.dp
+//                    )
+//            )
+//        }
 
-        Row(
-            modifier = Modifier
-                .fillMaxWidth()
-                .height(120.dp)
-                .background(color = WabiTheme.colors.singleColor),
-            verticalAlignment = Alignment.CenterVertically,
-            horizontalArrangement = Arrangement.SpaceAround
-        ) {
-            SearchButton(
-                onClick = { /*TODO*/ },
-                textContent = "Чужой список",
-                enabled = true,
-                modifier = Modifier
-                    .weight(0.5f)
-                    .padding(
-                        10.dp,
-                        10.dp
-                    )
-            )
-            SearchButton(
-                onClick = { /*TODO*/ },
-                textContent = "Чек-лист",
-                enabled = false,
-                modifier = Modifier
-                    .weight(0.5f)
-                    .padding(
-                        10.dp,
-                        10.dp
-                    )
-            )
-        }
-        CodeTextField(
-            value = data.email,
-            input = { vm.UpdateData(data.copy(email = it)) },
-        )
-        MainTextField(
-            value = data.email,
-            input = { vm.UpdateData(data.copy(email = it)) },
-            placeholder = "Почта",
-            lable = "Введите почту:",
-            trailingText = ""
-        )
-        PasswordTextField(
-            value = data.password,
-            input = { vm.UpdateData(data.copy(password = it)) },
-            placeholder = "Пароль",
-            lable = "Введите пароль:"
-        )
-        MainButton(
-            onClick = { /*TODO*/ },
-            textContent = "Далее"
-        )
+//        MainButton(
+//            onClick = { /*TODO*/ },
+//            textContent = "Далее"
+//        )
+
+    Row {
+        Text("Это корзина")
     }
+
 }

+ 1 - 20
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/BasketVM.kt

@@ -1,31 +1,12 @@
 package com.example.wabi.view.screens.basket
 
-import androidx.compose.runtime.mutableStateOf
 import androidx.lifecycle.ViewModel
-import androidx.lifecycle.viewModelScope
-import androidx.navigation.NavHostController
-import com.example.wabi.domain.network.SupabaseServiceImpl
-import com.example.wabi.model.screens.SignInState
 import dagger.hilt.android.lifecycle.HiltViewModel
-import kotlinx.coroutines.launch
 import javax.inject.Inject
 
 
 @HiltViewModel
-class BasketVM @Inject constructor(
-    private val sup: SupabaseServiceImpl
-) : ViewModel() {
+class BasketVM @Inject constructor() : ViewModel() {
 
-    private val _data = mutableStateOf(SignInState())
-    val data: SignInState get() = _data.value
 
-    fun UpdateData(newData: SignInState) {
-        _data.value = newData
-    }
-
-    fun signIn(navController: NavHostController){
-        viewModelScope.launch {
-            sup.signIn(_data.value.email,_data.value.password)
-        }
-    }
 }

+ 32 - 4
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/items/CostCounter.kt

@@ -1,33 +1,61 @@
 package com.example.wabi.view.screens.basket.items
 
+import androidx.compose.foundation.background
 import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.shape.RoundedCornerShape
 import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import com.example.wabi.ui.theme.WabiTheme
 
 @Composable
 fun CostCounter(
     cost: Double,
     modifier: Modifier = Modifier
 ) {
+    val fontSize = 15
+    val lineHeight = 15
+
     Row (
         modifier = modifier
     ){
         Box (
             modifier = Modifier
-                .weight(0.4f)
+                .weight(0.35f)
+                .background(
+                    color = WabiTheme.colors.mainColor,
+                    shape = RoundedCornerShape(topStart = 15.dp, bottomStart = 15.dp)
+                )
+                .padding(10.dp, 2.dp,0.dp, 1.5.dp),
+            contentAlignment = Alignment.Center
         ){
             Text(
-                text = "Стомимость покупки"
+                text = "Стомимость корзины",
+                style = WabiTheme.fonts.forTextField,
+                fontSize = fontSize.sp,
+                lineHeight = lineHeight.sp
             )
         }
         Box (
             modifier = Modifier
-                .weight(0.7f)
+                .weight(0.55f)
+                .background(
+                    color = WabiTheme.colors.mainColor,
+                    shape = RoundedCornerShape(topEnd = 15.dp, bottomEnd = 15.dp)
+                )
+                .padding(10.dp, 5.dp,0.dp, 5.dp),
+            contentAlignment = Alignment.Center
         ){
             Text(
-                text = "Стомимость покупки"
+                text = "~ $cost p.",
+                style = WabiTheme.fonts.forTextField,
+                fontSize = 20.sp,
+                lineHeight = lineHeight.sp
             )
         }
     }

+ 3 - 1
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/basket/items/CostRow.kt

@@ -3,6 +3,7 @@ package com.example.wabi.view.screens.basket.items
 import androidx.compose.foundation.layout.Row
 import androidx.compose.foundation.layout.padding
 import androidx.compose.runtime.Composable
+import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.unit.dp
 
@@ -11,7 +12,8 @@ fun CostRow(
     cost: Double, linkUserBasket: String, modifier: Modifier = Modifier
 ) {
     Row(
-        modifier = modifier
+        modifier = modifier,
+        verticalAlignment = Alignment.CenterVertically
     ) {
         CostCounter(
             cost,

+ 13 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/catalog/Catalog.kt

@@ -0,0 +1,13 @@
+package com.example.wabi.view.screens.catalog
+
+import androidx.compose.foundation.layout.Row
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+
+@Composable
+fun Catalog(navController: NavHostController) {
+    Row {
+        Text("Это каталог")
+    }
+}

+ 0 - 3
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/onboard/items/OnBoardState.kt

@@ -9,16 +9,13 @@ import androidx.compose.foundation.layout.fillMaxHeight
 import androidx.compose.foundation.layout.fillMaxWidth
 import androidx.compose.foundation.layout.height
 import androidx.compose.foundation.layout.padding
-import androidx.compose.foundation.shape.RoundedCornerShape
 import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
-import androidx.compose.ui.draw.clip
 import androidx.compose.ui.graphics.vector.ImageVector
 import androidx.compose.ui.res.vectorResource
 import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.em
 import com.example.wabi.model.appModels.screens.OnBoardItem
 import com.example.wabi.ui.theme.WabiTheme
 

+ 13 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/profile/Profile.kt

@@ -0,0 +1,13 @@
+package com.example.wabi.view.screens.profile
+
+import androidx.compose.foundation.layout.Row
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+
+@Composable
+fun Profile(navController: NavHostController) {
+    Row {
+        Text("Это профиль")
+    }
+}

+ 37 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signIn/SignIn.kt

@@ -0,0 +1,37 @@
+package com.example.wabi.view.screens.signIn
+
+import androidx.compose.foundation.layout.Row
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.hilt.navigation.compose.hiltViewModel
+import androidx.navigation.NavHostController
+import com.example.wabi.view.common_elements.textfields.CodeTextField
+import com.example.wabi.view.common_elements.textfields.MainTextField
+import com.example.wabi.view.common_elements.textfields.PasswordTextField
+
+@Composable
+fun SignIn(navController: NavHostController, vm: SignInViewModel = hiltViewModel()) {
+    val data = vm.data
+
+    Row {
+        Text("Это вход")
+    }
+
+    CodeTextField(
+        value = data.email,
+        input = { vm.UpdateData(data.copy(email = it)) },
+    )
+    MainTextField(
+        value = data.email,
+        input = { vm.UpdateData(data.copy(email = it)) },
+        placeholder = "Почта",
+        lable = "Введите почту:",
+        trailingText = ""
+    )
+    PasswordTextField(
+        value = data.password,
+        input = { vm.UpdateData(data.copy(password = it)) },
+        placeholder = "Пароль",
+        lable = "Введите пароль:"
+    )
+}

+ 27 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signIn/SignInViewModel.kt

@@ -0,0 +1,27 @@
+package com.example.wabi.view.screens.signIn
+
+import androidx.compose.runtime.mutableStateOf
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import androidx.navigation.NavHostController
+import com.example.wabi.domain.network.SupabaseServiceImpl
+import com.example.wabi.model.screens.SignInState
+import dagger.hilt.android.lifecycle.HiltViewModel
+import javax.inject.Inject
+import kotlinx.coroutines.launch
+
+@HiltViewModel
+class SignInViewModel @Inject constructor(private val sup: SupabaseServiceImpl) : ViewModel() {
+    private val _data = mutableStateOf(SignInState())
+    val data: SignInState get() = _data.value
+
+    fun UpdateData(newData: SignInState) {
+        _data.value = newData
+    }
+
+    fun signIn(navController: NavHostController) {
+        viewModelScope.launch {
+            sup.signIn(_data.value.email, _data.value.password)
+        }
+    }
+}

+ 14 - 0
mobile_app/wabi/app/src/main/java/com/example/wabi/view/screens/signUp/SignUp.kt

@@ -0,0 +1,14 @@
+package com.example.wabi.view.screens.signUp
+
+import androidx.compose.foundation.layout.Row
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+
+
+@Composable
+fun SignUp(navController: NavHostController) {
+    Row {
+        Text("Это регистрация")
+    }
+}

+ 1 - 2
mobile_app/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Type.kt

@@ -7,7 +7,6 @@ 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.text.style.TextDecoration
-import androidx.compose.ui.unit.TextUnit
 import androidx.compose.ui.unit.sp
 import com.example.wabi.R
 import com.example.wabi.model.appModels.system.Type
@@ -75,7 +74,7 @@ val type = Type(
         fontFamily = BalooDa2,
         fontWeight = FontWeight.Bold,
         fontSize = 20.sp,
-        lineHeight = 28.sp,
+        lineHeight = 20.sp,
     ),
     code = TextStyle(
         fontFamily = BalooDa2,