mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
fixes to 2fa page
This commit is contained in:
parent
77314d4b8d
commit
b782eeb839
3 changed files with 15 additions and 11 deletions
|
@ -13,19 +13,20 @@
|
||||||
<pages:TwoFactorPageViewModel />
|
<pages:TwoFactorPageViewModel />
|
||||||
</ContentPage.BindingContext>
|
</ContentPage.BindingContext>
|
||||||
|
|
||||||
|
<ContentPage.ToolbarItems>
|
||||||
|
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" Order="Primary" Priority="-1"
|
||||||
|
x:Name="_cancelItem" />
|
||||||
|
<ToolbarItem Text="{u:I18n Continue}" Clicked="Continue_Clicked" Order="Primary"
|
||||||
|
x:Name="_continueItem" />
|
||||||
|
</ContentPage.ToolbarItems>
|
||||||
|
|
||||||
<ContentPage.Resources>
|
<ContentPage.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<u:InverseBoolConverter x:Key="inverseBool" />
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
||||||
<u:IsNullConverter x:Key="isNull" />
|
<u:IsNullConverter x:Key="isNull" />
|
||||||
<ToolbarItem Text="{u:I18n Continue}" Clicked="Continue_Clicked"
|
|
||||||
x:Name="_continueItem" x:Key="continueItem" />
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</ContentPage.Resources>
|
||||||
|
|
||||||
<ContentPage.ToolbarItems>
|
|
||||||
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" Order="Primary" Priority="-1" />
|
|
||||||
</ContentPage.ToolbarItems>
|
|
||||||
|
|
||||||
<ScrollView x:Name="_scrollView">
|
<ScrollView x:Name="_scrollView">
|
||||||
<StackLayout Spacing="10" Padding="0, 0, 0, 10" VerticalOptions="FillAndExpand">
|
<StackLayout Spacing="10" Padding="0, 0, 0, 10" VerticalOptions="FillAndExpand">
|
||||||
<StackLayout Spacing="20" Padding="0" IsVisible="{Binding TotpMethod, Mode=OneWay}">
|
<StackLayout Spacing="20" Padding="0" IsVisible="{Binding TotpMethod, Mode=OneWay}">
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Bit.App.Pages
|
||||||
DuoWebView = _duoWebView;
|
DuoWebView = _duoWebView;
|
||||||
if(Device.RuntimePlatform == Device.Android)
|
if(Device.RuntimePlatform == Device.Android)
|
||||||
{
|
{
|
||||||
ToolbarItems.RemoveAt(0);
|
ToolbarItems.Remove(_cancelItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public void AddContinueButton()
|
public void AddContinueButton()
|
||||||
{
|
{
|
||||||
if(ToolbarItems.Count == 0)
|
if(!ToolbarItems.Contains(_continueItem))
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(_continueItem);
|
ToolbarItems.Add(_continueItem);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public void RemoveContinueButton()
|
public void RemoveContinueButton()
|
||||||
{
|
{
|
||||||
if(ToolbarItems.Count > 0)
|
if(ToolbarItems.Contains(_continueItem))
|
||||||
{
|
{
|
||||||
ToolbarItems.Remove(_continueItem);
|
ToolbarItems.Remove(_continueItem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,15 +39,18 @@ namespace Bit.iOS.Renderers
|
||||||
hybridWebView.Cleanup();
|
hybridWebView.Cleanup();
|
||||||
}
|
}
|
||||||
if(e.NewElement != null)
|
if(e.NewElement != null)
|
||||||
|
{
|
||||||
|
if(Element.Uri != null)
|
||||||
{
|
{
|
||||||
Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri)));
|
Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnElementPropertyChanged(sender, e);
|
base.OnElementPropertyChanged(sender, e);
|
||||||
if(e.PropertyName == HybridWebView.UriProperty.PropertyName)
|
if(e.PropertyName == HybridWebView.UriProperty.PropertyName && Element.Uri != null)
|
||||||
{
|
{
|
||||||
Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri)));
|
Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue