From 16f70dc0ceb815ece611fb57a92e056c300c6170 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Tue, 26 Jul 2022 09:55:16 +0200 Subject: [PATCH] [EC-348] change blacklisted to blocked URIs (#2012) * [EC-348] update blacklisted to blocked URIs * [EC-348] update variable names --- src/App/Pages/Settings/OptionsPage.xaml | 10 ++++----- src/App/Pages/Settings/OptionsPage.xaml.cs | 6 ++--- .../Pages/Settings/OptionsPageViewModel.cs | 22 +++++++++---------- src/App/Resources/AppResources.Designer.cs | 8 +++---- src/App/Resources/AppResources.resx | 8 +++---- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/App/Pages/Settings/OptionsPage.xaml b/src/App/Pages/Settings/OptionsPage.xaml index 8c4e3081b..2f3abbf67 100644 --- a/src/App/Pages/Settings/OptionsPage.xaml +++ b/src/App/Pages/Settings/OptionsPage.xaml @@ -132,20 +132,20 @@ diff --git a/src/App/Pages/Settings/OptionsPage.xaml.cs b/src/App/Pages/Settings/OptionsPage.xaml.cs index 256c9909e..cb07027b2 100644 --- a/src/App/Pages/Settings/OptionsPage.xaml.cs +++ b/src/App/Pages/Settings/OptionsPage.xaml.cs @@ -45,12 +45,12 @@ namespace Bit.App.Pages protected async override void OnDisappearing() { base.OnDisappearing(); - await _vm.UpdateAutofillBlacklistedUris(); + await _vm.UpdateAutofillBlockedUris(); } - private async void BlacklistedUrisEditor_Unfocused(object sender, FocusEventArgs e) + private async void AutofillBlockedUrisEditor_Unfocused(object sender, FocusEventArgs e) { - await _vm.UpdateAutofillBlacklistedUris(); + await _vm.UpdateAutofillBlockedUris(); } private async void Close_Clicked(object sender, System.EventArgs e) diff --git a/src/App/Pages/Settings/OptionsPageViewModel.cs b/src/App/Pages/Settings/OptionsPageViewModel.cs index 2cdb2b157..9a794c58c 100644 --- a/src/App/Pages/Settings/OptionsPageViewModel.cs +++ b/src/App/Pages/Settings/OptionsPageViewModel.cs @@ -17,7 +17,7 @@ namespace Bit.App.Pages private bool _autofillSavePrompt; - private string _autofillBlacklistedUris; + private string _autofillBlockedUris; private bool _favicon; private bool _autoTotpCopy; private int _clearClipboardSelectedIndex; @@ -167,10 +167,10 @@ namespace Bit.App.Pages } } - public string AutofillBlacklistedUris + public string AutofillBlockedUris { - get => _autofillBlacklistedUris; - set => SetProperty(ref _autofillBlacklistedUris, value); + get => _autofillBlockedUris; + set => SetProperty(ref _autofillBlockedUris, value); } public bool ShowAndroidAutofillSettings @@ -182,8 +182,8 @@ namespace Bit.App.Pages public async Task InitAsync() { AutofillSavePrompt = !(await _stateService.GetAutofillDisableSavePromptAsync()).GetValueOrDefault(); - var blacklistedUrisList = await _stateService.GetAutofillBlacklistedUrisAsync(); - AutofillBlacklistedUris = blacklistedUrisList != null ? string.Join(", ", blacklistedUrisList) : null; + var blockedUrisList = await _stateService.GetAutofillBlacklistedUrisAsync(); + AutofillBlockedUris = blockedUrisList != null ? string.Join(", ", blockedUrisList) : null; AutoTotpCopy = !(await _stateService.GetDisableAutoTotpCopyAsync() ?? false); Favicon = !(await _stateService.GetDisableFaviconAsync()).GetValueOrDefault(); var theme = await _stateService.GetThemeAsync(); @@ -252,19 +252,19 @@ namespace Bit.App.Pages } } - public async Task UpdateAutofillBlacklistedUris() + public async Task UpdateAutofillBlockedUris() { if (_inited) { - if (string.IsNullOrWhiteSpace(AutofillBlacklistedUris)) + if (string.IsNullOrWhiteSpace(AutofillBlockedUris)) { await _stateService.SetAutofillBlacklistedUrisAsync(null); - AutofillBlacklistedUris = null; + AutofillBlockedUris = null; return; } try { - var csv = AutofillBlacklistedUris; + var csv = AutofillBlockedUris; var urisList = new List(); foreach (var uri in csv.Split(',')) { @@ -281,7 +281,7 @@ namespace Bit.App.Pages urisList.Add(cleanedUri); } await _stateService.SetAutofillBlacklistedUrisAsync(urisList); - AutofillBlacklistedUris = string.Join(", ", urisList); + AutofillBlockedUris = string.Join(", ", urisList); } catch { } } diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index 9d12cf2e2..13728fd05 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -2759,15 +2759,15 @@ namespace Bit.App.Resources { } } - public static string BlacklistedUris { + public static string AutofillBlockedUris { get { - return ResourceManager.GetString("BlacklistedUris", resourceCulture); + return ResourceManager.GetString("AutofillBlockedUris", resourceCulture); } } - public static string BlacklistedUrisDescription { + public static string AutofillBlockedUrisDescription { get { - return ResourceManager.GetString("BlacklistedUrisDescription", resourceCulture); + return ResourceManager.GetString("AutofillBlockedUrisDescription", resourceCulture); } } diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 220d7316e..6c8a69ce9 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -1573,11 +1573,11 @@ Nord 'Nord' is the name of a specific color scheme. It should not be translated. - - Blacklisted URIs + + Auto-fill blocked URIs - - URIs that are blacklisted will not offer auto-fill. The list should be comma separated. Ex: "https://twitter.com, androidapp://com.twitter.android". + + Auto-fill will not be offered for blocked URIs. Separate multiple URIs with a comma. For example: "https://twitter.com, androidapp://com.twitter.android". Ask to add login