App: Use Windows helper instead of WinPhone (#203)

Signed-off-by: Alistair Francis <alistair@alistair23.me>
This commit is contained in:
Alistair Francis 2017-12-10 20:26:58 -08:00 committed by Kyle Spearrin
parent 45c0ec9035
commit de20bb22d9
14 changed files with 19 additions and 19 deletions

View File

@ -11,7 +11,7 @@ namespace Bit.App.Controls
BindableProperty.Create(nameof(Padding), typeof(Thickness), typeof(ExtendedButton), default(Thickness));
public static readonly BindableProperty UppercaseProperty =
BindableProperty.Create(nameof(Uppercase), typeof(bool), typeof(ExtendedButton),
Helpers.OnPlatform(iOS: false, Android: true, WinPhone: false));
Helpers.OnPlatform(iOS: false, Android: true, Windows: false));
public Thickness Padding
{

View File

@ -14,7 +14,7 @@ namespace Bit.App.Controls
{
HorizontalTextAlignment = TextAlignment.Center,
FontSize = 35,
FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier")
FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier")
};
Entry = new ExtendedEntry

View File

@ -43,7 +43,7 @@ namespace Bit.App.Controls
Padding = Helpers.OnPlatform(
iOS: new Thickness(15, 8),
Android: new Thickness(15, 2),
WinPhone: new Thickness(15, 8))
Windows: new Thickness(15, 8))
};
if(Device.RuntimePlatform == Device.Android)

View File

@ -33,7 +33,7 @@ namespace Bit.App.Pages
var padding = Helpers.OnPlatform(
iOS: new Thickness(15, 20),
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
Windows: new Thickness(10, 8));
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
useLabelAsPlaceholder: true, imageSource: "lock.png", containerPadding: padding);

View File

@ -123,7 +123,7 @@ namespace Bit.App.Pages
var padding = Helpers.OnPlatform(
iOS: new Thickness(15, 20),
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
Windows: new Thickness(10, 8));
TokenCell = new FormEntryCell(AppResources.VerificationCode, useLabelAsPlaceholder: true,
imageSource: "lock", containerPadding: padding);

View File

@ -33,7 +33,7 @@ namespace Bit.App.Pages
var padding = Helpers.OnPlatform(
iOS: new Thickness(15, 20),
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
Windows: new Thickness(10, 8));
EmailCell = new FormEntryCell(AppResources.EmailAddress, entryKeyboard: Keyboard.Email,
useLabelAsPlaceholder: true, imageSource: "envelope.png", containerPadding: padding);

View File

@ -47,7 +47,7 @@ namespace Bit.App.Pages
var padding = Helpers.OnPlatform(
iOS: new Thickness(15, 20),
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));
Windows: new Thickness(10, 8));
PasswordHintCell = new FormEntryCell(AppResources.MasterPasswordHint, useLabelAsPlaceholder: true,
imageSource: "lightbulb.png", containerPadding: padding);

View File

@ -69,7 +69,7 @@ Fingerprint by masterpage.com from the Noun Project")
Padding = Helpers.OnPlatform(
iOS: new Thickness(15, 20),
Android: new Thickness(16, 20),
WinPhone: new Thickness(15, 20)),
Windows: new Thickness(10, 8)),
BackgroundColor = Color.White
};

View File

@ -95,7 +95,7 @@ namespace Bit.App.Pages
{
var fingerprintName = Helpers.OnPlatform(
iOS: _deviceInfoService.HasFaceIdSupport ? AppResources.FaceID : AppResources.TouchID,
Android: AppResources.Fingerprint, Windows: AppResources.Fingerprint, WinPhone: AppResources.Fingerprint);
Android: AppResources.Fingerprint, Windows: AppResources.Fingerprint);
FingerprintCell = new ExtendedSwitchCell
{
Text = string.Format(AppResources.UnlockWith, fingerprintName),

View File

@ -49,7 +49,7 @@ namespace Bit.App.Pages
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
Margin = new Thickness(15, 40, 15, 40),
HorizontalTextAlignment = TextAlignment.Center,
FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier"),
FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier"),
LineBreakMode = LineBreakMode.TailTruncation,
VerticalOptions = LayoutOptions.Start
};
@ -259,7 +259,7 @@ namespace Bit.App.Pages
Padding = Helpers.OnPlatform(
iOS: new Thickness(15, 8),
Android: new Thickness(16, 10),
WinPhone: new Thickness(15, 8))
Windows: new Thickness(15, 8))
};
stackLayout.AdjustPaddingForDevice();

View File

@ -388,7 +388,7 @@ namespace Bit.App.Pages
LoginTotpCell.Entry.DisableAutocapitalize = true;
LoginTotpCell.Entry.Autocorrect = false;
LoginTotpCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
LoginPasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: LoginTotpCell.Entry,
useButton: true);
@ -396,7 +396,7 @@ namespace Bit.App.Pages
LoginPasswordCell.Entry.DisableAutocapitalize = true;
LoginPasswordCell.Entry.Autocorrect = false;
LoginPasswordCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
if(!string.IsNullOrWhiteSpace(_defaultPassword))
{
LoginPasswordCell.Entry.Text = _defaultPassword;

View File

@ -182,7 +182,7 @@ namespace Bit.App.Pages
if(hidden)
{
textFieldCell.Entry.FontFamily = Helpers.OnPlatform(
iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
textFieldCell.Button.Image = "eye.png";
textFieldCell.Button.Command = new Command(() =>
{

View File

@ -186,7 +186,7 @@ namespace Bit.App.Pages
LoginTotpCell.Entry.DisableAutocapitalize = true;
LoginTotpCell.Entry.Autocorrect = false;
LoginTotpCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
LoginPasswordCell = new FormEntryCell(AppResources.Password, isPassword: true,
nextElement: LoginTotpCell.Entry, useButton: true);
@ -195,7 +195,7 @@ namespace Bit.App.Pages
LoginPasswordCell.Entry.DisableAutocapitalize = true;
LoginPasswordCell.Entry.Autocorrect = false;
LoginPasswordCell.Entry.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
LoginGenerateCell = new ExtendedTextCell
{

View File

@ -126,7 +126,7 @@ namespace Bit.App.Pages
LoginPasswordCell.Button2.Command =
new Command(() => Copy(Model.LoginPassword, AppResources.Password));
LoginPasswordCell.Value.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
LoginPasswordCell.Value.LineBreakMode = LineBreakMode.WordWrap;
// URI
@ -159,7 +159,7 @@ namespace Bit.App.Pages
LoginTotpCodeCell.Sub.SetBinding(Label.TextColorProperty,
nameof(VaultViewCipherPageModel.LoginTotpColor));
LoginTotpCodeCell.Value.FontFamily =
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", WinPhone: "Courier");
Helpers.OnPlatform(iOS: "Menlo-Regular", Android: "monospace", Windows: "Courier");
break;
case CipherType.Card:
CardNameCell = new LabeledValueCell(AppResources.CardholderName);
@ -558,7 +558,7 @@ namespace Bit.App.Pages
: base(field.Name, field.MaskedValue, string.Empty, "clipboard.png")
{
Value.FontFamily = Helpers.OnPlatform(iOS: "Menlo-Regular",
Android: "monospace", WinPhone: "Courier");
Android: "monospace", Windows: "Courier");
if(Device.RuntimePlatform == Device.iOS)
{
Button1.Margin = new Thickness(10, 0);