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) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (this.notificationQueue[i].type === 'addLogin') {
|
||||
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
||||
type: 'add',
|
||||
typeData: {
|
||||
isVaultLocked: this.notificationQueue[i].wasVaultLocked,
|
||||
},
|
||||
});
|
||||
} else if (this.notificationQueue[i].type === 'changePassword') {
|
||||
BrowserApi.tabSendMessageData(tab, 'openNotificationBar', {
|
||||
type: 'change',
|
||||
typeData: {
|
||||
isVaultLocked: this.notificationQueue[i].wasVaultLocked,
|
||||
},
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -444,10 +444,10 @@ document.addEventListener('DOMContentLoaded', event => {
|
|||
barPage = barPage + '?success=' + typeData.text;
|
||||
break;
|
||||
case 'add':
|
||||
barPage = barPage + '?add=1';
|
||||
barPage = barPage + '?add=1&isVaultLocked=' + typeData.isVaultLocked;
|
||||
break;
|
||||
case 'change':
|
||||
barPage = barPage + '?change=1';
|
||||
barPage = barPage + '?change=1&isVaultLocked=' + typeData.isVaultLocked;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -20,6 +20,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
setTimeout(load, 50);
|
||||
|
||||
function load() {
|
||||
const isVaultLocked = getQueryVariable('isVaultLocked') == 'true';
|
||||
var closeButton = document.getElementById('close-button'),
|
||||
body = document.querySelector('body'),
|
||||
bodyRect = body.getBoundingClientRect();
|
||||
|
|
Loading…
Reference in New Issue