mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
copy totp to clipboard before closing popup
This commit is contained in:
parent
966927fe3c
commit
690d94d142
@ -83,21 +83,26 @@ angular
|
|||||||
chrome.tabs.sendMessage(tabId, {
|
chrome.tabs.sendMessage(tabId, {
|
||||||
command: 'fillForm',
|
command: 'fillForm',
|
||||||
fillScript: fillScript
|
fillScript: fillScript
|
||||||
}, { frameId: pageDetails[i].frameId }, $window.close);
|
}, { frameId: pageDetails[i].frameId }, function () {
|
||||||
|
if (login.totp && tokenService.getPremium()) {
|
||||||
|
totpService.isAutoCopyEnabled().then(function (enabled) {
|
||||||
|
if (enabled) {
|
||||||
|
return totpService.getCode(login.totp);
|
||||||
|
}
|
||||||
|
|
||||||
if (login.totp && tokenService.getPremium()) {
|
return null;
|
||||||
totpService.isAutoCopyEnabled().then(function (enabled) {
|
}).then(function (code) {
|
||||||
if (enabled) {
|
if (code) {
|
||||||
return totpService.getCode(login.totp);
|
utilsService.copyToClipboard(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
$window.close();
|
||||||
}).then(function (code) {
|
});
|
||||||
if (code) {
|
}
|
||||||
utilsService.copyToClipboard(code);
|
else {
|
||||||
}
|
$window.close();
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user