Merge pull request #2101 from bitwarden/responsive-notificationbar
Fully responsive notificationBar
This commit is contained in:
commit
ec5a2299ca
|
@ -3,7 +3,7 @@ require('./bar.scss');
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
var i18n = {};
|
var i18n = {};
|
||||||
var lang = window.navigator.language;
|
var lang = window.navigator.language;
|
||||||
|
|
||||||
i18n.appName = chrome.i18n.getMessage('appName');
|
i18n.appName = chrome.i18n.getMessage('appName');
|
||||||
i18n.close = chrome.i18n.getMessage('close');
|
i18n.close = chrome.i18n.getMessage('close');
|
||||||
i18n.yes = chrome.i18n.getMessage('yes');
|
i18n.yes = chrome.i18n.getMessage('yes');
|
||||||
|
@ -100,12 +100,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sendPlatformMessage({
|
window.addEventListener("resize", adjustHeight);
|
||||||
command: 'bgAdjustNotificationBar',
|
adjustHeight();
|
||||||
data: {
|
|
||||||
height: body.scrollHeight
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQueryVariable(variable) {
|
function getQueryVariable(variable) {
|
||||||
|
@ -145,4 +141,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
select.appendChild(new Option(folder.name, folder.id || '', false));
|
select.appendChild(new Option(folder.name, folder.id || '', false));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function adjustHeight() {
|
||||||
|
sendPlatformMessage({
|
||||||
|
command: 'bgAdjustNotificationBar',
|
||||||
|
data: {
|
||||||
|
height: document.querySelector('body').scrollHeight
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,29 +13,19 @@
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
border-bottom: 2px solid #175ddc;
|
border-bottom: 2px solid #175ddc;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr auto 1fr;
|
grid-template-columns: 24px auto 55px;
|
||||||
column-gap: 10px;
|
|
||||||
grid-column-gap: 10px;
|
grid-column-gap: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 42px;
|
min-height: 42px;
|
||||||
}
|
|
||||||
|
|
||||||
.outer-wrapper > * {
|
|
||||||
align-self: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-wrapper {
|
.inner-wrapper {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 2fr 1fr;
|
grid-template-columns: auto max-content;
|
||||||
column-gap: 10px;
|
|
||||||
grid-column-gap: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#content .change-buttons {
|
|
||||||
justify-self: end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper > *, .inner-wrapper > * {
|
.outer-wrapper > *, .inner-wrapper > * {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,17 +77,6 @@ button.neutral {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body[class*='lang-en'] .add-buttons {
|
|
||||||
width: 175px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
body[class*='lang-en'] .add-buttons {
|
|
||||||
width: 420px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (print) {
|
@media (print) {
|
||||||
body {
|
body {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Reference in New Issue