End-to-end encryption UI/UX

#723

- Add an unencrypted icon in the composer of a non-crypto room
This commit is contained in:
giomfo 2016-11-10 16:23:43 +01:00
parent 5692037925
commit c852e72480
2 changed files with 7 additions and 12 deletions

View file

@ -24,9 +24,6 @@
#import <Photos/Photos.h>
#define ROOM_INPUT_TOOLBAR_VIEW_DEFAULT_MESSAGE_COMPOSER_CONTAINER_LEADING 51
#define ROOM_INPUT_TOOLBAR_VIEW_ENCRYPTED_MESSAGE_COMPOSER_CONTAINER_LEADING 62
@interface RoomInputToolbarView()
{
MediaPickerViewController *mediaPicker;
@ -108,13 +105,11 @@
{
if (isEncryptionEnabled)
{
self.encryptedRoomIcon.hidden = NO;
self.messageComposerContainerLeadingConstraint.constant = ROOM_INPUT_TOOLBAR_VIEW_ENCRYPTED_MESSAGE_COMPOSER_CONTAINER_LEADING;
self.encryptedRoomIcon.image = [UIImage imageNamed:@"e2e_verified"];
}
else
{
self.encryptedRoomIcon.hidden = YES;
self.messageComposerContainerLeadingConstraint.constant = ROOM_INPUT_TOOLBAR_VIEW_DEFAULT_MESSAGE_COMPOSER_CONTAINER_LEADING;
self.encryptedRoomIcon.image = [UIImage imageNamed:@"e2e_unencrypted"];
}
_isEncryptionEnabled = isEncryptionEnabled;

View file

@ -30,7 +30,7 @@
<constraint firstAttribute="height" constant="30" id="wMB-Ec-D9s"/>
</constraints>
</view>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="e2e_verified.png" translatesAutoresizingMaskIntoConstraints="NO" id="fRI-9x-jgw">
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="e2e_unencrypted.png" translatesAutoresizingMaskIntoConstraints="NO" id="fRI-9x-jgw">
<rect key="frame" x="41" y="7" width="28" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="JHs-nc-tML"/>
@ -38,10 +38,10 @@
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QWp-NV-uh5" userLabel="Message Composer Container">
<rect key="frame" x="51" y="4" width="454" height="38"/>
<rect key="frame" x="62" y="4" width="443" height="38"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wgb-ON-N29" customClass="HPGrowingTextView">
<rect key="frame" x="0.0" y="0.0" width="454" height="38"/>
<rect key="frame" x="0.0" y="0.0" width="443" height="38"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</subviews>
@ -111,7 +111,7 @@
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="1FO-iu-urG"/>
<constraint firstItem="G8Z-CM-tGs" firstAttribute="top" secondItem="a84-Vc-6ud" secondAttribute="top" id="8cV-eb-Kog"/>
<constraint firstItem="3ln-yI-ef9" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="10" id="BwP-sF-qE1"/>
<constraint firstItem="QWp-NV-uh5" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="51" id="ErD-eB-stF"/>
<constraint firstItem="QWp-NV-uh5" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="62" id="ErD-eB-stF"/>
<constraint firstItem="Owf-M8-qJi" firstAttribute="leading" secondItem="Hga-l8-Wua" secondAttribute="trailing" id="GKh-R5-jqV"/>
<constraint firstItem="fRI-9x-jgw" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="41" id="GvU-rY-bWW"/>
<constraint firstItem="dd4-pE-Es1" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="13" id="Jem-U2-oEq"/>
@ -166,7 +166,7 @@
</objects>
<resources>
<image name="call_hangup_icon.png" width="26" height="27"/>
<image name="e2e_verified.png" width="10" height="12"/>
<image name="e2e_unencrypted.png" width="14" height="12"/>
<image name="upload_icon.png" width="21" height="26"/>
<image name="voice_call_icon.png" width="24" height="27"/>
</resources>