MESSENGER-4299 Neues design Recovery Key Eingabefeld

This commit is contained in:
Arnfried Griesert
2023-04-28 06:11:34 +00:00
committed by Frank Rotermund
parent 280d19922f
commit e3b3950e67
3 changed files with 33 additions and 16 deletions
@@ -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="KkK-aQ-7Ig">
<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="KkK-aQ-7Ig">
<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="21505"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -11,7 +11,7 @@
<!--Secrets Recovery With Passphrase View Controller-->
<scene sceneID="r1I-YV-Fog">
<objects>
<viewController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="KkK-aQ-7Ig" customClass="SecretsRecoveryWithPassphraseViewController" customModule="Riot" customModuleProvider="target" sceneMemberID="viewController">
<viewController extendedLayoutIncludesOpaqueBars="YES" automaticallyAdjustsScrollViewInsets="NO" id="KkK-aQ-7Ig" customClass="SecretsRecoveryWithPassphraseViewController" customModule="Element" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8SG-gc-Id7">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -40,7 +40,7 @@
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uly-5I-NIc">
<rect key="frame" x="0.0" y="207" width="375" height="50"/>
<rect key="frame" x="20" y="207" width="335" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="enter" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I7Q-Tb-YGd">
<rect key="frame" x="20" y="10" width="38" height="30"/>
@@ -49,7 +49,7 @@
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Enter passphrase" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="rAd-wZ-jgA">
<rect key="frame" x="78" y="0.0" width="243" height="50"/>
<rect key="frame" x="78" y="0.0" width="203" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="iy4-UK-b6r"/>
</constraints>
@@ -60,7 +60,7 @@
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ahr-Zq-UM4">
<rect key="frame" x="321" y="3" width="44" height="44"/>
<rect key="frame" x="281" y="3" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="2WM-IG-od1"/>
<constraint firstAttribute="height" constant="44" id="6DP-64-vVH"/>
@@ -87,7 +87,7 @@
<constraint firstItem="rAd-wZ-jgA" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="I7Q-Tb-YGd" secondAttribute="trailing" constant="20" id="vyG-oS-use"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a20-Ii-sAN">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a20-Ii-sAN">
<rect key="frame" x="0.0" y="273" width="375" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="9rW-yL-qS1"/>
@@ -95,7 +95,7 @@
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="contentEdgeInsets" minX="20" minY="0.0" maxX="20" maxY="0.0"/>
<state key="normal" title="Dont know your recovery passphrase ? You can use your recovery key.">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleColor" systemColor="darkTextColor"/>
</state>
<state key="disabled">
<color key="titleColor" red="0.47843137250000001" green="0.78823529410000004" blue="0.63137254899999995" alpha="0.5" colorSpace="calibratedRGB"/>
@@ -107,7 +107,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zOv-dc-49b">
<rect key="frame" x="0.0" y="353" width="375" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DpI-8g-yKB" customClass="RoundedButton" customModule="Riot" customModuleProvider="target">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DpI-8g-yKB" customClass="RoundedButton" customModule="Element" customModuleProvider="target">
<rect key="frame" x="20" y="0.0" width="335" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Ghb-Uq-q6w"/>
@@ -133,7 +133,7 @@
<constraint firstItem="DpI-8g-yKB" firstAttribute="width" secondItem="zOv-dc-49b" secondAttribute="width" priority="750" id="q7z-h9-oc7"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FsM-8o-pIc">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FsM-8o-pIc">
<rect key="frame" x="0.0" y="419" width="375" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Zb9-Il-WIS"/>
@@ -141,7 +141,7 @@
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<inset key="contentEdgeInsets" minX="20" minY="0.0" maxX="20" maxY="0.0"/>
<state key="normal" title="Forgot or lost all recovery options? Reset everything">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleColor" systemColor="darkTextColor"/>
</state>
<state key="disabled">
<color key="titleColor" red="0.47843137250000001" green="0.78823529410000004" blue="0.63137254899999995" alpha="0.5" colorSpace="calibratedRGB"/>
@@ -153,7 +153,7 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="uly-5I-NIc" secondAttribute="trailing" id="6VB-MQ-hIp"/>
<constraint firstAttribute="trailing" secondItem="uly-5I-NIc" secondAttribute="trailing" constant="20" id="6VB-MQ-hIp"/>
<constraint firstItem="p2V-aL-g0y" firstAttribute="top" secondItem="hA4-wJ-xGz" secondAttribute="bottom" constant="30" id="6eX-cP-a3F"/>
<constraint firstAttribute="trailing" secondItem="zOv-dc-49b" secondAttribute="trailing" id="9er-kg-arg"/>
<constraint firstItem="FsM-8o-pIc" firstAttribute="top" secondItem="zOv-dc-49b" secondAttribute="bottom" constant="16" id="KfQ-rd-n2B"/>
@@ -164,7 +164,7 @@
<constraint firstItem="zOv-dc-49b" firstAttribute="top" secondItem="a20-Ii-sAN" secondAttribute="bottom" constant="30" id="b6e-I5-UmV"/>
<constraint firstItem="zOv-dc-49b" firstAttribute="leading" secondItem="Gw9-uS-bGl" secondAttribute="leading" id="bdZ-LL-sEK"/>
<constraint firstAttribute="bottom" secondItem="FsM-8o-pIc" secondAttribute="bottom" constant="20" id="cFV-lL-sr0"/>
<constraint firstItem="uly-5I-NIc" firstAttribute="leading" secondItem="Gw9-uS-bGl" secondAttribute="leading" id="cbx-lF-FxP"/>
<constraint firstItem="uly-5I-NIc" firstAttribute="leading" secondItem="Gw9-uS-bGl" secondAttribute="leading" constant="20" id="cbx-lF-FxP"/>
<constraint firstItem="FsM-8o-pIc" firstAttribute="leading" secondItem="Gw9-uS-bGl" secondAttribute="leading" id="dlb-Mp-dHQ"/>
<constraint firstAttribute="trailing" secondItem="p2V-aL-g0y" secondAttribute="trailing" constant="20" id="ebM-3Y-G7G"/>
<constraint firstAttribute="trailing" secondItem="FsM-8o-pIc" secondAttribute="trailing" id="jtO-Hw-15P"/>
@@ -196,6 +196,7 @@
</constraints>
</scrollView>
</subviews>
<viewLayoutGuide key="safeArea" id="9Os-Vv-Xnb"/>
<color key="backgroundColor" red="0.94509803920000002" green="0.96078431369999995" blue="0.97254901959999995" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="FYl-Bb-Kpe" firstAttribute="leading" secondItem="9Os-Vv-Xnb" secondAttribute="leading" id="GOs-MF-rUL"/>
@@ -203,7 +204,6 @@
<constraint firstItem="9Os-Vv-Xnb" firstAttribute="trailing" secondItem="FYl-Bb-Kpe" secondAttribute="trailing" id="SYj-74-mpC"/>
<constraint firstItem="9Os-Vv-Xnb" firstAttribute="top" secondItem="FYl-Bb-Kpe" secondAttribute="top" id="dg5-In-5U7"/>
</constraints>
<viewLayoutGuide key="safeArea" id="9Os-Vv-Xnb"/>
</view>
<connections>
<outlet property="informationLabel" destination="p2V-aL-g0y" id="f0u-LY-N8z"/>
@@ -225,6 +225,9 @@
</scenes>
<resources>
<image name="reveal_password_button" width="24" height="18"/>
<image name="secrets_recovery_passphrase" width="44" height="48"/>
<image name="secrets_recovery_passphrase" width="256" height="256"/>
<systemColor name="darkTextColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
@@ -78,6 +78,10 @@ final class SecretsRecoveryWithPassphraseViewController: UIViewController {
self.registerThemeServiceDidChangeThemeNotification()
self.update(theme: self.theme)
self.passphraseTextFieldBackgroundView.layer.cornerRadius = 8.0
self.passphraseTextFieldBackgroundView.layer.borderWidth = 1.5
self.passphraseTextFieldBackgroundView.layer.borderColor = ThemeService.shared().theme.tintColor.cgColor
self.passphraseTextField.delegate = self
self.viewModel.viewDelegate = self
}
@@ -270,6 +274,16 @@ extension SecretsRecoveryWithPassphraseViewController: UITextFieldDelegate {
textField.resignFirstResponder()
return true
}
func textFieldDidBeginEditing(_ textField: UITextField) {
passphraseTextFieldBackgroundView.layer.borderWidth = 2.0
passphraseTextFieldBackgroundView.layer.borderColor = ThemeService.shared().theme.tintColor.cgColor
}
func textFieldDidEndEditing(_ textField: UITextField) {
passphraseTextFieldBackgroundView.layer.borderWidth = 1.5
passphraseTextFieldBackgroundView.layer.borderColor = ThemeService.shared().theme.textQuinaryColor.cgColor
}
}
// MARK: - SecretsRecoveryWithPassphraseViewModelViewDelegate