1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01:00

fix: Updated styles and copy, simpler logic

This commit is contained in:
Tomer Shvueli 2021-03-11 11:00:39 -05:00
parent 6eb7106bc5
commit da37add779
3 changed files with 7 additions and 6 deletions

View File

@ -886,7 +886,7 @@
"message": "If a login form is detected, automatically perform an auto-fill when the web page loads."
},
"enableAutoTotpCopyOnAutoFill": {
"message": "Enable Copy to Clipboard of TOTP"
"message": "Copy TOTP to clipboard after auto-fill"
},
"experimentalFeature": {
"message": "This is currently an experimental feature. Use at your own risk."

View File

@ -10,8 +10,10 @@
}
.box {
padding-left: 15px;
padding-bottom: 5px;
width: calc(100% - 15px);
margin-left: 15px;
margin-bottom: 5px;
border-left: 1px solid #000000;
}
.box-header {

View File

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