fingerprint icon on extension lock page

This commit is contained in:
Kyle Spearrin 2016-07-30 12:44:02 -04:00
parent ef77ccd189
commit 912ade4059
8 changed files with 40 additions and 3 deletions

View file

@ -36,7 +36,8 @@ namespace Bit.App.Pages
Image = "fingerprint",
BackgroundColor = Color.Transparent,
Command = new Command(async () => await CheckFingerprintAsync()),
VerticalOptions = LayoutOptions.CenterAndExpand
VerticalOptions = LayoutOptions.CenterAndExpand,
Margin = new Thickness(0, 0, 0, 15)
};
var fingerprintButton = new Button

View file

@ -59,6 +59,11 @@ namespace Bit.iOS.Extension
LoadingController.CompleteRequest(null);
}
partial void FingerprintButton_TouchUpInside(UIButton sender)
{
var task = CheckFingerprintAsync();
}
public async Task CheckFingerprintAsync()
{
var result = await _fingerprint.AuthenticateAsync("Use your fingerprint to verify.");

View file

@ -18,13 +18,21 @@ namespace Bit.iOS.Extension
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UIBarButtonItem CancelButton { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UIButton FingerprintButton { get; set; }
[Outlet]
[GeneratedCode ("iOS Designer", "1.0")]
UIKit.UIButton UseButton { get; set; }
[Action ("CancelButton_Activated:")]
[Action ("FingerprintButton_TouchUpInside:")]
[GeneratedCode ("iOS Designer", "1.0")]
partial void CancelButton_Activated (UIKit.UIBarButtonItem sender);
partial void FingerprintButton_TouchUpInside (UIKit.UIButton sender);
[Action("CancelButton_Activated:")]
[GeneratedCode("iOS Designer", "1.0")]
partial void CancelButton_Activated(UIKit.UIBarButtonItem sender);
void ReleaseDesignerOutlets ()
{
@ -33,6 +41,11 @@ namespace Bit.iOS.Extension
CancelButton = null;
}
if (FingerprintButton != null) {
FingerprintButton.Dispose ();
FingerprintButton = null;
}
if (UseButton != null) {
UseButton.Dispose ();
UseButton = null;

View file

@ -339,12 +339,25 @@
</state>
<inset key="contentEdgeInsets" minX="0.0" minY="10" maxX="0.0" maxY="10"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="11144" translatesAutoresizingMaskIntoConstraints="NO">
<rect key="frame" x="254.5" y="234" width="91" height="92"/>
<color key="tintColor" colorSpace="calibratedRGB" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1"/>
<state key="normal" image="fingerprint.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
<color key="titleColor" colorSpace="calibratedRGB" red="0.46666666666666667" green="0.46666666666666667" blue="0.46666666666666667" alpha="1"/>
</state>
<connections>
<action selector="FingerprintButton_TouchUpInside:" destination="6514" id="11149" eventType="touchUpInside"/>
</connections>
</button>
</subviews>
<constraints>
<constraint id="6783" firstItem="6519" firstAttribute="trailing" secondItem="6777" secondAttribute="trailing" constant="30"/>
<constraint id="6784" firstItem="6777" firstAttribute="leading" secondItem="6519" secondAttribute="leading" constant="30"/>
<constraint id="6785" firstItem="6510" firstAttribute="top" secondItem="6777" secondAttribute="bottom" constant="40"/>
<constraint id="6786" firstItem="6777" firstAttribute="centerX" secondItem="6519" secondAttribute="centerX"/>
<constraint id="11147" firstItem="6519" firstAttribute="centerY" secondItem="11144" secondAttribute="centerY" constant="60"/>
<constraint id="11148" firstItem="11144" firstAttribute="centerX" secondItem="6519" secondAttribute="centerX"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Verify Fingerprint" id="6518">
@ -357,6 +370,7 @@
<connections>
<outlet property="UseButton" destination="6777" id="name-outlet-6777"/>
<outlet property="CancelButton" destination="6800" id="name-outlet-6800"/>
<outlet property="FingerprintButton" destination="11144" id="name-outlet-11144"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="6520" userLabel="First Responder" sceneMemberID="firstResponder"/>
@ -589,5 +603,6 @@
<image name="logo.png" width="282" height="44"/>
<image name="Icon.png" width="40" height="40"/>
<image name="ext-icon.png" width="90" height="90"/>
<image name="fingerprint.png" width="91" height="92"/>
</resources>
</document>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -230,6 +230,9 @@
<BundleResource Include="Resources\ext-icon.png" />
<BundleResource Include="Resources\ext-icon%402x.png" />
<BundleResource Include="Resources\ext-icon%403x.png" />
<BundleResource Include="Resources\fingerprint.png" />
<BundleResource Include="Resources\fingerprint%402x.png" />
<BundleResource Include="Resources\fingerprint%403x.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\App\App.csproj">