1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

Made notificationBar fully responsive

This commit is contained in:
Daniel James Smith
2021-10-06 19:40:40 +02:00
parent bbcbcf2b40
commit 8bc42fcb7f
2 changed files with 16 additions and 32 deletions

View File

@@ -3,7 +3,7 @@ require('./bar.scss');
document.addEventListener('DOMContentLoaded', () => {
var i18n = {};
var lang = window.navigator.language;
i18n.appName = chrome.i18n.getMessage('appName');
i18n.close = chrome.i18n.getMessage('close');
i18n.yes = chrome.i18n.getMessage('yes');
@@ -100,12 +100,8 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
sendPlatformMessage({
command: 'bgAdjustNotificationBar',
data: {
height: body.scrollHeight
}
});
window.addEventListener("resize", adjustHeight);
adjustHeight();
}
function getQueryVariable(variable) {
@@ -145,4 +141,13 @@ document.addEventListener('DOMContentLoaded', () => {
select.appendChild(new Option(folder.name, folder.id || '', false));
});
}
function adjustHeight() {
sendPlatformMessage({
command: 'bgAdjustNotificationBar',
data: {
height: document.querySelector('body').scrollHeight
}
});
}
});