群聊信息;更改密码UI调整
This commit is contained in:
@@ -17,9 +17,11 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import com.aiosman.ravenow.LocalAppTheme
|
import com.aiosman.ravenow.LocalAppTheme
|
||||||
import com.aiosman.ravenow.LocalNavController
|
import com.aiosman.ravenow.LocalNavController
|
||||||
|
import com.aiosman.ravenow.R
|
||||||
import com.aiosman.ravenow.data.AccountService
|
import com.aiosman.ravenow.data.AccountService
|
||||||
import com.aiosman.ravenow.data.AccountServiceImpl
|
import com.aiosman.ravenow.data.AccountServiceImpl
|
||||||
import com.aiosman.ravenow.data.ServiceException
|
import com.aiosman.ravenow.data.ServiceException
|
||||||
@@ -92,7 +94,7 @@ fun ChangePasswordScreen() {
|
|||||||
modifier = Modifier.padding(horizontal = 24.dp, vertical = 16.dp)
|
modifier = Modifier.padding(horizontal = 24.dp, vertical = 16.dp)
|
||||||
) {
|
) {
|
||||||
NoticeScreenHeader(
|
NoticeScreenHeader(
|
||||||
title = "Change password",
|
title = stringResource(R.string.change_password),
|
||||||
moreIcon = false
|
moreIcon = false
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -108,8 +110,8 @@ fun ChangePasswordScreen() {
|
|||||||
text = currentPassword,
|
text = currentPassword,
|
||||||
onValueChange = { currentPassword = it },
|
onValueChange = { currentPassword = it },
|
||||||
password = true,
|
password = true,
|
||||||
label = "Current password",
|
label = stringResource(R.string.current_password),
|
||||||
hint = "Enter your current password",
|
hint = stringResource(R.string.current_password_tip5),
|
||||||
error = oldPasswordError
|
error = oldPasswordError
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
@@ -117,8 +119,8 @@ fun ChangePasswordScreen() {
|
|||||||
text = newPassword,
|
text = newPassword,
|
||||||
onValueChange = { newPassword = it },
|
onValueChange = { newPassword = it },
|
||||||
password = true,
|
password = true,
|
||||||
label = "New password",
|
label = stringResource(R.string.new_password),
|
||||||
hint = "Enter your new password",
|
hint = stringResource(R.string.new_password),
|
||||||
error = passwordError
|
error = passwordError
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
@@ -126,15 +128,15 @@ fun ChangePasswordScreen() {
|
|||||||
text = confirmPassword,
|
text = confirmPassword,
|
||||||
onValueChange = { confirmPassword = it },
|
onValueChange = { confirmPassword = it },
|
||||||
password = true,
|
password = true,
|
||||||
label = "Confirm new password",
|
label = stringResource(R.string.confirm_new_password_tip1),
|
||||||
hint = "Enter your new password again",
|
hint = stringResource(R.string.new_password_tip1),
|
||||||
error = confirmPasswordError
|
error = confirmPasswordError
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(50.dp))
|
Spacer(modifier = Modifier.height(50.dp))
|
||||||
ActionButton(
|
ActionButton(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(345.dp),
|
.width(345.dp),
|
||||||
text = "Let's Ride",
|
text = stringResource(R.string.lets_ride_upper),
|
||||||
) {
|
) {
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ fun GroupChatScreen(groupId: String,name: String,avatar: String,) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Box {
|
Box {
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.drawable.rider_pro_more_horizon),
|
painter = painterResource(R.drawable.rider_pro_more_horizon),
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ fun GroupChatInfoScreen(groupId: String) {
|
|||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
colorFilter = ColorFilter.tint(AppColors.text)
|
colorFilter = ColorFilter.tint(AppColors.text)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(138.dp))
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ object PasswordValidator {
|
|||||||
return when {
|
return when {
|
||||||
currentPassword.isEmpty() -> ValidationResult(
|
currentPassword.isEmpty() -> ValidationResult(
|
||||||
false,
|
false,
|
||||||
"Please enter your current password"
|
context.getString(R.string.current_password_tip1)
|
||||||
)
|
)
|
||||||
|
|
||||||
currentPassword.length > MAX_PASSWORD_LENGTH -> ValidationResult(
|
currentPassword.length > MAX_PASSWORD_LENGTH -> ValidationResult(
|
||||||
|
|||||||
Reference in New Issue
Block a user