mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
MESSENGER-2762 Initial Merge
This commit is contained in:
+13
-1
@@ -2,6 +2,7 @@
|
||||
// $ createScreen.sh KeyVerification KeyVerificationSelfVerifyWait
|
||||
/*
|
||||
Copyright 2020 New Vector Ltd
|
||||
Copyright (c) 2021 BWI GmbH
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -54,7 +55,18 @@ final class KeyVerificationSelfVerifyWaitCoordinator: KeyVerificationSelfVerifyW
|
||||
}
|
||||
|
||||
func toPresentable() -> UIViewController {
|
||||
return self.keyVerificationSelfVerifyWaitViewController
|
||||
let controller = self.keyVerificationSelfVerifyWaitViewController
|
||||
|
||||
// If the flow is not cancellable, run it fullscreen
|
||||
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession {
|
||||
if session.homeserverWellknown.backupRequired() {
|
||||
if #available(iOS 13.0, *) {
|
||||
controller.modalPresentationStyle = .fullScreen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+66
-67
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" 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="17506" 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="16087"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
@@ -20,72 +20,77 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tIM-sl-gwE">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="518.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="449.5"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IlB-Ch-LEo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="518.5"/>
|
||||
<rect key="frame" x="7.5" y="0.0" width="360" height="449.5"/>
|
||||
<subviews>
|
||||
<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="20" width="335" height="84"/>
|
||||
<string key="text">Verify this session from one of your others sessions, granting it access to encrypted messages.
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="mbV-qL-iJd">
|
||||
<rect key="frame" x="20" y="20" width="320" height="186.5"/>
|
||||
<subviews>
|
||||
<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="0.0" y="0.0" width="320" height="84"/>
|
||||
<string key="text">Verify this session from one of your others sessions, granting it access to encrypted messages.
|
||||
|
||||
Use the latest Riot on your other devices:</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="144" 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"/>
|
||||
<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="0.0" y="104" width="320" height="48"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="monitor" translatesAutoresizingMaskIntoConstraints="NO" id="nrB-Kj-4zE">
|
||||
<rect key="frame" x="56" y="0.0" width="48" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="F2W-zC-UJo"/>
|
||||
<constraint firstAttribute="width" secondItem="nrB-Kj-4zE" secondAttribute="height" multiplier="1:1" id="TOT-bj-1W4"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="coY-7W-lY7">
|
||||
<rect key="frame" x="160" y="0.0" width="160" height="48"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="smartphone" translatesAutoresizingMaskIntoConstraints="NO" id="P0P-X4-uSQ">
|
||||
<rect key="frame" x="56" y="0.0" width="48" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="4NO-k7-6iK"/>
|
||||
<constraint firstAttribute="width" secondItem="P0P-X4-uSQ" secondAttribute="height" multiplier="1:1" id="AZP-GN-y8E"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<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"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="monitor" translatesAutoresizingMaskIntoConstraints="NO" id="nrB-Kj-4zE">
|
||||
<rect key="frame" x="56" y="0.0" width="48" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" id="F2W-zC-UJo"/>
|
||||
<constraint firstAttribute="width" secondItem="nrB-Kj-4zE" secondAttribute="height" multiplier="1:1" id="TOT-bj-1W4"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="coY-7W-lY7">
|
||||
<rect key="frame" x="160" y="0.0" width="160" height="48"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="smartphone" translatesAutoresizingMaskIntoConstraints="NO" id="P0P-X4-uSQ">
|
||||
<rect key="frame" x="56" y="0.0" width="48" height="48"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="48" identifier="mobileIconHeightConstraint" id="4NO-k7-6iK"/>
|
||||
<constraint firstAttribute="width" secondItem="P0P-X4-uSQ" secondAttribute="height" multiplier="1:1" id="AZP-GN-y8E"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="320" id="TyM-5Y-YSw"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="or another cross-signing capable Matrix client" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rFM-AQ-wAB">
|
||||
<rect key="frame" x="0.0" y="172" width="320" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="320" id="TyM-5Y-YSw"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="This works with Element and other cross-signing capable Matrix clients." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LnW-1H-Ltq">
|
||||
<rect key="frame" x="20" y="232" width="335" height="33.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="8oJ-o6-DLK">
|
||||
<rect key="frame" x="20" y="285.5" width="335" height="233"/>
|
||||
<rect key="frame" x="15" y="226.5" width="330" height="223"/>
|
||||
<subviews>
|
||||
<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="0.0" width="330" 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">
|
||||
<rect key="frame" x="20" y="10" width="295" height="38.5"/>
|
||||
<rect key="frame" x="20" y="10" width="290" height="38.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<activityIndicatorView opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="esP-Lt-anU">
|
||||
<rect key="frame" x="0.0" y="64.5" width="335" height="20"/>
|
||||
<rect key="frame" x="0.0" y="64.5" width="330" height="20"/>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
@@ -100,10 +105,10 @@ Use the latest Riot on your other devices:</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="114.5" width="330" height="108.5"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OEt-k0-vgM" customClass="RoundedButton" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="10" width="335" height="44"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="OEt-k0-vgM" customClass="RoundedButton" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="10" width="330" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="7ws-Nc-I7y"/>
|
||||
</constraints>
|
||||
@@ -116,7 +121,7 @@ Use the latest Riot on your other devices:</string>
|
||||
</connections>
|
||||
</button>
|
||||
<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">
|
||||
<rect key="frame" x="20" y="64" width="295" height="24.5"/>
|
||||
<rect key="frame" x="20" y="64" width="290" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -141,21 +146,14 @@ Use the latest Riot on your other devices:</string>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="d5Y-pj-XsI" secondAttribute="trailing" constant="20" id="3Mi-wg-su3"/>
|
||||
<constraint firstAttribute="height" priority="250" id="72E-My-WHK"/>
|
||||
<constraint firstItem="ANK-XS-dY7" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="IlB-Ch-LEo" secondAttribute="leading" id="9BR-a1-3By"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8oJ-o6-DLK" secondAttribute="bottom" id="CB2-Nd-n2g"/>
|
||||
<constraint firstItem="LnW-1H-Ltq" firstAttribute="top" secondItem="ANK-XS-dY7" secondAttribute="bottom" constant="40" id="Mph-SR-U7u"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LnW-1H-Ltq" secondAttribute="trailing" constant="20" id="NZH-JW-JVA"/>
|
||||
<constraint firstItem="d5Y-pj-XsI" firstAttribute="leading" secondItem="IlB-Ch-LEo" secondAttribute="leading" constant="20" id="Okc-DX-xdE"/>
|
||||
<constraint firstItem="d5Y-pj-XsI" firstAttribute="top" secondItem="IlB-Ch-LEo" secondAttribute="top" constant="20" id="Pkt-ox-zZs"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ANK-XS-dY7" secondAttribute="trailing" id="RQI-kF-Z1h"/>
|
||||
<constraint firstItem="8oJ-o6-DLK" firstAttribute="leading" secondItem="IlB-Ch-LEo" secondAttribute="leading" constant="20" id="RtP-rm-bjH"/>
|
||||
<constraint firstItem="LnW-1H-Ltq" firstAttribute="leading" secondItem="IlB-Ch-LEo" secondAttribute="leading" constant="20" id="VOi-rz-Qf1"/>
|
||||
<constraint firstItem="ANK-XS-dY7" firstAttribute="top" secondItem="d5Y-pj-XsI" secondAttribute="bottom" constant="40" id="gnp-AK-DYa"/>
|
||||
<constraint firstItem="ANK-XS-dY7" firstAttribute="centerX" secondItem="IlB-Ch-LEo" secondAttribute="centerX" id="nEo-IT-GtP"/>
|
||||
<constraint firstItem="8oJ-o6-DLK" firstAttribute="top" secondItem="LnW-1H-Ltq" secondAttribute="bottom" constant="20" id="tLd-x1-rOB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8oJ-o6-DLK" secondAttribute="trailing" constant="20" id="vev-7p-7ua"/>
|
||||
<constraint firstItem="8oJ-o6-DLK" firstAttribute="leading" secondItem="IlB-Ch-LEo" secondAttribute="leading" constant="15" id="RtP-rm-bjH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="mbV-qL-iJd" secondAttribute="trailing" constant="20" id="XtF-Um-cec"/>
|
||||
<constraint firstItem="8oJ-o6-DLK" firstAttribute="top" secondItem="mbV-qL-iJd" secondAttribute="bottom" constant="20" id="dvv-3U-uH4"/>
|
||||
<constraint firstItem="mbV-qL-iJd" firstAttribute="leading" secondItem="IlB-Ch-LEo" secondAttribute="leading" constant="20" id="gnZ-Eh-51B"/>
|
||||
<constraint firstItem="mbV-qL-iJd" firstAttribute="top" secondItem="IlB-Ch-LEo" secondAttribute="top" constant="20" id="oFW-1w-Ilg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8oJ-o6-DLK" secondAttribute="trailing" constant="15" id="vev-7p-7ua"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
@@ -178,6 +176,7 @@ Use the latest Riot on your other devices:</string>
|
||||
</constraints>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="GnW-bb-rsL"/>
|
||||
<color key="backgroundColor" red="0.94509803920000002" green="0.96078431369999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="asO-rj-82y" firstAttribute="trailing" secondItem="GnW-bb-rsL" secondAttribute="trailing" id="Isw-tg-7go"/>
|
||||
@@ -185,11 +184,11 @@ Use the latest Riot on your other devices:</string>
|
||||
<constraint firstItem="GnW-bb-rsL" firstAttribute="top" secondItem="asO-rj-82y" secondAttribute="top" id="b3e-2d-oiV"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="asO-rj-82y" secondAttribute="bottom" id="wMk-Oq-DwP"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="GnW-bb-rsL"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="additionalInformationLabel" destination="LnW-1H-Ltq" id="TJS-GC-ABf"/>
|
||||
<outlet property="additionalInformationLabel" destination="rFM-AQ-wAB" id="TDZ-Xd-gP1"/>
|
||||
<outlet property="desktopClientImageView" destination="nrB-Kj-4zE" id="yl0-Ju-luK"/>
|
||||
<outlet property="iconSymbolTextStackView" destination="3at-ql-vhb" id="Utu-Mk-UvU"/>
|
||||
<outlet property="informationLabel" destination="d5Y-pj-XsI" id="TMb-bc-58a"/>
|
||||
<outlet property="mobileClientImageView" destination="P0P-X4-uSQ" id="WtT-ix-yq8"/>
|
||||
<outlet property="recoverSecretsAdditionalInformationLabel" destination="4Ou-cM-K9C" id="80N-lF-x2L"/>
|
||||
|
||||
+38
-9
@@ -2,6 +2,7 @@
|
||||
// $ createScreen.sh KeyVerification KeyVerificationSelfVerifyWait
|
||||
/*
|
||||
Copyright 2020 New Vector Ltd
|
||||
Copyright (c) 2021 BWI GmbH
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -28,10 +29,13 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
var cancellable: Bool = true
|
||||
|
||||
// MARK: Outlets
|
||||
|
||||
@IBOutlet private weak var informationLabel: UILabel!
|
||||
|
||||
@IBOutlet private weak var iconSymbolTextStackView: UIStackView!
|
||||
@IBOutlet private weak var desktopClientImageView: UIImageView!
|
||||
@IBOutlet private weak var mobileClientImageView: UIImageView!
|
||||
|
||||
@@ -94,6 +98,13 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
if let navigationBar = self.navigationController?.navigationBar {
|
||||
theme.applyStyle(onNavigationBar: navigationBar)
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide these UI elements when showDetailedVerificationElements is false
|
||||
*/
|
||||
self.iconSymbolTextStackView.isHidden = !BuildSettings.showDetailedVerificationElements
|
||||
self.desktopClientImageView.isHidden = !BuildSettings.showDetailedVerificationElements
|
||||
self.additionalInformationLabel.isHidden = !BuildSettings.showDetailedVerificationElements
|
||||
|
||||
self.informationLabel.textColor = theme.textPrimaryColor
|
||||
self.desktopClientImageView.tintColor = theme.tintColor
|
||||
@@ -112,18 +123,36 @@ final class KeyVerificationSelfVerifyWaitViewController: UIViewController {
|
||||
}
|
||||
|
||||
private func setupViews() {
|
||||
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.skip, style: .plain) { [weak self] in
|
||||
self?.cancelButtonAction()
|
||||
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession {
|
||||
if !session.homeserverWellknown.backupRequired() {
|
||||
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.skip, style: .plain) { [weak self] in
|
||||
self?.cancelButtonAction()
|
||||
}
|
||||
|
||||
self.vc_removeBackTitle()
|
||||
|
||||
self.navigationItem.rightBarButtonItem = cancelBarButtonItem
|
||||
self.cancelBarButtonItem = cancelBarButtonItem
|
||||
}
|
||||
}
|
||||
|
||||
self.vc_removeBackTitle()
|
||||
|
||||
self.navigationItem.rightBarButtonItem = cancelBarButtonItem
|
||||
self.cancelBarButtonItem = cancelBarButtonItem
|
||||
|
||||
|
||||
self.title = VectorL10n.deviceVerificationSelfVerifyWaitTitle
|
||||
|
||||
self.informationLabel.text = VectorL10n.deviceVerificationSelfVerifyWaitInformation(AppInfo.current.displayName)
|
||||
if BuildSettings.showDetailedVerificationElements {
|
||||
let headerText = NSLocalizedString("device_verification_self_verify_wait_information", tableName: "Vector", comment: "")
|
||||
|
||||
self.informationLabel.text = headerText + "\n\n" + NSLocalizedString("device_verification_self_verify_wait_information_more", tableName: "Vector", comment: "")
|
||||
} else {
|
||||
self.informationLabel.text = NSLocalizedString("device_verification_self_verify_wait_information", tableName: "Vector", comment: "")
|
||||
|
||||
|
||||
/*
|
||||
* Modify height contrain when the mobile icon is the only image which appears.
|
||||
*/
|
||||
for constraint in self.mobileClientImageView.constraints where constraint.identifier == "mobileIconHeightConstraint" {
|
||||
constraint.constant = 80
|
||||
}
|
||||
}
|
||||
|
||||
self.desktopClientImageView.image = Asset.Images.monitor.image.withRenderingMode(.alwaysTemplate)
|
||||
self.mobileClientImageView.image = Asset.Images.smartphone.image.withRenderingMode(.alwaysTemplate)
|
||||
|
||||
Reference in New Issue
Block a user