add change password

This commit is contained in:
cheykrym 2025-10-07 00:59:34 +03:00
parent 8cc44b06cf
commit 728bea60c2
2 changed files with 13 additions and 0 deletions

View File

@ -234,6 +234,9 @@
}, },
"Избранные сообщения" : { "Избранные сообщения" : {
},
"Изменение пароля" : {
}, },
"Инвайт-код (необязательно)" : { "Инвайт-код (необязательно)" : {
"comment" : "Инвайт-код", "comment" : "Инвайт-код",

View File

@ -58,6 +58,9 @@ struct ChangePasswordView: View {
.foregroundColor(isPasswordConfirmValid ? .green : .red) .foregroundColor(isPasswordConfirmValid ? .green : .red)
} }
} }
} }
var isButtonEnabled: Bool { var isButtonEnabled: Bool {
@ -71,9 +74,16 @@ struct ChangePasswordView: View {
print("confirmPassword: \(confirmPassword)") print("confirmPassword: \(confirmPassword)")
}) { }) {
Text(NSLocalizedString("Применить", comment: "")) Text(NSLocalizedString("Применить", comment: ""))
.foregroundColor(.white)
.padding()
.frame(maxWidth: .infinity)
.background(isButtonEnabled ? Color.blue : Color.gray) .background(isButtonEnabled ? Color.blue : Color.gray)
.cornerRadius(8)
} }
.disabled(!isButtonEnabled) .disabled(!isButtonEnabled)
.buttonStyle(PlainButtonStyle())
.listRowInsets(EdgeInsets())
.listRowBackground(Color.clear)
} }
.navigationTitle(NSLocalizedString("Изменение пароля", comment: "")) .navigationTitle(NSLocalizedString("Изменение пароля", comment: ""))
} }