mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-05 18:47:52 +01:00
Pass vault state (locked/unlocked) to notificationBar
This commit is contained in:
parent
210e0801ff
commit
686c7fbfff
@ -676,13 +676,20 @@ export default class MainBackground {
|
|||||||
if (this.notificationQueue[i].tabId !== tab.id || this.notificationQueue[i].domain !== tabDomain) {
|
if (this.notificationQueue[i].tabId !== tab.id || this.notificationQueue[i].domain !== tabDomain) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.notificationQueue[i].type === 'addLogin') {
|
if (this.notificationQueue[i].type === 'addLogin') {
|
||||||
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
|
typeData: {
|
||||||
|
isVaultLocked: this.notificationQueue[i].wasVaultLocked,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
} else if (this.notificationQueue[i].type === 'changePassword') {
|
} else if (this.notificationQueue[i].type === 'changePassword') {
|
||||||
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
||||||
type: 'change',
|
type: 'change',
|
||||||
|
typeData: {
|
||||||
|
isVaultLocked: this.notificationQueue[i].wasVaultLocked,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -444,10 +444,10 @@ document.addEventListener('DOMContentLoaded', event => {
|
|||||||
barPage = barPage + '?success=' + typeData.text;
|
barPage = barPage + '?success=' + typeData.text;
|
||||||
break;
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
barPage = barPage + '?add=1';
|
barPage = barPage + '?add=1&isVaultLocked=' + typeData.isVaultLocked;
|
||||||
break;
|
break;
|
||||||
case 'change':
|
case 'change':
|
||||||
barPage = barPage + '?change=1';
|
barPage = barPage + '?change=1&isVaultLocked=' + typeData.isVaultLocked;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -20,6 +20,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
setTimeout(load, 50);
|
setTimeout(load, 50);
|
||||||
|
|
||||||
function load() {
|
function load() {
|
||||||
|
const isVaultLocked = getQueryVariable('isVaultLocked') == 'true';
|
||||||
var closeButton = document.getElementById('close-button'),
|
var closeButton = document.getElementById('close-button'),
|
||||||
body = document.querySelector('body'),
|
body = document.querySelector('body'),
|
||||||
bodyRect = body.getBoundingClientRect();
|
bodyRect = body.getBoundingClientRect();
|
||||||
|
Loading…
Reference in New Issue
Block a user