mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Key verification: Update verified screen UI.
This commit is contained in:
+17
-21
@@ -30,11 +30,8 @@ final class KeyVerificationVerifiedViewController: UIViewController {
|
||||
// MARK: Outlets
|
||||
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet private weak var description1Label: UILabel!
|
||||
@IBOutlet private weak var description2Label: UILabel!
|
||||
|
||||
@IBOutlet private weak var okButtonBackgroundView: UIView!
|
||||
@IBOutlet private weak var okButton: UIButton!
|
||||
@IBOutlet private weak var informationLabel: UILabel!
|
||||
@IBOutlet private weak var doneButton: RoundedButton!
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@@ -83,26 +80,28 @@ final class KeyVerificationVerifiedViewController: UIViewController {
|
||||
|
||||
private func setupViews() {
|
||||
let bodyTitle: String
|
||||
let descriptionTextPart1: String
|
||||
let descriptionTextPart2: String
|
||||
let informationText: String
|
||||
|
||||
switch self.verificationKind {
|
||||
case .otherSession, .thisSession, .newSession:
|
||||
case .otherSession:
|
||||
bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
|
||||
descriptionTextPart1 = VectorL10n.deviceVerificationVerifiedDescription1
|
||||
descriptionTextPart2 = VectorL10n.deviceVerificationVerifiedDescription2
|
||||
informationText = VectorL10n.keyVerificationVerifiedOtherSessionInformation
|
||||
case .newSession:
|
||||
bodyTitle = VectorL10n.keyVerificationVerifiedNewSessionTitle
|
||||
informationText = VectorL10n.keyVerificationVerifiedNewSessionInformation
|
||||
case .thisSession:
|
||||
bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
|
||||
informationText = VectorL10n.keyVerificationVerifiedThisSessionInformation
|
||||
case .user:
|
||||
bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
|
||||
descriptionTextPart1 = VectorL10n.keyVerificationVerifiedUserDescription1
|
||||
descriptionTextPart2 = VectorL10n.keyVerificationVerifiedUserDescription2
|
||||
informationText = VectorL10n.keyVerificationVerifiedUserInformation
|
||||
}
|
||||
|
||||
self.title = self.verificationKind.verificationTitle
|
||||
self.titleLabel.text = bodyTitle
|
||||
self.description1Label.text = descriptionTextPart1
|
||||
self.description2Label.text = descriptionTextPart2
|
||||
self.informationLabel.text = informationText
|
||||
|
||||
self.okButton.setTitle(VectorL10n.deviceVerificationVerifiedGotItButton, for: .normal)
|
||||
self.doneButton.setTitle(VectorL10n.deviceVerificationVerifiedGotItButton, for: .normal)
|
||||
}
|
||||
|
||||
private func update(theme: Theme) {
|
||||
@@ -115,11 +114,8 @@ final class KeyVerificationVerifiedViewController: UIViewController {
|
||||
}
|
||||
|
||||
self.titleLabel.textColor = theme.textPrimaryColor
|
||||
self.description1Label.textColor = theme.textPrimaryColor
|
||||
self.description2Label.textColor = theme.textPrimaryColor
|
||||
|
||||
self.okButtonBackgroundView.backgroundColor = theme.backgroundColor
|
||||
theme.applyStyle(onButton: self.okButton)
|
||||
self.informationLabel.textColor = theme.textPrimaryColor
|
||||
self.doneButton.update(theme: theme)
|
||||
}
|
||||
|
||||
private func registerThemeServiceDidChangeThemeNotification() {
|
||||
@@ -132,7 +128,7 @@ final class KeyVerificationVerifiedViewController: UIViewController {
|
||||
self.update(theme: ThemeService.shared().theme)
|
||||
}
|
||||
|
||||
@IBAction private func validateButtonAction(_ sender: Any) {
|
||||
@IBAction private func doneButtonAction(_ sender: Any) {
|
||||
self.delegate?.keyVerificationVerifiedViewControllerDidTapSetupAction(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user