[PS-686] Mobile update negative copy in settings (#1961)

* feat: update auto totp copy setting

* feat: update show icons settings

* feat: update auto add settings

* feat: update settings and options to sentence case

* feat: update translation keys

With the latest changes the translation keys had diverged from their contents.
This commit fixes that.

* fix: revert AndroidManifest changes

* chore: add todo comments to fix negative functions
This commit is contained in:
Andreas Coroiu 2022-07-11 08:45:42 +02:00 committed by GitHub
parent cceded2a0f
commit 67f49a0591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 79 additions and 86 deletions

View file

@ -83,31 +83,31 @@
<StackLayout StyleClass="box"> <StackLayout StyleClass="box">
<StackLayout StyleClass="box-row, box-row-switch"> <StackLayout StyleClass="box-row, box-row-switch">
<Label <Label
Text="{u:I18n DisableAutoTotpCopy}" Text="{u:I18n CopyTotpAutomatically}"
StyleClass="box-label-regular" StyleClass="box-label-regular"
HorizontalOptions="StartAndExpand" /> HorizontalOptions="StartAndExpand" />
<Switch <Switch
IsToggled="{Binding DisableAutoTotpCopy}" IsToggled="{Binding AutoTotpCopy}"
StyleClass="box-value" StyleClass="box-value"
HorizontalOptions="End" /> HorizontalOptions="End" />
</StackLayout> </StackLayout>
<Label <Label
Text="{u:I18n DisableAutoTotpCopyDescription}" Text="{u:I18n CopyTotpAutomaticallyDescription}"
StyleClass="box-footer-label, box-footer-label-switch" /> StyleClass="box-footer-label, box-footer-label-switch" />
</StackLayout> </StackLayout>
<StackLayout StyleClass="box"> <StackLayout StyleClass="box">
<StackLayout StyleClass="box-row, box-row-switch"> <StackLayout StyleClass="box-row, box-row-switch">
<Label <Label
Text="{u:I18n DisableWebsiteIcons}" Text="{u:I18n ShowWebsiteIcons}"
StyleClass="box-label-regular" StyleClass="box-label-regular"
HorizontalOptions="StartAndExpand" /> HorizontalOptions="StartAndExpand" />
<Switch <Switch
IsToggled="{Binding DisableFavicon}" IsToggled="{Binding Favicon}"
StyleClass="box-value" StyleClass="box-value"
HorizontalOptions="End" /> HorizontalOptions="End" />
</StackLayout> </StackLayout>
<Label <Label
Text="{u:I18n DisableWebsiteIconsDescription}" Text="{u:I18n ShowWebsiteIconsDescription}"
StyleClass="box-footer-label, box-footer-label-switch" /> StyleClass="box-footer-label, box-footer-label-switch" />
</StackLayout> </StackLayout>
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}"> <StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}">
@ -117,16 +117,16 @@
</StackLayout> </StackLayout>
<StackLayout StyleClass="box-row, box-row-switch"> <StackLayout StyleClass="box-row, box-row-switch">
<Label <Label
Text="{u:I18n DisableSavePrompt}" Text="{u:I18n AskToAddLogin}"
StyleClass="box-label-regular" StyleClass="box-label-regular"
HorizontalOptions="StartAndExpand" /> HorizontalOptions="StartAndExpand" />
<Switch <Switch
IsToggled="{Binding AutofillDisableSavePrompt}" IsToggled="{Binding AutofillSavePrompt}"
StyleClass="box-value" StyleClass="box-value"
HorizontalOptions="End" /> HorizontalOptions="End" />
</StackLayout> </StackLayout>
<Label <Label
Text="{u:I18n DisableSavePromptDescription}" Text="{u:I18n AskToAddLoginDescription}"
StyleClass="box-footer-label, box-footer-label-switch" /> StyleClass="box-footer-label, box-footer-label-switch" />
</StackLayout> </StackLayout>
<StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}"> <StackLayout StyleClass="box" IsVisible="{Binding ShowAndroidAutofillSettings}">

View file

