Modif assistant UI

This commit is contained in:
REIS Benjamin 2016-10-04 09:20:49 +02:00
parent 97e1859471
commit 6f568ccd52
4 changed files with 46 additions and 63 deletions

View file

@ -205,10 +205,10 @@ void assistant_activate_phone_number_link(LinphoneAccountCreator *creator, Linph
initWithTitle:NSLocalizedString(@"What will my phone number be used for?", nil)
message:NSLocalizedString(@"Your friends will find your more easily if you link your account to your "
@"phone number. \n\nYou will see in your address book who is using "
@"Linphone and your friend will know that they can reach you on Linphone "
@"Linphone and your friends will know that they can reach you on Linphone "
@"as well. \n\nYou can use your phone number with only one Linphone "
@"account. If you had already linked your number to an other account but "
@"you prefere to use this one, simply link it now and your number will "
@"you prefer to use this one, simply link it now and your number will "
@"automatically be moved to this account.",
nil)
delegate:nil

View file

@ -767,8 +767,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
} else {
if (status == LinphoneAccountCreatorAccountExist || status == LinphoneAccountCreatorAccountExistWithAlias) {
ViewElement ve = ([self findTextField:ViewElement_Username].isVisible) ? ViewElement_Username : ViewElement_Phone;
[[self findTextField:ve] showError:NSLocalizedString(@"This account already exists.", nil)];
[self showErrorPopup:"ERROR_ALIAS_ALREADY_IN_USE"];
[self findButton:ViewElement_NextButton].enabled = NO;
} else if (status == LinphoneAccountCreatorAccountNotExist) {
linphone_account_creator_create_account(account_creator);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11198.2" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
@ -29,6 +29,18 @@
<frame key="frameInset" minY="66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view hidden="YES" tag="8" contentMode="scaleToFill" id="J3A-Fb-Dpg" userLabel="waitView">
<frame key="frameInset" minY="-33" maxY="-33"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<activityIndicatorView opaque="NO" tag="9" contentMode="scaleToFill" animating="YES" style="gray" id="mQl-pi-5rq" userLabel="activityIndicatorView">
<frame key="frameInset" minX="50.42%" minY="49.77%" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
</view>
<view tag="2" contentMode="scaleToFill" misplaced="YES" id="c7I-Cv-d4R" userLabel="topBar">
<frame key="frameInset" height="66" maxX="8"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
@ -74,8 +86,8 @@
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Please confirm your country code and enter your phone number" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="11" id="RQz-tT-5vp" userLabel="subtitleLabel">
<frame key="frameInset" minX="50.00%" minY="13.04%" width="299" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="13.04%" width="79.73%" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.4266758859" green="0.42666310070000002" blue="0.42667034269999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -83,15 +95,15 @@
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" tag="122" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="PHONE NUMBER" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="v2Q-jf-BdL" userLabel="phoneLabel">
<frame key="frameInset" minX="50.00%" minY="25.14%" width="299" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="25.14%" width="79.73%" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.4266758859" green="0.42666310070000002" blue="0.42667034269999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" tag="150" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="rLT-uU-cJS" userLabel="countryButton" customClass="UIRoundBorderedButton">
<frame key="frameInset" minX="50.00%" minY="30.30%" width="299" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="30.30%" width="79.73%" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<state key="normal" title="Select your country">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
@ -101,8 +113,8 @@
</connections>
</button>
<view contentMode="scaleToFill" misplaced="YES" id="88g-7g-gGM" userLabel="phoneNumberView">
<frame key="frameInset" minX="50.00%" minY="189" width="299" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="189" width="79.73%" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" tag="109" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="+1" textAlignment="center" minimumFontSize="5" id="DBr-NA-Ibx" userLabel="countryCodeField">
<frame key="frameInset" minX="1" minY="53.85%" width="18.12%" height="30"/>
@ -136,8 +148,8 @@
</connections>
</button>
<button opaque="NO" tag="130" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="D25-6f-qRg" userLabel="linkAccountButton" customClass="UIRoundBorderedButton">
<frame key="frameInset" minX="50.00%" minY="51.29%" width="299" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="50.91%" width="79.73%" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Create account">
<bool key="isElement" value="YES"/>
</accessibility>
@ -170,54 +182,38 @@
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="2/2" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="10" id="bU8-Tu-9O4" userLabel="subtitleLabel">
<frame key="frameInset" minX="52.78%" minY="13.04%" width="303" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="13.04%" width="80.80%" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.4266758859" green="0.42666310070000002" blue="0.42667034269999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" misplaced="YES" text="ACTIVATE YOUR ACCOUNT" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="CJI-8t-QIh" userLabel="activateLabel">
<frame key="frameInset" minX="52.78%" minY="23.11%" width="303" height="59"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" misplaced="YES" text="We have sent you a SMS with a validation code. To complete your phone number validation, please enter the 4 digit code below:" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" minimumFontSize="10" id="Dvq-wa-3k8" userLabel="activateDescLabel">
<frame key="frameInset" minX="52.78%" minY="41.00%" width="303" height="96"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" tag="122" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="ACTIVATION CODE" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="h0Z-ct-Dri" userLabel="activationCodeLabel">
<frame key="frameInset" minX="52.78%" minY="55.09%" width="303" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.4266758859" green="0.42666310070000002" blue="0.42667034269999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" tag="108" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="always" id="PXL-cl-haZ" userLabel="activationCodeField">
<frame key="frameInset" minX="52.78%" minY="61.58%" width="303" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="36.04%" width="80.80%" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.85415387153625488" green="0.85412830114364624" blue="0.85414278507232666" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="numberPad" returnKeyType="done"/>
</textField>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" misplaced="YES" text="We have sent you a SMS with a validation code. To complete your phone number verification, please enter the 4 digit code below:" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" minimumFontSize="10" id="Dvq-wa-3k8" userLabel="activateDescLabel">
<frame key="frameInset" minX="10.13%" minY="23.46%" width="80.80%" height="96"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<button opaque="NO" tag="130" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" id="bIM-bh-Huy" userLabel="checkValidationButton" customClass="UIRoundBorderedButton">
<frame key="frameInset" minX="52.78%" minY="71.92%" width="303" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<frame key="frameInset" minX="10.13%" minY="50.91%" width="79.73%" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration" label="Finish configuration">
<bool key="isElement" value="YES"/>
</accessibility>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="FINISH CONFIGURATION">
<state key="normal" title="LINK ACCOUNT">
<color key="titleColor" red="0.20521381499999999" green="0.20520767570000001" blue="0.2052111626" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="disabled">
@ -228,18 +224,6 @@
<action selector="onCheckValidationButton:" destination="-1" eventType="touchUpInside" id="v0K-hd-CHi"/>
</connections>
</button>
<view hidden="YES" tag="8" contentMode="scaleToFill" misplaced="YES" id="J3A-Fb-Dpg" userLabel="waitView">
<frame key="frameInset" minY="-66"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<activityIndicatorView opaque="NO" tag="9" contentMode="scaleToFill" animating="YES" style="gray" id="mQl-pi-5rq" userLabel="activityIndicatorView">
<frame key="frameInset" minX="50.42%" minY="49.91%" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
</view>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</view>

View file

@ -40,7 +40,7 @@
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="This assistant will help you to configure and use a SIP account." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Yci-5h-O4o" userLabel="subtitleLabel">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="This assistant will help you do configure and use your SIP account." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="Yci-5h-O4o" userLabel="subtitleLabel">
<accessibility key="accessibilityConfiguration" label="Account setup assistant"/>
<constraints>
<constraint firstAttribute="height" constant="58" id="5LG-5A-dY3"/>
@ -250,7 +250,7 @@
<action selector="onFormSwitchToggle:" destination="-1" eventType="valueChanged" id="5ir-05-3Ec"/>
</connections>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Use Username (optional)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Dyy-Oh-esb" userLabel="useUsernameLabel">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Use a username (optional)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Dyy-Oh-esb" userLabel="useUsernameLabel">
<frame key="frameInset" minX="95" minY="273" width="242" height="31"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="0.42667588591575623" green="0.4266631007194519" blue="0.42667034268379211" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -913,8 +913,8 @@ Once it is done, come back here and click on the button.</string>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="-1" height="-1"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" misplaced="YES" text="Use Username and password instead of your phone number " lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="1K4-Nb-b3J" userLabel="useUsernameLabel">
<frame key="frameInset" minX="95" minY="272" width="242" height="31"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" misplaced="YES" text="Use your username and password instead of your phone number " lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="1K4-Nb-b3J" userLabel="useUsernameLabel">
<frame key="frameInset" minX="95" minY="272" width="447" height="31"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" red="0.4266758859" green="0.42666310070000002" blue="0.42667034269999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>