mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
KeyVerificationVerifyBySASViewController: Update wording and UI.
This commit is contained in:
+27
-16
@@ -33,9 +33,12 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
@IBOutlet private weak var decimalLabel: UILabel!
|
||||
@IBOutlet private weak var emojisCollectionView: UICollectionView!
|
||||
@IBOutlet private weak var waitingPartnerLabel: UILabel!
|
||||
@IBOutlet private weak var continueButtonBackgroundView: UIView!
|
||||
@IBOutlet private weak var continueButton: UIButton!
|
||||
|
||||
|
||||
@IBOutlet private weak var buttonsStackView: UIStackView!
|
||||
@IBOutlet private weak var cancelButton: RoundedButton!
|
||||
@IBOutlet private weak var validateButton: RoundedButton!
|
||||
@IBOutlet private weak var additionalInformationLabel: UILabel!
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private var viewModel: KeyVerificationVerifyBySASViewModelType!
|
||||
@@ -99,8 +102,8 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
self.decimalLabel.textColor = theme.textPrimaryColor
|
||||
self.waitingPartnerLabel.textColor = theme.textPrimaryColor
|
||||
|
||||
self.continueButtonBackgroundView.backgroundColor = theme.backgroundColor
|
||||
theme.applyStyle(onButton: self.continueButton)
|
||||
self.cancelButton.update(theme: theme)
|
||||
self.validateButton.update(theme: theme)
|
||||
|
||||
emojisCollectionView.reloadData()
|
||||
}
|
||||
@@ -115,7 +118,7 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
|
||||
private func setupViews() {
|
||||
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.cancel, style: .plain) { [weak self] in
|
||||
self?.cancelButtonAction()
|
||||
self?.cancelAction()
|
||||
}
|
||||
|
||||
self.navigationItem.rightBarButtonItem = cancelBarButtonItem
|
||||
@@ -135,10 +138,10 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
let adviceText: String
|
||||
|
||||
if isVerificationByEmoji {
|
||||
instructionText = VectorL10n.keyVerificationVerifyTitleEmoji
|
||||
instructionText = VectorL10n.keyVerificationVerifySasTitleEmoji
|
||||
adviceText = VectorL10n.deviceVerificationSecurityAdviceEmoji
|
||||
} else {
|
||||
instructionText = VectorL10n.keyVerificationVerifyTitleNumber
|
||||
instructionText = VectorL10n.keyVerificationVerifySasTitleNumber
|
||||
adviceText = VectorL10n.deviceVerificationSecurityAdviceNumber
|
||||
}
|
||||
|
||||
@@ -149,7 +152,11 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
|
||||
self.waitingPartnerLabel.isHidden = true
|
||||
|
||||
self.continueButton.setTitle(VectorL10n.continue, for: .normal)
|
||||
self.cancelButton.setTitle(VectorL10n.keyVerificationVerifySasCancelAction, for: .normal)
|
||||
self.cancelButton.actionStyle = .cancel
|
||||
self.validateButton.setTitle(VectorL10n.keyVerificationVerifySasValidateAction, for: .normal)
|
||||
|
||||
self.additionalInformationLabel.text = VectorL10n.keyVerificationVerifySasAdditionalInformation
|
||||
}
|
||||
|
||||
private func render(viewState: KeyVerificationVerifyViewState) {
|
||||
@@ -173,8 +180,8 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
|
||||
private func renderVerified() {
|
||||
self.activityPresenter.removeCurrentActivityIndicator(animated: true)
|
||||
|
||||
self.continueButtonBackgroundView.isHidden = true
|
||||
|
||||
self.buttonsStackView.isHidden = true
|
||||
self.waitingPartnerLabel.isHidden = false
|
||||
}
|
||||
|
||||
@@ -206,13 +213,17 @@ final class KeyVerificationVerifyBySASViewController: UIViewController {
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@IBAction private func continueButtonAction(_ sender: Any) {
|
||||
self.viewModel.process(viewAction: .confirm)
|
||||
}
|
||||
|
||||
private func cancelButtonAction() {
|
||||
private func cancelAction() {
|
||||
self.viewModel.process(viewAction: .cancel)
|
||||
}
|
||||
|
||||
@IBAction private func cancelButtonAction(_ sender: Any) {
|
||||
self.cancelAction()
|
||||
}
|
||||
|
||||
@IBAction private func validateButtonAction(_ sender: Any) {
|
||||
self.viewModel.process(viewAction: .confirm)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user