mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[EC-475] Auto-save password prompt enhancements (#4808)
* [EC-1062] Convert bar.js to TS and refactor (#4623) * [EC-476 / EC-478] Add notificationBar edit flow (#4626) * [EC-477] Enable auto-save for users without individual vault (#4760) * [EC-1057] Add data loss warning to notificationBar edit flow (#4761) * [AC-1173] Fix state bugs in auto-save edit flow (#4936) --------- Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
This commit is contained in:
@@ -56,19 +56,15 @@ export default class RuntimeBackground {
|
||||
}
|
||||
}
|
||||
|
||||
async processMessage(msg: any, sender: any, sendResponse: any) {
|
||||
async processMessage(msg: any, sender: chrome.runtime.MessageSender, sendResponse: any) {
|
||||
switch (msg.command) {
|
||||
case "loggedIn":
|
||||
case "unlocked": {
|
||||
let item: LockedVaultPendingNotificationsItem;
|
||||
|
||||
if (this.lockedVaultPendingNotifications?.length > 0) {
|
||||
await BrowserApi.closeLoginTab();
|
||||
|
||||
item = this.lockedVaultPendingNotifications.pop();
|
||||
if (item.commandToRetry.sender?.tab?.id) {
|
||||
await BrowserApi.focusSpecifiedTab(item.commandToRetry.sender.tab.id);
|
||||
}
|
||||
BrowserApi.closeBitwardenExtensionTab();
|
||||
}
|
||||
|
||||
await this.main.refreshBadge();
|
||||
@@ -104,7 +100,21 @@ export default class RuntimeBackground {
|
||||
await this.main.openPopup();
|
||||
break;
|
||||
case "promptForLogin":
|
||||
await BrowserApi.createNewTab("popup/index.html?uilocation=popout", true, true);
|
||||
BrowserApi.openBitwardenExtensionTab("popup/index.html", true, sender.tab);
|
||||
break;
|
||||
case "openAddEditCipher": {
|
||||
const addEditCipherUrl =
|
||||
msg.data?.cipherId == null
|
||||
? "popup/index.html#/edit-cipher"
|
||||
: "popup/index.html#/edit-cipher?cipherId=" + msg.data.cipherId;
|
||||
|
||||
BrowserApi.openBitwardenExtensionTab(addEditCipherUrl, true, sender.tab);
|
||||
break;
|
||||
}
|
||||
case "closeTab":
|
||||
setTimeout(() => {
|
||||
BrowserApi.closeBitwardenExtensionTab();
|
||||
}, msg.delay ?? 0);
|
||||
break;
|
||||
case "showDialogResolve":
|
||||
this.platformUtilsService.resolveDialogPromise(msg.dialogId, msg.confirmed);
|
||||
@@ -183,11 +193,7 @@ export default class RuntimeBackground {
|
||||
const params =
|
||||
`webAuthnResponse=${encodeURIComponent(msg.data)};` +
|
||||
`remember=${encodeURIComponent(msg.remember)}`;
|
||||
BrowserApi.createNewTab(
|
||||
`popup/index.html?uilocation=popout#/2fa;${params}`,
|
||||
undefined,
|
||||
false
|
||||
);
|
||||
BrowserApi.openBitwardenExtensionTab(`popup/index.html#/2fa;${params}`, false);
|
||||
break;
|
||||
}
|
||||
case "reloadPopup":
|
||||
|
||||
Reference in New Issue
Block a user