@ -12,15 +12,14 @@ namespace Bit.App.Pages
{ {
public class OptionsPageViewModel : BaseViewModel public class OptionsPageViewModel : BaseViewModel
{ {
private readonly ITotpService _totpService;
private readonly IStateService _stateService; private readonly IStateService _stateService;
private readonly IMessagingService _messagingService; private readonly IMessagingService _messagingService;
private bool _autofillDisableSavePrompt; private bool _autofillSavePrompt;
private string _autofillBlacklistedUris; private string _autofillBlacklistedUris;
private bool _disableFavicon; private bool _favicon;
private bool _disableAutoTotpCopy; private bool _autoTotpCopy;
private int _clearClipboardSelectedIndex; private int _clearClipboardSelectedIndex;
private int _themeSelectedIndex; private int _themeSelectedIndex;
private int _autoDarkThemeSelectedIndex; private int _autoDarkThemeSelectedIndex;
@ -31,7 +30,6 @@ namespace Bit.App.Pages
public OptionsPageViewModel() public OptionsPageViewModel()
{ {
_totpService = ServiceContainer.Resolve<ITotpService>("totpService");
_stateService = ServiceContainer.Resolve<IStateService>("stateService"); _stateService = ServiceContainer.Resolve<IStateService>("stateService");
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService"); _messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
@ -133,38 +131,38 @@ namespace Bit.App.Pages
} }
} }
public bool DisableFavicon public bool Favicon
{ {
get => _disableFavicon; get => _favicon;
set set
{ {
if (SetProperty(ref _disableFavicon, value)) if (SetProperty(ref _favicon, value))
{ {
UpdateDisableFaviconAsync().FireAndForget(); UpdateFaviconAsync().FireAndForget();
} }
} }
} }
public bool DisableAutoTotpCopy public bool AutoTotpCopy
{ {
get => _disableAutoTotpCopy; get => _autoTotpCopy;
set set
{ {
if (SetProperty(ref _disableAutoTotpCopy, value)) if (SetProperty(ref _autoTotpCopy, value))
{ {
UpdateAutoTotpCopyAsync().FireAndForget(); UpdateAutoTotpCopyAsync().FireAndForget();
} }
} }
} }
public bool AutofillDisableSavePrompt public bool AutofillSavePrompt
{ {
get => _autofillDisableSavePrompt; get => _autofillSavePrompt;
set set
{ {
if (SetProperty(ref _autofillDisableSavePrompt, value)) if (SetProperty(ref _autofillSavePrompt, value))
{ {
UpdateAutofillDisableSavePromptAsync().FireAndForget(); UpdateAutofillSavePromptAsync().FireAndForget();
} }
} }
} }
@ -183,11 +181,11 @@ namespace Bit.App.Pages
public async Task InitAsync() public async Task InitAsync()
{ {
AutofillDisableSavePrompt = (await _stateService.GetAutofillDisableSavePromptAsync()).GetValueOrDefault(); AutofillSavePrompt = !(await _stateService.GetAutofillDisableSavePromptAsync()).GetValueOrDefault();
var blacklistedUrisList = await _stateService.GetAutofillBlacklistedUrisAsync(); var blacklistedUrisList = await _stateService.GetAutofillBlacklistedUrisAsync();
AutofillBlacklistedUris = blacklistedUrisList != null ? string.Join(", ", blacklistedUrisList) : null; AutofillBlacklistedUris = blacklistedUrisList != null ? string.Join(", ", blacklistedUrisList) : null;
DisableAutoTotpCopy = !(await _totpService.IsAutoCopyEnabledAsync()); AutoTotpCopy = !(await _stateService.GetDisableAutoTotpCopyAsync() ?? false);
DisableFavicon = (await _stateService.GetDisableFaviconAsync()).GetValueOrDefault(); Favicon = !(await _stateService.GetDisableFaviconAsync()).GetValueOrDefault();
var theme = await _stateService.GetThemeAsync(); var theme = await _stateService.GetThemeAsync();
ThemeSelectedIndex = ThemeOptions.FindIndex(k => k.Key == theme); ThemeSelectedIndex = ThemeOptions.FindIndex(k => k.Key == theme);
var autoDarkTheme = await _stateService.GetAutoDarkThemeAsync() ?? "dark"; var autoDarkTheme = await _stateService.GetAutoDarkThemeAsync() ?? "dark";
@ -204,15 +202,17 @@ namespace Bit.App.Pages
{ {
if (_inited) if (_inited)
{ {
await _stateService.SetDisableAutoTotpCopyAsync(DisableAutoTotpCopy); // TODO: [PS-961] Fix negative function names
await _stateService.SetDisableAutoTotpCopyAsync(!AutoTotpCopy);
} }
} }
private async Task UpdateDisableFaviconAsync() private async Task UpdateFaviconAsync()
{ {
if (_inited) if (_inited)
{ {
await _stateService.SetDisableFaviconAsync(DisableFavicon); // TODO: [PS-961] Fix negative function names
await _stateService.SetDisableFaviconAsync(!Favicon);
} }
} }
@ -243,11 +243,12 @@ namespace Bit.App.Pages
} }
} }
private async Task UpdateAutofillDisableSavePromptAsync() private async Task UpdateAutofillSavePromptAsync()
{ {
if (_inited) if (_inited)
{ {
await _stateService.SetAutofillDisableSavePromptAsync(AutofillDisableSavePrompt); // TODO: [PS-961] Fix negative function names
await _stateService.SetAutofillDisableSavePromptAsync(!AutofillSavePrompt);
} }
} }

