1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Only retrieve folder list when vault is unlocked

This commit is contained in:
Daniel James Smith
2021-09-30 16:13:29 +02:00
parent 686c7fbfff
commit e0240c6884

View File

@@ -70,16 +70,18 @@ document.addEventListener('DOMContentLoaded', () => {
}); });
}); });
const responseFoldersCommand = 'notificationBarGetFoldersList'; if (!isVaultLocked) {
chrome.runtime.onMessage.addListener((msg) => { const responseFoldersCommand = 'notificationBarGetFoldersList';
if (msg.command === responseFoldersCommand && msg.data) { chrome.runtime.onMessage.addListener((msg) => {
fillSelectorWithFolders(msg.data.folders); if (msg.command === responseFoldersCommand && msg.data) {
} fillSelectorWithFolders(msg.data.folders);
}); }
sendPlatformMessage({ });
command: 'bgGetDataForTab', sendPlatformMessage({
responseCommand: responseFoldersCommand command: 'bgGetDataForTab',
}); responseCommand: responseFoldersCommand
});
}
} else if (getQueryVariable('change')) { } else if (getQueryVariable('change')) {
setContent(document.getElementById('template-change')); setContent(document.getElementById('template-change'));
var changeButton = document.querySelector('#template-change-clone .change-save'); var changeButton = document.querySelector('#template-change-clone .change-save');