1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-04 01:23:15 +00:00

totp code generation on view login

This commit is contained in:
Kyle Spearrin
2017-07-13 14:44:02 -04:00
parent 9879f074b4
commit 26c110291e
14 changed files with 251 additions and 19 deletions

View File

@@ -8,7 +8,8 @@ namespace Bit.App.Controls
string labelText = null,
string valueText = null,
string button1Text = null,
string button2Text = null)
string button2Text = null,
string subText = null)
{
var containerStackLayout = new StackLayout
{
@@ -56,6 +57,18 @@ namespace Bit.App.Controls
VerticalOptions = LayoutOptions.CenterAndExpand
};
if(subText != null)
{
Sub = new Label
{
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
};
buttonStackLayout.Children.Add(Sub);
}
if(button1Text != null)
{
Button1 = new ExtendedButton
@@ -100,12 +113,18 @@ namespace Bit.App.Controls
containerStackLayout.AdjustPaddingForDevice();
}
if(Sub != null && Button1 != null)
{
Sub.Margin = new Thickness(0, 0, 10, 0);
}
containerStackLayout.Children.Add(buttonStackLayout);
View = containerStackLayout;
}
public Label Label { get; private set; }
public Label Value { get; private set; }
public Label Sub { get; private set; }
public ExtendedButton Button1 { get; private set; }
public ExtendedButton Button2 { get; private set; }
}