1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

PS-70 Renamed TOTP to Totp to have consistency in naming. Removed a11y text of switch because android was overlapping text.

This commit is contained in:
André Bispo
2022-06-20 14:42:33 +01:00
parent 67fbd55ae9
commit e606ff88a4
4 changed files with 13 additions and 15 deletions

View File

@@ -141,7 +141,7 @@
</StackLayout> </StackLayout>
<StackLayout <StackLayout
IsVisible="{Binding ShowTOTPFilter}" IsVisible="{Binding ShowTotpFilter}"
Orientation="Horizontal" Orientation="Horizontal"
HorizontalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
Margin="0,5,10,0"> Margin="0,5,10,0">
@@ -155,12 +155,10 @@
AutomationProperties.IsInAccessibleTree="True" AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n DisplayItemsContainingTOTP}" /> AutomationProperties.Name="{u:I18n DisplayItemsContainingTOTP}" />
<Switch <Switch
IsToggled="{Binding TOTPFilterEnable}" IsToggled="{Binding TotpFilterEnable}"
StyleClass="box-value" StyleClass="box-value"
HorizontalOptions="End" HorizontalOptions="End"
Toggled="Switch_Toggled" Toggled="TotpFilter_Toggled" />
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n DisplayItemsContainingTOTP}" />
</StackLayout> </StackLayout>
<StackLayout <StackLayout

View File

@@ -185,7 +185,7 @@ namespace Bit.App.Pages
{ {
base.OnDisappearing(); base.OnDisappearing();
IsBusy = false; IsBusy = false;
_vm.TOTPFilterEnable = false; _vm.TotpFilterEnable = false;
_broadcasterService.Unsubscribe(_pageName); _broadcasterService.Unsubscribe(_pageName);
_vm.DisableRefreshing(); _vm.DisableRefreshing();
_accountAvatar?.OnDisappearing(); _accountAvatar?.OnDisappearing();
@@ -298,9 +298,9 @@ namespace Bit.App.Pages
await _accountListOverlay.HideAsync(); await _accountListOverlay.HideAsync();
} }
void Switch_Toggled(System.Object sender, Xamarin.Forms.ToggledEventArgs e) void TotpFilter_Toggled(System.Object sender, Xamarin.Forms.ToggledEventArgs e)
{ {
_vm.TOTPFilterCommand.Execute(null); _vm.TotpFilterCommand.Execute(null);
} }
} }
} }

View File

@@ -83,7 +83,7 @@ namespace Bit.App.Pages
VaultFilterCommand = new AsyncCommand(VaultFilterOptionsAsync, VaultFilterCommand = new AsyncCommand(VaultFilterOptionsAsync,
onException: ex => _logger.Exception(ex), onException: ex => _logger.Exception(ex),
allowsMultipleExecutions: false); allowsMultipleExecutions: false);
TOTPFilterCommand = new AsyncCommand(LoadAsync, TotpFilterCommand = new AsyncCommand(LoadAsync,
onException: ex => _logger.Exception(ex), onException: ex => _logger.Exception(ex),
allowsMultipleExecutions: false); allowsMultipleExecutions: false);
@@ -163,12 +163,12 @@ namespace Bit.App.Pages
get => _showVaultFilter; get => _showVaultFilter;
set => SetProperty(ref _showVaultFilter, value); set => SetProperty(ref _showVaultFilter, value);
} }
public bool ShowTOTPFilter public bool ShowTotpFilter
{ {
get => _showTOTPFilter; get => _showTOTPFilter;
set => SetProperty(ref _showTOTPFilter, value); set => SetProperty(ref _showTOTPFilter, value);
} }
public bool TOTPFilterEnable public bool TotpFilterEnable
{ {
get => _totpFilterEnable; get => _totpFilterEnable;
set => SetProperty(ref _totpFilterEnable, value); set => SetProperty(ref _totpFilterEnable, value);
@@ -193,7 +193,7 @@ namespace Bit.App.Pages
public Command RefreshCommand { get; set; } public Command RefreshCommand { get; set; }
public Command<CipherView> CipherOptionsCommand { get; set; } public Command<CipherView> CipherOptionsCommand { get; set; }
public ICommand VaultFilterCommand { get; } public ICommand VaultFilterCommand { get; }
public ICommand TOTPFilterCommand { get; } public ICommand TotpFilterCommand { get; }
public bool LoadedOnce { get; set; } public bool LoadedOnce { get; set; }
public async Task LoadAsync() public async Task LoadAsync()
@@ -235,7 +235,7 @@ namespace Bit.App.Pages
Loading = true; Loading = true;
ShowList = false; ShowList = false;
ShowAddCipherButton = !Deleted; ShowAddCipherButton = !Deleted;
ShowTOTPFilter = Type == CipherType.Login && canAccessPremium; ShowTotpFilter = Type == CipherType.Login && canAccessPremium;
var groupedItems = new List<GroupingsPageListGroup>(); var groupedItems = new List<GroupingsPageListGroup>();
var page = Page as GroupingsPage; var page = Page as GroupingsPage;
@@ -316,7 +316,7 @@ namespace Bit.App.Pages
} }
if (Ciphers?.Any() ?? false) if (Ciphers?.Any() ?? false)
{ {
if (TOTPFilterEnable) if (TotpFilterEnable)
{ {
var ciphersListItems = Ciphers.Where(c => c.IsDeleted == Deleted && !string.IsNullOrEmpty(c.Login.Totp)) var ciphersListItems = Ciphers.Where(c => c.IsDeleted == Deleted && !string.IsNullOrEmpty(c.Login.Totp))
.Select(c => new GroupingsPageTOTPListItem(c, true)).ToList(); .Select(c => new GroupingsPageTOTPListItem(c, true)).ToList();
@@ -333,7 +333,7 @@ namespace Bit.App.Pages
{ {
item.TotpTickAsync(); item.TotpTickAsync();
} }
return TOTPFilterEnable; return TotpFilterEnable;
}); });
} }
else else