|
@@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.width
|
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
import androidx.compose.material.icons.Icons
|
|
import androidx.compose.material.icons.Icons
|
|
import androidx.compose.material.icons.filled.Person
|
|
import androidx.compose.material.icons.filled.Person
|
|
|
|
+import androidx.compose.material.icons.filled.Phone
|
|
import androidx.compose.material3.Button
|
|
import androidx.compose.material3.Button
|
|
import androidx.compose.material3.ButtonDefaults
|
|
import androidx.compose.material3.ButtonDefaults
|
|
import androidx.compose.material3.Icon
|
|
import androidx.compose.material3.Icon
|
|
@@ -84,7 +85,7 @@ fun RegistrationScreen(navController: NavHostController, viewModel: MainViewMode
|
|
"РЕГИСТРАЦИЯ",
|
|
"РЕГИСТРАЦИЯ",
|
|
color = Color.White,
|
|
color = Color.White,
|
|
modifier = Modifier.padding(bottom = 50.dp),
|
|
modifier = Modifier.padding(bottom = 50.dp),
|
|
- fontSize = 30.sp,
|
|
|
|
|
|
+ fontSize = 32.sp,
|
|
fontWeight = FontWeight.Bold,
|
|
fontWeight = FontWeight.Bold,
|
|
fontFamily = OldStandart
|
|
fontFamily = OldStandart
|
|
)
|
|
)
|
|
@@ -115,9 +116,9 @@ fun RegistrationScreen(navController: NavHostController, viewModel: MainViewMode
|
|
Button(
|
|
Button(
|
|
modifier = Modifier.padding(top = 15.dp).height(50.dp),
|
|
modifier = Modifier.padding(top = 15.dp).height(50.dp),
|
|
onClick = {
|
|
onClick = {
|
|
- if (flag.value) { viewModel.onSignUpEmail(email.value,password.value) }
|
|
|
|
|
|
+ if (flag.value) { viewModel.onSignUpEmail(email.value,password.value);
|
|
|
|
+ navController.navigate("RegistrationScreen2")}
|
|
else { Toast.makeText(context, "Пароли не совпадают", Toast.LENGTH_SHORT).show() }
|
|
else { Toast.makeText(context, "Пароли не совпадают", Toast.LENGTH_SHORT).show() }
|
|
- navController.navigate("RegistrationScreen2")
|
|
|
|
},
|
|
},
|
|
shape = RoundedCornerShape(23.dp),
|
|
shape = RoundedCornerShape(23.dp),
|
|
border = BorderStroke(1.dp, Color(255,215,0)),
|
|
border = BorderStroke(1.dp, Color(255,215,0)),
|
|
@@ -256,7 +257,7 @@ fun RegistrationScreen2(navController: NavHostController, viewModel: MainViewMod
|
|
.fillMaxWidth(1f)
|
|
.fillMaxWidth(1f)
|
|
.background(Color(0XFFF5F5F9))
|
|
.background(Color(0XFFF5F5F9))
|
|
.height(height = 56.dp)
|
|
.height(height = 56.dp)
|
|
- .width(width = 320.dp),
|
|
|
|
|
|
+ .width(width = 200.dp),
|
|
isError = surnameFlag.value,
|
|
isError = surnameFlag.value,
|
|
placeholder = {
|
|
placeholder = {
|
|
Text(
|
|
Text(
|
|
@@ -316,8 +317,8 @@ fun RegistrationScreen2(navController: NavHostController, viewModel: MainViewMod
|
|
|
|
|
|
}
|
|
}
|
|
Column {
|
|
Column {
|
|
- OutlinedTextField(value = phoneNumber.value, onValueChange = { it -> name.value = it },
|
|
|
|
- leadingIcon = { Icon(Icons.Filled.Person, contentDescription = "Имя") },
|
|
|
|
|
|
+ OutlinedTextField(value = phoneNumber.value, onValueChange = { it -> phoneNumber.value = it },
|
|
|
|
+ leadingIcon = { Icon(Icons.Filled.Phone, contentDescription = "Номер телефона") },
|
|
colors = TextFieldDefaults.colors(
|
|
colors = TextFieldDefaults.colors(
|
|
focusedContainerColor = Color(0XFFF5F5F9),
|
|
focusedContainerColor = Color(0XFFF5F5F9),
|
|
focusedIndicatorColor = Color(0xFFEBEBEB),
|
|
focusedIndicatorColor = Color(0xFFEBEBEB),
|
|
@@ -345,11 +346,11 @@ fun RegistrationScreen2(navController: NavHostController, viewModel: MainViewMod
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
- if (name.value.isEmpty()) {
|
|
|
|
- nameFlag.value = true
|
|
|
|
|
|
+ if (phoneNumber.value.isEmpty()) {
|
|
|
|
+ phoneFlag.value = true
|
|
Text("Введите номер телефона", color = Color.Red, fontSize = 10.sp)
|
|
Text("Введите номер телефона", color = Color.Red, fontSize = 10.sp)
|
|
} else {
|
|
} else {
|
|
- nameFlag.value = false
|
|
|
|
|
|
+ phoneFlag.value = false
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|