multi-device: update Ring account creation wizard
This patch implements multi-device support
- The account creation wizzard has now two options "Existing Ring
account" and "New Ring account".
"Existing Ring account": Allows for fetching a Ring account archive
from the DHT. Requires pin and password.
"New Ring account": This is the previously existing wizard. It was
modified to ask for a password which will be used to encrypt the
account archive. This password is then required for exporting the
account on the Ring.
- Creating a new Ring account with the "+" button now triggers the
account creation wizard.
Change-Id: I6840d968e52de014ab0aa9dd6f5bc1ab31f9e9ec
Tuleap: #958
diff --git a/ui/Base.lproj/RingWizardLinkAccount.xib b/ui/Base.lproj/RingWizardLinkAccount.xib
new file mode 100644
index 0000000..f38c63e
--- /dev/null
+++ b/ui/Base.lproj/RingWizardLinkAccount.xib
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
+ </dependencies>
+ <objects>
+ <customObject id="-2" userLabel="File's Owner" customClass="RingWizardLinkAccountVC">
+ <connections>
+ <outlet property="createButton" destination="xmI-fH-GpH" id="VnH-tA-YA2"/>
+ <outlet property="errorContainer" destination="B0P-LC-JmW" id="lKa-Nb-o79"/>
+ <outlet property="initialContainer" destination="jR6-WY-o19" id="zJs-xD-OjK"/>
+ <outlet property="loadingContainer" destination="PQA-fA-Rio" id="Vgf-yn-jFS"/>
+ <outlet property="passwordField" destination="VeW-tY-k3K" id="LH6-sz-3EY"/>
+ <outlet property="passwordLabel" destination="AGs-mP-zJd" id="zc8-Rl-nuO"/>
+ <outlet property="pinField" destination="BFR-6z-UlF" id="Pd6-ML-zGH"/>
+ <outlet property="pinLabel" destination="Nms-13-N3F" id="44u-cx-UVv"/>
+ <outlet property="progressBar" destination="uxb-PD-AaW" id="r6R-U9-Kf4"/>
+ <outlet property="view" destination="kG1-xB-0op" id="gnN-lQ-sTg"/>
+ </connections>
+ </customObject>
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+ <customView id="kG1-xB-0op">
+ <rect key="frame" x="0.0" y="0.0" width="350" height="203"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+ <subviews>
+ <view translatesAutoresizingMaskIntoConstraints="NO" id="B0P-LC-JmW">
+ <rect key="frame" x="0.0" y="0.0" width="350" height="203"/>
+ <subviews>
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hwa-xK-TuM">
+ <rect key="frame" x="-2" y="76" width="354" height="51"/>
+ <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" title="An error occured, please check your password and pin." id="DyG-SJ-U1Q">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <button translatesAutoresizingMaskIntoConstraints="NO" id="daZ-Bz-vsM">
+ <rect key="frame" x="260" y="17" width="72" height="29"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="68" id="vNb-db-X99"/>
+ </constraints>
+ <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="t12-O0-kcf">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+ </buttonCell>
+ <connections>
+ <action selector="back:" target="-2" id="0CN-yt-UoM"/>
+ </connections>
+ </button>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="daZ-Bz-vsM" secondAttribute="bottom" constant="20" id="3NL-fi-0K4"/>
+ <constraint firstItem="Hwa-xK-TuM" firstAttribute="centerX" secondItem="B0P-LC-JmW" secondAttribute="centerX" id="EXE-nk-eq0"/>
+ <constraint firstAttribute="trailing" secondItem="daZ-Bz-vsM" secondAttribute="trailing" constant="20" id="eDD-r2-zZa"/>
+ <constraint firstItem="Hwa-xK-TuM" firstAttribute="centerY" secondItem="B0P-LC-JmW" secondAttribute="centerY" id="mWR-IE-Gg5"/>
+ <constraint firstItem="Hwa-xK-TuM" firstAttribute="width" secondItem="B0P-LC-JmW" secondAttribute="width" id="sGQ-zX-CyS"/>
+ </constraints>
+ </view>
+ <view translatesAutoresizingMaskIntoConstraints="NO" id="PQA-fA-Rio">
+ <rect key="frame" x="0.0" y="0.0" width="350" height="203"/>
+ <subviews>
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="80Z-XU-adp">
+ <rect key="frame" x="3" y="63" width="344" height="17"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="340" id="OcO-zL-LBK"/>
+ </constraints>
+ <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" title="Just a moment..." id="M4C-GY-B6t">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <button translatesAutoresizingMaskIntoConstraints="NO" id="moc-jn-6gS">
+ <rect key="frame" x="260" y="17" width="72" height="29"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="68" id="p5l-CE-iab"/>
+ </constraints>
+ <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uhy-DE-TKw">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+ </buttonCell>
+ <connections>
+ <action selector="dismissViewWithError:" target="-2" id="ZGv-8b-1B0"/>
+ </connections>
+ </button>
+ <progressIndicator wantsLayer="YES" maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="uxb-PD-AaW">
+ <rect key="frame" x="127" y="85" width="96" height="32"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="96" id="QHN-gm-GxV"/>
+ </constraints>
+ </progressIndicator>
+ </subviews>
+ <constraints>
+ <constraint firstItem="uxb-PD-AaW" firstAttribute="centerX" secondItem="PQA-fA-Rio" secondAttribute="centerX" id="5a0-wi-oYZ"/>
+ <constraint firstAttribute="bottom" secondItem="moc-jn-6gS" secondAttribute="bottom" constant="20" id="ENl-ng-a12"/>
+ <constraint firstItem="uxb-PD-AaW" firstAttribute="centerY" secondItem="PQA-fA-Rio" secondAttribute="centerY" id="Reg-FH-UrX"/>
+ <constraint firstItem="uxb-PD-AaW" firstAttribute="centerX" secondItem="80Z-XU-adp" secondAttribute="centerX" id="ZiA-sz-Pnl"/>
+ <constraint firstItem="80Z-XU-adp" firstAttribute="top" secondItem="uxb-PD-AaW" secondAttribute="bottom" constant="5" id="a6L-fb-blD"/>
+ <constraint firstAttribute="trailing" secondItem="moc-jn-6gS" secondAttribute="trailing" constant="20" id="fK2-ny-217"/>
+ </constraints>
+ </view>
+ <view translatesAutoresizingMaskIntoConstraints="NO" id="jR6-WY-o19">
+ <rect key="frame" x="0.0" y="0.0" width="350" height="203"/>
+ <subviews>
+ <button translatesAutoresizingMaskIntoConstraints="NO" id="xmI-fH-GpH">
+ <rect key="frame" x="260" y="17" width="72" height="29"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="68" id="Tl8-9U-xp5"/>
+ </constraints>
+ <buttonCell key="cell" type="bevel" title="Next" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8b8-bt-eAj">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+ </buttonCell>
+ <connections>
+ <action selector="importRingAccount:" target="-2" id="pa7-oH-87l"/>
+ <binding destination="-2" name="enabled" keyPath="self.passwordValue.length" id="Z1a-FR-ag2"/>
+ <binding destination="-2" name="enabled2" keyPath="self.pinValue.length" previousBinding="Z1a-FR-ag2" id="GdE-Gd-jpJ">
+ <dictionary key="options">
+ <integer key="NSMultipleValuesPlaceholder" value="-1"/>
+ <integer key="NSNoSelectionPlaceholder" value="-1"/>
+ <integer key="NSNotApplicablePlaceholder" value="-1"/>
+ <integer key="NSNullPlaceholder" value="-1"/>
+ </dictionary>
+ </binding>
+ </connections>
+ </button>
+ <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BFR-6z-UlF">
+ <rect key="frame" x="75" y="134" width="200" height="22"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="ql3-eF-0Q3"/>
+ </constraints>
+ <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="" bezelStyle="round" id="5pW-QD-iHi">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="value" keyPath="self.pinValue" id="GrX-eR-RHE">
+ <dictionary key="options">
+ <bool key="NSContinuouslyUpdatesValue" value="YES"/>
+ </dictionary>
+ </binding>
+ <outlet property="nextKeyView" destination="VeW-tY-k3K" id="fgI-rk-Nuk"/>
+ </connections>
+ </textField>
+ <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VeW-tY-k3K" customClass="NSSecureTextField">
+ <rect key="frame" x="75" y="75" width="200" height="22"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="200" id="EQr-I3-bWf"/>
+ <constraint firstAttribute="width" constant="200" id="XLF-Bw-hQ5"/>
+ </constraints>
+ <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="" bezelStyle="round" id="9k8-c8-GFI" customClass="NSSecureTextFieldCell">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ <connections>
+ <binding destination="-2" name="value" keyPath="self.passwordValue" id="DMG-pk-2GO">
+ <dictionary key="options">
+ <bool key="NSContinuouslyUpdatesValue" value="YES"/>
+ </dictionary>
+ </binding>
+ <outlet property="nextKeyView" destination="xmI-fH-GpH" id="oQw-CE-3NA"/>
+ </connections>
+ </textField>
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Nms-13-N3F">
+ <rect key="frame" x="3" y="166" width="344" height="17"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="340" id="dTT-oe-Tym"/>
+ </constraints>
+ <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" title="Enter your pin" id="3ik-rY-Gig">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AGs-mP-zJd">
+ <rect key="frame" x="3" y="107" width="344" height="17"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="340" id="3tj-c0-BEv"/>
+ </constraints>
+ <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" title="Enter your password" id="U2K-fu-INc">
+ <font key="font" metaFont="system"/>
+ <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+ <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+ </textFieldCell>
+ </textField>
+ <button translatesAutoresizingMaskIntoConstraints="NO" id="XWj-I6-wlG">
+ <rect key="frame" x="182" y="17" width="72" height="29"/>
+ <constraints>
+ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="68" id="gkI-h7-faT"/>
+ </constraints>
+ <buttonCell key="cell" type="bevel" title="Cancel" bezelStyle="regularSquare" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="4ev-TK-8Yt">
+ <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+ <font key="font" metaFont="system"/>
+ <string key="keyEquivalent" base64-UTF8="YES">
+DQ
+</string>
+ </buttonCell>
+ <connections>
+ <action selector="dismissViewWithError:" target="-2" id="TQx-1Z-tFa"/>
+ </connections>
+ </button>
+ </subviews>
+ <constraints>
+ <constraint firstItem="BFR-6z-UlF" firstAttribute="top" secondItem="Nms-13-N3F" secondAttribute="bottom" constant="10" id="9rR-Bz-IV5"/>
+ <constraint firstItem="BFR-6z-UlF" firstAttribute="centerX" secondItem="jR6-WY-o19" secondAttribute="centerX" id="B1d-wB-vV0"/>
+ <constraint firstItem="XWj-I6-wlG" firstAttribute="baseline" secondItem="xmI-fH-GpH" secondAttribute="baseline" id="Mew-0a-C7j"/>
+ <constraint firstItem="AGs-mP-zJd" firstAttribute="top" secondItem="BFR-6z-UlF" secondAttribute="bottom" constant="10" id="Mlp-x7-UId"/>
+ <constraint firstAttribute="bottom" secondItem="xmI-fH-GpH" secondAttribute="bottom" constant="20" id="ONV-r0-v26"/>
+ <constraint firstItem="Nms-13-N3F" firstAttribute="top" secondItem="jR6-WY-o19" secondAttribute="top" constant="20" id="PM0-u5-7XA"/>
+ <constraint firstItem="xmI-fH-GpH" firstAttribute="leading" secondItem="XWj-I6-wlG" secondAttribute="trailing" constant="10" id="Pmj-x8-RJe"/>
+ <constraint firstItem="VeW-tY-k3K" firstAttribute="top" secondItem="AGs-mP-zJd" secondAttribute="bottom" constant="10" id="Qo1-zb-2YI"/>
+ <constraint firstItem="Nms-13-N3F" firstAttribute="centerX" secondItem="BFR-6z-UlF" secondAttribute="centerX" id="Wn8-Vg-MAJ"/>
+ <constraint firstItem="AGs-mP-zJd" firstAttribute="centerX" secondItem="jR6-WY-o19" secondAttribute="centerX" id="cPy-QT-Sue"/>
+ <constraint firstAttribute="trailing" secondItem="xmI-fH-GpH" secondAttribute="trailing" constant="20" id="kub-6B-85y"/>
+ <constraint firstItem="VeW-tY-k3K" firstAttribute="leading" secondItem="BFR-6z-UlF" secondAttribute="leading" id="qVJ-Qu-dRy"/>
+ <constraint firstItem="VeW-tY-k3K" firstAttribute="trailing" secondItem="BFR-6z-UlF" secondAttribute="trailing" id="szw-nO-R5J"/>
+ </constraints>
+ </view>
+ </subviews>
+ <constraints>
+ <constraint firstItem="B0P-LC-JmW" firstAttribute="top" secondItem="PQA-fA-Rio" secondAttribute="top" id="9fT-fe-XkL"/>
+ <constraint firstItem="B0P-LC-JmW" firstAttribute="trailing" secondItem="jR6-WY-o19" secondAttribute="trailing" id="GK3-rx-CoH"/>
+ <constraint firstItem="PQA-fA-Rio" firstAttribute="top" secondItem="jR6-WY-o19" secondAttribute="top" id="K0Z-4r-h1X"/>
+ <constraint firstItem="jR6-WY-o19" firstAttribute="height" secondItem="kG1-xB-0op" secondAttribute="height" id="L1w-wl-tkD"/>
+ <constraint firstItem="jR6-WY-o19" firstAttribute="width" secondItem="kG1-xB-0op" secondAttribute="width" id="Ow7-Wb-jZk"/>
+ <constraint firstItem="jR6-WY-o19" firstAttribute="leading" secondItem="kG1-xB-0op" secondAttribute="leading" id="Yqh-XC-fih"/>
+ <constraint firstItem="PQA-fA-Rio" firstAttribute="trailing" secondItem="jR6-WY-o19" secondAttribute="trailing" id="aND-Hy-o8v"/>
+ <constraint firstItem="PQA-fA-Rio" firstAttribute="leading" secondItem="jR6-WY-o19" secondAttribute="leading" id="cNo-MX-1br"/>
+ <constraint firstItem="PQA-fA-Rio" firstAttribute="bottom" secondItem="jR6-WY-o19" secondAttribute="bottom" id="evs-g3-Q7g"/>
+ <constraint firstItem="B0P-LC-JmW" firstAttribute="leading" secondItem="PQA-fA-Rio" secondAttribute="leading" id="p8n-78-1gw"/>
+ <constraint firstItem="jR6-WY-o19" firstAttribute="top" secondItem="kG1-xB-0op" secondAttribute="top" id="rUX-4w-KaX"/>
+ <constraint firstItem="B0P-LC-JmW" firstAttribute="bottom" secondItem="jR6-WY-o19" secondAttribute="bottom" id="vlI-JJ-jbZ"/>
+ </constraints>
+ <point key="canvasLocation" x="75" y="436.5"/>
+ </customView>
+ <userDefaultsController representsSharedInstance="YES" id="gsL-dH-zL7"/>
+ </objects>
+</document>