1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

fix: Nest sub option in Options page, tie auto fill & auto copy features together

This commit is contained in:
Tomer Shvueli
2021-03-04 09:58:22 -05:00
parent 72d0a439d2
commit 6eb7106bc5
5 changed files with 18 additions and 25 deletions

View File

@@ -254,12 +254,14 @@ export default class AutofillService implements AutofillServiceInterface {
}
}
const shouldCopyTotpOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled();
const copyTotpOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled();
const enableAutoFill = await this.totpService.isAutoCopyEnabled();
const shouldCopyTotp = copyTotpOnAutoFill && enableAutoFill;
const totpCode = await this.doAutoFill({
cipher: cipher,
pageDetails: pageDetails,
skipTotp: !fromCommand && !shouldCopyTotpOnAutoFill,
skipTotp: !fromCommand && !shouldCopyTotp,
skipLastUsed: !fromCommand,
skipUsernameOnlyFill: !fromCommand,
onlyEmptyFields: !fromCommand,