View file

@ -1,6 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -9,9 +10,10 @@
namespace Bit.App.Resources { namespace Bit.App.Resources {
using System; using System;
using System.Reflection;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.1.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources { public class AppResources {
@ -1479,15 +1481,15 @@ namespace Bit.App.Resources {
} }
} }
public static string DisableAutoTotpCopyDescription { public static string CopyTotpAutomaticallyDescription {
get { get {
return ResourceManager.GetString("DisableAutoTotpCopyDescription", resourceCulture); return ResourceManager.GetString("CopyTotpAutomaticallyDescription", resourceCulture);
} }
} }
public static string DisableAutoTotpCopy { public static string CopyTotpAutomatically {
get { get {
return ResourceManager.GetString("DisableAutoTotpCopy", resourceCulture); return ResourceManager.GetString("CopyTotpAutomatically", resourceCulture);
} }
} }
@ -1917,15 +1919,15 @@ namespace Bit.App.Resources {
} }
} }
public static string DisableWebsiteIcons { public static string ShowWebsiteIcons {
get { get {
return ResourceManager.GetString("DisableWebsiteIcons", resourceCulture); return ResourceManager.GetString("ShowWebsiteIcons", resourceCulture);
} }
} }
public static string DisableWebsiteIconsDescription { public static string ShowWebsiteIconsDescription {
get { get {
return ResourceManager.GetString("DisableWebsiteIconsDescription", resourceCulture); return ResourceManager.GetString("ShowWebsiteIconsDescription", resourceCulture);
} }
} }
@ -2757,15 +2759,15 @@ namespace Bit.App.Resources {
} }
} }
public static string DisableSavePrompt { public static string AskToAddLogin {
get { get {
return ResourceManager.GetString("DisableSavePrompt", resourceCulture); return ResourceManager.GetString("AskToAddLogin", resourceCulture);
} }
} }
public static string DisableSavePromptDescription { public static string AskToAddLoginDescription {
get { get {
return ResourceManager.GetString("DisableSavePromptDescription", resourceCulture); return ResourceManager.GetString("AskToAddLoginDescription", resourceCulture);
} }
} }

View file

