mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
fingerprint icon on extension lock page
This commit is contained in:
parent
ef77ccd189
commit
912ade4059
8 changed files with 40 additions and 3 deletions
|
@ -36,7 +36,8 @@ namespace Bit.App.Pages
|
||||||
Image = "fingerprint",
|
Image = "fingerprint",
|
||||||
BackgroundColor = Color.Transparent,
|
BackgroundColor = Color.Transparent,
|
||||||
Command = new Command(async () => await CheckFingerprintAsync()),
|
Command = new Command(async () => await CheckFingerprintAsync()),
|
||||||
VerticalOptions = LayoutOptions.CenterAndExpand
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||||
|
Margin = new Thickness(0, 0, 0, 15)
|
||||||
};
|
};
|
||||||
|
|
||||||
var fingerprintButton = new Button
|
var fingerprintButton = new Button
|
||||||
|
|
|
@ -59,6 +59,11 @@ namespace Bit.iOS.Extension
|
||||||
LoadingController.CompleteRequest(null);
|
LoadingController.CompleteRequest(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
partial void FingerprintButton_TouchUpInside(UIButton sender)
|
||||||
|
{
|
||||||
|
var task = CheckFingerprintAsync();
|
||||||
|
}
|
||||||
|
|
||||||
public async Task CheckFingerprintAsync()
|
public async Task CheckFingerprintAsync()
|
||||||
{
|
{
|
||||||
var result = await _fingerprint.AuthenticateAsync("Use your fingerprint to verify.");
|
var result = await _fingerprint.AuthenticateAsync("Use your fingerprint to verify.");
|
||||||
|
|
|
@ -18,10 +18,18 @@ namespace Bit.iOS.Extension
|
||||||
[GeneratedCode ("iOS Designer", "1.0")]
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
UIKit.UIBarButtonItem CancelButton { get; set; }
|
UIKit.UIBarButtonItem CancelButton { get; set; }
|
||||||
|
|
||||||
|
[Outlet]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
UIKit.UIButton FingerprintButton { get; set; }
|
||||||
|
|
||||||
[Outlet]
|
[Outlet]
|
||||||
[GeneratedCode ("iOS Designer", "1.0")]
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
UIKit.UIButton UseButton { get; set; }
|
UIKit.UIButton UseButton { get; set; }
|
||||||
|
|
||||||
|
[Action ("FingerprintButton_TouchUpInside:")]
|
||||||
|
[GeneratedCode ("iOS Designer", "1.0")]
|
||||||
|
partial void FingerprintButton_TouchUpInside (UIKit.UIButton sender);
|
||||||
|
|
||||||
[Action("CancelButton_Activated:")]
|
[Action("CancelButton_Activated:")]
|
||||||
[GeneratedCode("iOS Designer", "1.0")]
|
[GeneratedCode("iOS Designer", "1.0")]
|
||||||
partial void CancelButton_Activated(UIKit.UIBarButtonItem sender);
|
partial void CancelButton_Activated(UIKit.UIBarButtonItem sender);
|
||||||
|
@ -33,6 +41,11 @@ namespace Bit.iOS.Extension
|
||||||
CancelButton = null;
|
CancelButton = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FingerprintButton != null) {
|
||||||
|
FingerprintButton.Dispose ();
|
||||||
|
FingerprintButton = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (UseButton != null) {
|
if (UseButton != null) {
|
||||||
UseButton.Dispose ();
|
UseButton.Dispose ();
|
||||||
UseButton = null;
|
UseButton = null;
|
||||||
|
|
|
@ -339,12 +339,25 @@
|
||||||
</state>
|
</state>
|
||||||
<inset key="contentEdgeInsets" minX="0.0" minY="10" maxX="0.0" maxY="10"/>
|
<inset key="contentEdgeInsets" minX="0.0" minY="10" maxX="0.0" maxY="10"/>
|
||||||
</button>
|
</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>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint id="6783" firstItem="6519" firstAttribute="trailing" secondItem="6777" secondAttribute="trailing" constant="30"/>
|
<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="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="6785" firstItem="6510" firstAttribute="top" secondItem="6777" secondAttribute="bottom" constant="40"/>
|
||||||
<constraint id="6786" firstItem="6777" firstAttribute="centerX" secondItem="6519" secondAttribute="centerX"/>
|
<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>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<navigationItem key="navigationItem" title="Verify Fingerprint" id="6518">
|
<navigationItem key="navigationItem" title="Verify Fingerprint" id="6518">
|
||||||
|
@ -357,6 +370,7 @@
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="UseButton" destination="6777" id="name-outlet-6777"/>
|
<outlet property="UseButton" destination="6777" id="name-outlet-6777"/>
|
||||||
<outlet property="CancelButton" destination="6800" id="name-outlet-6800"/>
|
<outlet property="CancelButton" destination="6800" id="name-outlet-6800"/>
|
||||||
|
<outlet property="FingerprintButton" destination="11144" id="name-outlet-11144"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="6520" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="6520" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
@ -589,5 +603,6 @@
|
||||||
<image name="logo.png" width="282" height="44"/>
|
<image name="logo.png" width="282" height="44"/>
|
||||||
<image name="Icon.png" width="40" height="40"/>
|
<image name="Icon.png" width="40" height="40"/>
|
||||||
<image name="ext-icon.png" width="90" height="90"/>
|
<image name="ext-icon.png" width="90" height="90"/>
|
||||||
|
<image name="fingerprint.png" width="91" height="92"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
BIN
src/iOS.Extension/Resources/fingerprint.png
Normal file
BIN
src/iOS.Extension/Resources/fingerprint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
src/iOS.Extension/Resources/fingerprint@2x.png
Normal file
BIN
src/iOS.Extension/Resources/fingerprint@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
BIN
src/iOS.Extension/Resources/fingerprint@3x.png
Normal file
BIN
src/iOS.Extension/Resources/fingerprint@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -230,6 +230,9 @@
|
||||||
<BundleResource Include="Resources\ext-icon.png" />
|
<BundleResource Include="Resources\ext-icon.png" />
|
||||||
<BundleResource Include="Resources\ext-icon%402x.png" />
|
<BundleResource Include="Resources\ext-icon%402x.png" />
|
||||||
<BundleResource Include="Resources\ext-icon%403x.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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\App\App.csproj">
|
<ProjectReference Include="..\App\App.csproj">
|
||||||
|
|
Loading…
Reference in a new issue