mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
MESSENGER-5271 crosssigning - verification request on button click
This commit is contained in:
@@ -321,6 +321,7 @@
|
||||
"key_verification_verified_this_session_information" = "Deine Anmeldung wurde erfolgreich verifiziert.";
|
||||
"key_verification_verified_other_session_information" = "Deine Anmeldung wurde erfolgreich verifiziert.";
|
||||
"key_verification_tile_request_alert_title" = "Verifizierung angefragt";
|
||||
"device_verification_crosssigning_wait_recover_secrets" = "Mit anderem Gerät verifizieren";
|
||||
|
||||
// MARK: - Secrets Recovery
|
||||
|
||||
|
||||
@@ -242,6 +242,8 @@
|
||||
"key_verification_verify_qr_code_information_other_device" = "Scan code either with this device or another.";
|
||||
"key_verification_verify_qr_code_cannot_scan_action" = "Compare with emojis instead";
|
||||
"key_verification_tile_request_alert_title" = "Verification requested";
|
||||
"device_verification_crosssigning_wait_recover_secrets" = "Verify with other device";
|
||||
|
||||
|
||||
"room_participants_security_information_room_not_encrypted" = "Messages in this room are not end-to-end encrypted.";
|
||||
"room_participants_security_information_room_not_encrypted_for_dm" = "Messages here are not end-to-end encrypted.";
|
||||
|
||||
@@ -727,6 +727,10 @@ public class BWIL10n: NSObject {
|
||||
public static var deviceVerificationCancelled: String {
|
||||
return BWIL10n.tr("Bwi", "device_verification_cancelled")
|
||||
}
|
||||
/// Mit anderem Gerät verifizieren
|
||||
public static var deviceVerificationCrosssigningWaitRecoverSecrets: String {
|
||||
return BWIL10n.tr("Bwi", "device_verification_crosssigning_wait_recover_secrets")
|
||||
}
|
||||
/// Anmeldung verifizieren
|
||||
public static var deviceVerificationOtherLoginVerifyWaitTitle: String {
|
||||
return BWIL10n.tr("Bwi", "device_verification_other_login_verify_wait_title")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="79A-qb-tmk">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="79A-qb-tmk">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -17,13 +17,13 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="asO-rj-82y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tIM-sl-gwE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="562"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="555.5"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IlB-Ch-LEo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="562"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="555.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Open Element on your other device" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="aOD-RJ-1qU">
|
||||
<rect key="frame" x="20" y="20" width="335" height="67"/>
|
||||
@@ -32,16 +32,16 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d5Y-pj-XsI">
|
||||
<rect key="frame" x="20" y="117" width="335" height="84"/>
|
||||
<string key="text">You need to verify this session in order to read your secure message history.
|
||||
|
||||
Open Element on one of your other devices and follow the instructions.</string>
|
||||
<rect key="frame" x="20" y="117" width="335" height="33.5"/>
|
||||
<string key="text" base64-UTF8="YES">
|
||||
Cg
|
||||
</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="ANK-XS-dY7">
|
||||
<rect key="frame" x="27.5" y="241" width="320" height="48"/>
|
||||
<rect key="frame" x="27.5" y="190.5" width="320" height="48"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="3at-ql-vhb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="48"/>
|
||||
@@ -73,12 +73,25 @@ Open Element on one of your other devices and follow the instructions.</string>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="8oJ-o6-DLK">
|
||||
<rect key="frame" x="20" y="329" width="335" height="233"/>
|
||||
<rect key="frame" x="20" y="278.5" width="335" height="277"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PGj-76-CCf" customClass="RoundedButton" customModule="Element" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="Yqo-MP-G3l"/>
|
||||
</constraints>
|
||||
<inset key="contentEdgeInsets" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
|
||||
<state key="normal">
|
||||
<color key="titleColor" red="0.01176470588" green="0.70196078429999997" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="crossSigningButtonAction:" destination="79A-qb-tmk" eventType="touchUpInside" id="QTT-hh-LDs"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dXT-cL-ukJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="335" height="114.5"/>
|
||||
<rect key="frame" x="0.0" y="44" width="335" height="114.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Checking for other verification capabilities ..." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A4x-sK-d5C">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A4x-sK-d5C">
|
||||
<rect key="frame" x="20" y="10" width="295" height="38.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
@@ -100,9 +113,9 @@ Open Element on one of your other devices and follow the instructions.</string>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nf8-Ye-b9r">
|
||||
<rect key="frame" x="0.0" y="114.5" width="335" height="118.5"/>
|
||||
<rect key="frame" x="0.0" y="158.5" width="335" height="118.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="If you can't accessing an existing session" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ou-cM-K9C">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ou-cM-K9C">
|
||||
<rect key="frame" x="20" y="10" width="295" height="24.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
@@ -114,7 +127,7 @@ Open Element on one of your other devices and follow the instructions.</string>
|
||||
<constraint firstAttribute="height" constant="44" id="7ws-Nc-I7y"/>
|
||||
</constraints>
|
||||
<inset key="contentEdgeInsets" minX="10" minY="0.0" maxX="10" maxY="0.0"/>
|
||||
<state key="normal" title="Use a recovery passphrase or key">
|
||||
<state key="normal">
|
||||
<color key="titleColor" red="0.01176470588" green="0.70196078429999997" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
@@ -188,6 +201,7 @@ Open Element on one of your other devices and follow the instructions.</string>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="crosssigningButton" destination="PGj-76-CCf" id="k9I-6N-4Bm"/>
|
||||
<outlet property="desktopClientImageView" destination="nrB-Kj-4zE" id="yl0-Ju-luK"/>
|
||||
<outlet property="informationLabel" destination="d5Y-pj-XsI" id="TMb-bc-58a"/>
|
||||
<outlet property="mobileClientImageView" destination="P0P-X4-uSQ" id="WtT-ix-yq8"/>
|
||||
|
||||
@@ -41,6 +41,8 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
@IBOutlet private weak var recoverSecretsAvailabilityActivityIndicatorView: UIActivityIndicatorView!
|
||||
@IBOutlet private weak var recoverSecretsContainerView: UIView!
|
||||
@IBOutlet private weak var recoverSecretsButton: RoundedButton!
|
||||
// bwi #5271 don't do crosssigning request at view start but as action on button click
|
||||
@IBOutlet private weak var crosssigningButton: RoundedButton!
|
||||
@IBOutlet private weak var recoverSecretsAdditionalInformationLabel: UILabel!
|
||||
|
||||
// MARK: Private
|
||||
@@ -77,12 +79,10 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
self.update(theme: self.theme)
|
||||
}
|
||||
|
||||
// BWI resend verificationrequest after cancling QR Code crosssigning
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
self.viewModel.viewDelegate = self
|
||||
self.viewModel.process(viewAction: .loadData)
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
self.recoverSecretsAvailabilityActivityIndicatorView.color = theme.tintColor
|
||||
// BWI: #4966
|
||||
self.recoverSecretsButton.update(theme: theme)
|
||||
self.crosssigningButton.update(theme: theme)
|
||||
}
|
||||
|
||||
private func registerThemeServiceDidChangeThemeNotification() {
|
||||
@@ -140,8 +141,13 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
self.mobileClientImageView.image = Asset.Images.smartphone.image.withRenderingMode(.alwaysTemplate)
|
||||
|
||||
self.recoverSecretsAdditionalInformationLabel.text = BWIL10n.deviceVerificationSelfVerifyWaitRecoverSecretsAdditionalInformation
|
||||
|
||||
self.recoverSecretsButton.setTitle(BWIL10n.deviceVerificationSelfVerifyWaitRecoverSecretsWithPassphrase, for: .normal)
|
||||
self.crosssigningButton.setTitle(BWIL10n.deviceVerificationCrosssigningWaitRecoverSecrets, for: .normal)
|
||||
|
||||
self.recoverSecretsAvailabilityLoadingContainerView.isHidden = true
|
||||
}
|
||||
|
||||
|
||||
private func render(viewState: KeyVerificationSelfVerifyWaitViewState) {
|
||||
switch viewState {
|
||||
case .loading:
|
||||
@@ -237,6 +243,10 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
@IBAction private func recoverSecretsButtonAction(_ sender: Any) {
|
||||
self.viewModel.process(viewAction: .recoverSecrets)
|
||||
}
|
||||
|
||||
@IBAction private func crossSigningButtonAction(_ sender: Any) {
|
||||
self.viewModel.process(viewAction: .loadData)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user