@ -236,7 +236,7 @@
<comment>The button text that allows user to launch the website to their web browser.</comment> <comment>The button text that allows user to launch the website to their web browser.</comment>
</data> </data>
<data name="HelpAndFeedback" xml:space="preserve"> <data name="HelpAndFeedback" xml:space="preserve">
<value>Help and Feedback</value> <value>Help and feedback</value>
</data> </data>
<data name="Hide" xml:space="preserve"> <data name="Hide" xml:space="preserve">
<value>Hide</value> <value>Hide</value>
@ -269,7 +269,7 @@
<comment>Title for login page. (noun)</comment> <comment>Title for login page. (noun)</comment>
</data> </data>
<data name="LogOut" xml:space="preserve"> <data name="LogOut" xml:space="preserve">
<value>Log Out</value> <value>Log out</value>
<comment>The log out button text (verb).</comment> <comment>The log out button text (verb).</comment>
</data> </data>
<data name="LogoutConfirmation" xml:space="preserve"> <data name="LogoutConfirmation" xml:space="preserve">
@ -412,7 +412,7 @@
<value>Add an Item</value> <value>Add an Item</value>
</data> </data>
<data name="AppExtension" xml:space="preserve"> <data name="AppExtension" xml:space="preserve">
<value>App Extension</value> <value>App extension</value>
</data> </data>
<data name="AutofillAccessibilityDescription" xml:space="preserve"> <data name="AutofillAccessibilityDescription" xml:space="preserve">
<value>Use the Bitwarden accessibility service to auto-fill your logins across apps and the web.</value> <value>Use the Bitwarden accessibility service to auto-fill your logins across apps and the web.</value>
@ -516,7 +516,7 @@
<value>Get your master password hint</value> <value>Get your master password hint</value>
</data> </data>
<data name="ImportItems" xml:space="preserve"> <data name="ImportItems" xml:space="preserve">
<value>Import Items</value> <value>Import items</value>
</data> </data>
<data name="ImportItemsConfirmation" xml:space="preserve"> <data name="ImportItemsConfirmation" xml:space="preserve">
<value>You can bulk import items from the bitwarden.com web vault. Do you want to visit the website now?</value> <value>You can bulk import items from the bitwarden.com web vault. Do you want to visit the website now?</value>
@ -549,10 +549,10 @@
<value>Immediately</value> <value>Immediately</value>
</data> </data>
<data name="VaultTimeout" xml:space="preserve"> <data name="VaultTimeout" xml:space="preserve">
<value>Vault Timeout</value> <value>Vault timeout</value>
</data> </data>
<data name="VaultTimeoutAction" xml:space="preserve"> <data name="VaultTimeoutAction" xml:space="preserve">
<value>Vault Timeout Action</value> <value>Vault timeout action</value>
</data> </data>
<data name="VaultTimeoutLogOutConfirmation" xml:space="preserve"> <data name="VaultTimeoutLogOutConfirmation" xml:space="preserve">
<value>Logging out will remove all access to your vault and requires online authentication after the timeout period. Are you sure you want to use this setting?</value> <value>Logging out will remove all access to your vault and requires online authentication after the timeout period. Are you sure you want to use this setting?</value>
@ -647,7 +647,7 @@
<comment>Push notifications for apple products</comment> <comment>Push notifications for apple products</comment>
</data> </data>
<data name="RateTheApp" xml:space="preserve"> <data name="RateTheApp" xml:space="preserve">
<value>Rate the App</value> <value>Rate the app</value>
</data> </data>
<data name="RateTheAppDescription" xml:space="preserve"> <data name="RateTheAppDescription" xml:space="preserve">
<value>Please consider helping us out with a good review!</value> <value>Please consider helping us out with a good review!</value>
@ -701,7 +701,7 @@
<comment>What Apple calls their fingerprint reader.</comment> <comment>What Apple calls their fingerprint reader.</comment>
</data> </data>
<data name="TwoStepLogin" xml:space="preserve"> <data name="TwoStepLogin" xml:space="preserve">
<value>Two-step Login</value> <value>Two-step login</value>
</data> </data>
<data name="TwoStepLoginConfirmation" xml:space="preserve"> <data name="TwoStepLoginConfirmation" xml:space="preserve">
<value>Two-step login makes your account more secure by requiring you to verify your login with another device such as a security key, authenticator app, SMS, phone call, or email. Two-step login can be enabled on the bitwarden.com web vault. Do you want to visit the website now?</value> <value>Two-step login makes your account more secure by requiring you to verify your login with another device such as a security key, authenticator app, SMS, phone call, or email. Two-step login can be enabled on the bitwarden.com web vault. Do you want to visit the website now?</value>
@ -710,7 +710,7 @@
<value>Unlock with {0}</value> <value>Unlock with {0}</value>
</data> </data>
<data name="UnlockWithPIN" xml:space="preserve"> <data name="UnlockWithPIN" xml:space="preserve">
<value>Unlock with PIN Code</value> <value>Unlock with PIN code</value>
</data> </data>
<data name="Validating" xml:space="preserve"> <data name="Validating" xml:space="preserve">
<value>Validating</value> <value>Validating</value>
@ -907,11 +907,11 @@
<data name="CopyTotp" xml:space="preserve"> <data name="CopyTotp" xml:space="preserve">
<value>Copy TOTP</value> <value>Copy TOTP</value>
</data> </data>
<data name="DisableAutoTotpCopyDescription" xml:space="preserve"> <data name="CopyTotpAutomaticallyDescription" xml:space="preserve">
<value>If your login has an authenticator key attached to it, the TOTP verification code is automatically copied to your clipboard whenever you auto-fill the login.</value> <value>If a login has an authenticator key, copy the TOTP verification code to your clip-board when you auto-fill the login.</value>
</data> </data>
<data name="DisableAutoTotpCopy" xml:space="preserve"> <data name="CopyTotpAutomatically" xml:space="preserve">
<value>Disable Automatic TOTP Copy</value> <value>Copy TOTP automatically</value>
</data> </data>
<data name="PremiumRequired" xml:space="preserve"> <data name="PremiumRequired" xml:space="preserve">
<value>A premium membership is required to use this feature.</value> <value>A premium membership is required to use this feature.</value>
@ -1128,11 +1128,11 @@
<data name="Expiration" xml:space="preserve"> <data name="Expiration" xml:space="preserve">
<value>Expiration</value> <value>Expiration</value>
</data> </data>
<data name="DisableWebsiteIcons" xml:space="preserve"> <data name="ShowWebsiteIcons" xml:space="preserve">
<value>Disable Website Icons</value> <value>Show website icons</value>
</data> </data>
<data name="DisableWebsiteIconsDescription" xml:space="preserve"> <data name="ShowWebsiteIconsDescription" xml:space="preserve">
<value>Website Icons provide a recognizable image next to each login item in your vault.</value> <value>Show a recognizable image next to each login.</value>
</data> </data>
<data name="IconsUrl" xml:space="preserve"> <data name="IconsUrl" xml:space="preserve">
<value>Icons Server URL</value> <value>Icons Server URL</value>
@ -1311,7 +1311,7 @@
<value>5. Select "Bitwarden"</value> <value>5. Select "Bitwarden"</value>
</data> </data>
<data name="PasswordAutofill" xml:space="preserve"> <data name="PasswordAutofill" xml:space="preserve">
<value>Password AutoFill</value> <value>Password auto-fill</value>
</data> </data>
<data name="BitwardenAutofillAlert2" xml:space="preserve"> <data name="BitwardenAutofillAlert2" xml:space="preserve">
<value>The easiest way to add new logins to your vault is by using the Bitwarden Password AutoFill extension. Learn more about using the Bitwarden Password AutoFill extension by navigating to the "Settings" screen.</value> <value>The easiest way to add new logins to your vault is by using the Bitwarden Password AutoFill extension. Learn more about using the Bitwarden Password AutoFill extension by navigating to the "Settings" screen.</value>
@ -1449,7 +1449,7 @@
<value>There are no folders to list.</value> <value>There are no folders to list.</value>
</data> </data>
<data name="FingerprintPhrase" xml:space="preserve"> <data name="FingerprintPhrase" xml:space="preserve">
<value>Fingerprint Phrase</value> <value>Fingerprint phrase</value>
<comment>A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing.</comment> <comment>A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing.</comment>
</data> </data>
<data name="YourAccountsFingerprint" xml:space="preserve"> <data name="YourAccountsFingerprint" xml:space="preserve">
@ -1460,10 +1460,10 @@
<value>Bitwarden allows you to share your vault items with others by using an organization account. Would you like to visit the bitwarden.com website to learn more?</value> <value>Bitwarden allows you to share your vault items with others by using an organization account. Would you like to visit the bitwarden.com website to learn more?</value>
</data> </data>
<data name="ExportVault" xml:space="preserve"> <data name="ExportVault" xml:space="preserve">
<value>Export Vault</value> <value>Export vault</value>
</data> </data>
<data name="LockNow" xml:space="preserve"> <data name="LockNow" xml:space="preserve">
<value>Lock Now</value> <value>Lock now</value>
</data> </data>
<data name="PIN" xml:space="preserve"> <data name="PIN" xml:space="preserve">
<value>PIN</value> <value>PIN</value>
@ -1517,7 +1517,7 @@
<value>2 minutes</value> <value>2 minutes</value>
</data> </data>
<data name="ClearClipboard" xml:space="preserve"> <data name="ClearClipboard" xml:space="preserve">
<value>Clear Clipboard</value> <value>Clear clipboard</value>
<comment>Clipboard is the operating system thing where you copy/paste data to on your device.</comment> <comment>Clipboard is the operating system thing where you copy/paste data to on your device.</comment>
</data> </data>
<data name="ClearClipboardDescription" xml:space="preserve"> <data name="ClearClipboardDescription" xml:space="preserve">
@ -1525,7 +1525,7 @@
<comment>Clipboard is the operating system thing where you copy/paste data to on your device.</comment> <comment>Clipboard is the operating system thing where you copy/paste data to on your device.</comment>
</data> </data>
<data name="DefaultUriMatchDetection" xml:space="preserve"> <data name="DefaultUriMatchDetection" xml:space="preserve">
<value>Default URI Match Detection</value> <value>Default URI match detection</value>
<comment>Default URI match detection for auto-fill.</comment> <comment>Default URI match detection for auto-fill.</comment>
</data> </data>
<data name="DefaultUriMatchDetectionDescription" xml:space="preserve"> <data name="DefaultUriMatchDetectionDescription" xml:space="preserve">
@ -1573,14 +1573,14 @@
<data name="BlacklistedUrisDescription" xml:space="preserve"> <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> <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> </data>
<data name="DisableSavePrompt" xml:space="preserve"> <data name="AskToAddLogin" xml:space="preserve">
<value>Disable Save Prompt</value> <value>Ask to add login</value>
</data> </data>
<data name="DisableSavePromptDescription" xml:space="preserve"> <data name="AskToAddLoginDescription" xml:space="preserve">
<value>The "Save Prompt" automatically prompts you to save new items to your vault whenever you enter them for the first time.</value> <value>Ask to add an item if one isn't found in your vault.</value>
</data> </data>
<data name="OnRestart" xml:space="preserve"> <data name="OnRestart" xml:space="preserve">
<value>On App Restart</value> <value>On app restart</value>
</data> </data>
<data name="AutofillServiceNotEnabled" xml:space="preserve"> <data name="AutofillServiceNotEnabled" xml:space="preserve">
<value>Auto-fill makes it easy to securely access your Bitwarden vault from other websites and apps. It looks like you have not enabled an auto-fill service for Bitwarden. Enable auto-fill for Bitwarden from the "Settings" screen.</value> <value>Auto-fill makes it easy to securely access your Bitwarden vault from other websites and apps. It looks like you have not enabled an auto-fill service for Bitwarden. Enable auto-fill for Bitwarden from the "Settings" screen.</value>
@ -2159,7 +2159,7 @@
<value>Account removed successfully</value> <value>Account removed successfully</value>
</data> </data>
<data name="DeleteAccount" xml:space="preserve"> <data name="DeleteAccount" xml:space="preserve">
<value>Delete Account</value> <value>Delete account</value>
</data> </data>
<data name="DeletingYourAccountIsPermanent" xml:space="preserve"> <data name="DeletingYourAccountIsPermanent" xml:space="preserve">
<value>Deleting your account is permanent</value> <value>Deleting your account is permanent</value>

