[EC-348] change blacklisted to blocked URIs (#2012)

* [EC-348] update blacklisted to blocked URIs

* [EC-348] update variable names
This commit is contained in:
Andreas Coroiu 2022-07-26 09:55:16 +02:00 committed by GitHub
parent f0ebc5e644
commit 16f70dc0ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 27 deletions

View File

@ -132,20 +132,20 @@
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}">
<StackLayout StyleClass="box-row, box-row-input">
<Label
Text="{u:I18n BlacklistedUris}"
Text="{u:I18n AutofillBlockedUris}"
StyleClass="box-label" />
<Editor
x:Name="_blacklistedUrisEditor"
Text="{Binding AutofillBlacklistedUris}"
x:Name="_autofillBlockedUrisEditor"
Text="{Binding AutofillBlockedUris}"
StyleClass="box-value"
AutoSize="TextChanges"
IsSpellCheckEnabled="False"
IsTextPredictionEnabled="False"
Keyboard="Url"
Unfocused="BlacklistedUrisEditor_Unfocused" />
Unfocused="AutofillBlockedUrisEditor_Unfocused" />
</StackLayout>
<Label
Text="{u:I18n BlacklistedUrisDescription}"
Text="{u:I18n AutofillBlockedUrisDescription}"
StyleClass="box-footer-label" />
</StackLayout>
</StackLayout>

View File

@ -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)

View File

@ -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<string>();
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 { }
}

View File

@ -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);
}
}

View File

@ -1573,11 +1573,11 @@
<value>Nord</value>
<comment>'Nord' is the name of a specific color scheme. It should not be translated.</comment>
</data>
<data name="BlacklistedUris" xml:space="preserve">
<value>Blacklisted URIs</value>
<data name="AutofillBlockedUris" xml:space="preserve">
<value>Auto-fill blocked URIs</value>
</data>
<data name="BlacklistedUrisDescription" xml:space="preserve">
<value>URIs that are blacklisted will not offer auto-fill. The list should be comma separated. Ex: "https://twitter.com, androidapp://com.twitter.android".</value>
<data name="AutofillBlockedUrisDescription" xml:space="preserve">
<value>Auto-fill will not be offered for blocked URIs. Separate multiple URIs with a comma. For example: "https://twitter.com, androidapp://com.twitter.android".</value>
</data>
<data name="AskToAddLogin" xml:space="preserve">
<value>Ask to add login</value>