From 6258a9cff91d80257dd64a6fa30f9b11374d16eb Mon Sep 17 00:00:00 2001 From: eliykat <31796059+eliykat@users.noreply.github.com> Date: Fri, 13 Nov 2020 02:23:34 +1000 Subject: [PATCH] reposition buttons in Log In and Unlock pages (#1073) * reposition buttons in Log In and Unlock pages - Log In page: move Log In button to primary location below password entry, move Get Your Master Password Hint to the More Options menu - Unlock page (Verify Master Password): swap position of Unlock and Log Out buttons * finish changes to improved login ui - move Log Out button in lock screen to secondary menu - show Get Hint button on login screen in the iOS autofill login flow Co-authored-by: Matt Portune <59324545+mportune-bw@users.noreply.github.com> --- src/App/Pages/Accounts/LockPage.xaml | 12 +++++++-- src/App/Pages/Accounts/LockPage.xaml.cs | 26 +++++++++++++++++++ src/App/Pages/Accounts/LoginPage.xaml | 14 +++++++--- src/App/Pages/Accounts/LoginPage.xaml.cs | 26 +++++++++++++++++++ src/App/Pages/Accounts/LoginPageViewModel.cs | 9 +------ .../CredentialProviderViewController.cs | 1 - src/iOS.Extension/LoadingViewController.cs | 1 - 7 files changed, 74 insertions(+), 15 deletions(-) diff --git a/src/App/Pages/Accounts/LockPage.xaml b/src/App/Pages/Accounts/LockPage.xaml index 2c9c5dcab..5bb281f1f 100644 --- a/src/App/Pages/Accounts/LockPage.xaml +++ b/src/App/Pages/Accounts/LockPage.xaml @@ -16,11 +16,19 @@ + + - @@ -112,7 +120,7 @@ IsVisible="{Binding BiometricIntegrityValid, Converter={StaticResource inverseBool}}" /> - + diff --git a/src/App/Pages/Accounts/LockPage.xaml.cs b/src/App/Pages/Accounts/LockPage.xaml.cs index 25107c65b..428772647 100644 --- a/src/App/Pages/Accounts/LockPage.xaml.cs +++ b/src/App/Pages/Accounts/LockPage.xaml.cs @@ -1,4 +1,5 @@ using Bit.App.Models; +using Bit.App.Resources; using Bit.Core.Abstractions; using Bit.Core.Utilities; using System; @@ -29,6 +30,15 @@ namespace Bit.App.Pages _vm.UnlockedAction = () => Device.BeginInvokeOnMainThread(async () => await UnlockedAsync()); MasterPasswordEntry = _masterPassword; PinEntry = _pin; + + if (Device.RuntimePlatform == Device.iOS) + { + ToolbarItems.Add(_moreItem); + } + else + { + ToolbarItems.Add(_logOut); + } } public Entry MasterPasswordEntry { get; set; } @@ -97,6 +107,22 @@ namespace Bit.App.Pages } } + private async void More_Clicked(object sender, System.EventArgs e) + { + if (!DoOnce()) + { + return; + } + + var selection = await DisplayActionSheet(AppResources.Options, + AppResources.Cancel, null, AppResources.LogOut); + + if (selection == AppResources.LogOut) + { + await _vm.LogOutAsync(); + } + } + private async Task UnlockedAsync() { if (AppHelpers.SetAlternateMainPage(_appOptions)) diff --git a/src/App/Pages/Accounts/LoginPage.xaml b/src/App/Pages/Accounts/LoginPage.xaml index 3c8677d1a..1363785ce 100644 --- a/src/App/Pages/Accounts/LoginPage.xaml +++ b/src/App/Pages/Accounts/LoginPage.xaml @@ -16,12 +16,20 @@ + + - @@ -73,8 +81,8 @@ AutomationProperties.Name="{u:I18n ToggleVisibility}" /> - -