浏览代码

second 3 commit

unknown 1 月之前
父节点
当前提交
7d010974cf

+ 2 - 1
app/src/main/java/com/example/firstprojectsh/main/MainActivity.kt

@@ -18,6 +18,7 @@ import androidx.lifecycle.ViewModel
 import androidx.lifecycle.viewModelScope
 import com.example.firstprojectsh.domain.Constants
 import com.example.firstprojectsh.main.components.CountriesList
+import com.example.firstprojectsh.main.components.Navigation
 import com.example.firstprojectsh.main.components.auth
 import com.example.firstprojectsh.ui.theme.FirstProjectSHTheme
 import io.github.jan.supabase.gotrue.auth
@@ -35,7 +36,7 @@ class MainActivity : ComponentActivity() {
                     verticalArrangement = Arrangement.Center,
                     horizontalAlignment = Alignment.CenterHorizontally
                 ) {
-                    auth()
+                    Navigation()
 //                  CountriesList()
 
                 }

+ 4 - 1
app/src/main/java/com/example/firstprojectsh/main/components/auth.kt

@@ -3,6 +3,7 @@ import android.annotation.SuppressLint
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Column
 import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
 import androidx.compose.material3.Button
 import androidx.compose.material3.ExperimentalMaterial3Api
 import androidx.compose.material3.Icon
@@ -41,12 +42,14 @@ fun auth(navController: NavHostController) {
 
     ) {
         TextField(
+
             value = email.value,
             textStyle = TextStyle(fontSize = 25.sp),
             onValueChange = { newText -> email.value = newText }
         )
         var passwordVisibility: Boolean by remember { mutableStateOf(false) }
         TextField(value = password.value,
+
             visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
             leadingIcon = {
                 IconButton(onClick = {
@@ -77,7 +80,7 @@ fun auth(navController: NavHostController) {
         }){
             Text("Регистрация", fontSize = 25.sp)
         }
-        Button(onClick = {navController.navigate("ConfirmationEmail ")}){
+        Button(onClick = {navController.navigate("CountriesList")}){
             Text("как гость", fontSize = 25.sp)
         }
     }