View file

@ -6,6 +6,5 @@ namespace Bit.Core.Abstractions
{ {
Task<string> GetCodeAsync(string key); Task<string> GetCodeAsync(string key);
int GetTimeInterval(string key); int GetTimeInterval(string key);
Task<bool> IsAutoCopyEnabledAsync();
} }
} }

View file

@ -10,14 +10,11 @@ namespace Bit.Core.Services
{ {
private const string SteamChars = "23456789BCDFGHJKMNPQRTVWXY"; private const string SteamChars = "23456789BCDFGHJKMNPQRTVWXY";
private readonly IStateService _stateService;
private readonly ICryptoFunctionService _cryptoFunctionService; private readonly ICryptoFunctionService _cryptoFunctionService;
public TotpService( public TotpService(
IStateService stateService,
ICryptoFunctionService cryptoFunctionService) ICryptoFunctionService cryptoFunctionService)
{ {
_stateService = stateService;
_cryptoFunctionService = cryptoFunctionService; _cryptoFunctionService = cryptoFunctionService;
} }
@ -132,11 +129,5 @@ namespace Bit.Core.Services
} }
return period; return period;
} }
public async Task<bool> IsAutoCopyEnabledAsync()
{
var disabled = await _stateService.GetDisableAutoTotpCopyAsync();
return !disabled.GetValueOrDefault();
}
} }
} }

View file

@ -74,7 +74,7 @@ namespace Bit.Core.Utilities
}); });
var passwordGenerationService = new PasswordGenerationService(cryptoService, stateService, var passwordGenerationService = new PasswordGenerationService(cryptoService, stateService,
cryptoFunctionService, policyService); cryptoFunctionService, policyService);
var totpService = new TotpService(stateService, cryptoFunctionService); var totpService = new TotpService(cryptoFunctionService);
var authService = new AuthService(cryptoService, cryptoFunctionService, apiService, stateService, var authService = new AuthService(cryptoService, cryptoFunctionService, apiService, stateService,
tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService,
keyConnectorService); keyConnectorService);