mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
show proper name for faceid. homepage margin on ios
This commit is contained in:
parent
1f707cda68
commit
a5f960d8a1
2 changed files with 15 additions and 9 deletions
|
@ -16,7 +16,14 @@
|
||||||
<controls:FaButton Text=""
|
<controls:FaButton Text=""
|
||||||
StyleClass="btn-muted, btn-icon, btn-icon-platform"
|
StyleClass="btn-muted, btn-icon, btn-icon-platform"
|
||||||
HorizontalOptions="Start"
|
HorizontalOptions="Start"
|
||||||
Clicked="Settings_Clicked" />
|
Clicked="Settings_Clicked">
|
||||||
|
<controls:FaButton.Margin>
|
||||||
|
<OnPlatform x:TypeArguments="Thickness">
|
||||||
|
<On Platform="iOS" Value="0, 10, 0, 0" />
|
||||||
|
<On Platform="Android" Value="0" />
|
||||||
|
</OnPlatform>
|
||||||
|
</controls:FaButton.Margin>
|
||||||
|
</controls:FaButton>
|
||||||
<StackLayout VerticalOptions="CenterAndExpand" Spacing="20">
|
<StackLayout VerticalOptions="CenterAndExpand" Spacing="20">
|
||||||
<Image
|
<Image
|
||||||
x:Name="_logo"
|
x:Name="_logo"
|
||||||
|
|
|
@ -23,7 +23,6 @@ namespace Bit.App.Pages
|
||||||
private readonly IStorageService _storageService;
|
private readonly IStorageService _storageService;
|
||||||
private readonly ISyncService _syncService;
|
private readonly ISyncService _syncService;
|
||||||
|
|
||||||
private string _fingerprintName;
|
|
||||||
private bool _supportsFingerprint;
|
private bool _supportsFingerprint;
|
||||||
private bool _pin;
|
private bool _pin;
|
||||||
private bool _fingerprint;
|
private bool _fingerprint;
|
||||||
|
@ -57,12 +56,6 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
GroupedItems = new ExtendedObservableCollection<SettingsPageListGroup>();
|
GroupedItems = new ExtendedObservableCollection<SettingsPageListGroup>();
|
||||||
PageTitle = AppResources.Settings;
|
PageTitle = AppResources.Settings;
|
||||||
|
|
||||||
_fingerprintName = AppResources.Fingerprint;
|
|
||||||
if(Device.RuntimePlatform == Device.iOS)
|
|
||||||
{
|
|
||||||
_fingerprintName = _deviceActionService.SupportsFaceId() ? AppResources.FaceID : AppResources.TouchID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedObservableCollection<SettingsPageListGroup> GroupedItems { get; set; }
|
public ExtendedObservableCollection<SettingsPageListGroup> GroupedItems { get; set; }
|
||||||
|
@ -329,9 +322,15 @@ namespace Bit.App.Pages
|
||||||
};
|
};
|
||||||
if(_supportsFingerprint)
|
if(_supportsFingerprint)
|
||||||
{
|
{
|
||||||
|
var fingerprintName = AppResources.Fingerprint;
|
||||||
|
if(Device.RuntimePlatform == Device.iOS)
|
||||||
|
{
|
||||||
|
fingerprintName = _deviceActionService.SupportsFaceId() ?
|
||||||
|
AppResources.FaceID : AppResources.TouchID;
|
||||||
|
}
|
||||||
var item = new SettingsPageListItem
|
var item = new SettingsPageListItem
|
||||||
{
|
{
|
||||||
Name = string.Format(AppResources.UnlockWith, _fingerprintName),
|
Name = string.Format(AppResources.UnlockWith, fingerprintName),
|
||||||
SubLabel = _fingerprint ? AppResources.Enabled : AppResources.Disabled
|
SubLabel = _fingerprint ? AppResources.Enabled : AppResources.Disabled
|
||||||
};
|
};
|
||||||
securityItems.Insert(1, item);
|
securityItems.Insert(1, item);
|
||||||
|
|
Loading…
Reference in a new issue