1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-28 22:23:35 +00:00

update to Xamarin forms 3.1

This commit is contained in:
Kyle Spearrin
2018-06-29 12:45:10 -04:00
parent 993fc2e6f4
commit e5e3ebdbba
14 changed files with 57 additions and 36 deletions

View File

@@ -35,7 +35,7 @@
<PackageReference Include="Xam.Plugin.Connectivity" Version="3.0.3" />
<PackageReference Include="Xam.Plugins.Settings" Version="3.1.1" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.3.4" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
<PackageReference Include="XLabs.IoC" Version="2.0.5782" />
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.1.47" />
</ItemGroup>

View File

@@ -25,8 +25,8 @@ namespace Bit.App.Controls
public static readonly BindableProperty BottomBorderColorProperty =
BindableProperty.Create(nameof(BottomBorderColor), typeof(Color), typeof(ExtendedEntry), Color.Default);
public static readonly BindableProperty MaxLengthProperty =
BindableProperty.Create(nameof(MaxLength), typeof(int), typeof(ExtendedEntry), int.MaxValue);
public static readonly BindableProperty TargetMaxLengthProperty =
BindableProperty.Create(nameof(TargetMaxLength), typeof(int), typeof(ExtendedEntry), int.MaxValue);
public bool HasBorder
{
@@ -46,13 +46,13 @@ namespace Bit.App.Controls
set { SetValue(BottomBorderColorProperty, value); }
}
public int MaxLength
public int TargetMaxLength
{
get { return (int)GetValue(MaxLengthProperty); }
set { SetValue(MaxLengthProperty, value); }
get { return (int)GetValue(TargetMaxLengthProperty); }
set { SetValue(TargetMaxLengthProperty, value); }
}
public ReturnType? ReturnType { get; set; }
public Enums.ReturnType? TargetReturnType { get; set; }
public bool? Autocorrect { get; set; }
public bool DisableAutocapitalize { get; set; }
public bool AllowClear { get; set; }

View File

@@ -171,11 +171,11 @@ namespace Bit.App.Controls
_nextElement = value;
if(_nextElement != null && Entry != null)
{
Entry.ReturnType = Enums.ReturnType.Next;
Entry.TargetReturnType = Enums.ReturnType.Next;
}
else if(Entry != null)
{
Entry.ReturnType = null;
Entry.TargetReturnType = null;
}
}
}

View File

@@ -20,7 +20,7 @@ namespace Bit.App.Controls
Entry = new ExtendedEntry
{
Keyboard = Keyboard.Numeric,
MaxLength = 4,
TargetMaxLength = 4,
HideCursor = true
};

View File

@@ -38,7 +38,7 @@ namespace Bit.App.Pages
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
useLabelAsPlaceholder: true, imageSource: "lock.png", containerPadding: padding);
PasswordCell.Entry.ReturnType = Enums.ReturnType.Go;
PasswordCell.Entry.TargetReturnType = Enums.ReturnType.Go;
var table = new ExtendedTableView
{

View File

@@ -62,7 +62,7 @@ namespace Bit.App.Pages
EmailCell.Entry.Text = lastLoginEmail;
}
PasswordCell.Entry.ReturnType = Enums.ReturnType.Go;
PasswordCell.Entry.TargetReturnType = Enums.ReturnType.Go;
var table = new ExtendedTableView
{

View File

@@ -129,7 +129,7 @@ namespace Bit.App.Pages
imageSource: "lock", containerPadding: padding);
TokenCell.Entry.Keyboard = Keyboard.Numeric;
TokenCell.Entry.ReturnType = ReturnType.Go;
TokenCell.Entry.TargetReturnType = Enums.ReturnType.Go;
var table = new TwoFactorTable(
new TableSection(Helpers.GetEmptyTableSectionTitle())
@@ -254,7 +254,7 @@ namespace Bit.App.Pages
{
TokenCell = new FormEntryCell("", isPassword: true, imageSource: "lock",
useLabelAsPlaceholder: true);
TokenCell.Entry.ReturnType = ReturnType.Go;
TokenCell.Entry.TargetReturnType = Enums.ReturnType.Go;
section.Insert(0, TokenCell);
}

View File

@@ -36,7 +36,7 @@ namespace Bit.App.Pages
EmailCell = new FormEntryCell(AppResources.EmailAddress, entryKeyboard: Keyboard.Email,
useLabelAsPlaceholder: true, imageSource: "envelope.png", containerPadding: padding);
EmailCell.Entry.ReturnType = Enums.ReturnType.Go;
EmailCell.Entry.TargetReturnType = Enums.ReturnType.Go;
var table = new ExtendedTableView
{

View File

@@ -60,7 +60,7 @@ namespace Bit.App.Pages
entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope.png",
containerPadding: padding);
PasswordHintCell.Entry.ReturnType = Enums.ReturnType.Done;
PasswordHintCell.Entry.TargetReturnType = Enums.ReturnType.Done;
var table = new FormTableView(this)
{

View File

@@ -400,7 +400,9 @@ namespace Bit.App.Pages
LengthSlider = new Slider(5, 64, _settings.GetValueOrDefault(Constants.PasswordGeneratorLength, 10))
{
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand
VerticalOptions = LayoutOptions.CenterAndExpand,
MaximumTrackColor = Color.Gray,
MinimumTrackColor = Color.Gray,
};
Value = new Label

View File

@@ -47,8 +47,6 @@ namespace Bit.App.Utilities
return iOS;
case Device.Android:
return Android;
case Device.WinPhone:
return WinPhone;
case Device.UWP:
return Windows;
default: