Merge pull request #1627 from emindeniz99/master

fix popup height
This commit is contained in:
Chad Scharf 2021-03-12 15:16:41 -05:00 committed by GitHub
commit 9063a98949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -79,12 +79,16 @@ export function initFactory(platformUtilsService: PlatformUtilsService, i18nServ
return async () => { return async () => {
if (!popupUtilsService.inPopup(window)) { if (!popupUtilsService.inPopup(window)) {
window.document.body.classList.add('body-full'); window.document.body.classList.add('body-full');
} else if (window.screen.availHeight < 600) { } else {
if (window.screen.availHeight < 600) {
window.document.body.classList.add('body-xs'); window.document.body.classList.add('body-xs');
} else if (window.screen.availHeight <= 800) { } else if (window.screen.availHeight <= 800) {
window.document.body.classList.add('body-sm'); window.document.body.classList.add('body-sm');
} }
document.body.style.setProperty('height',`${window.innerHeight}px`,'important');
}
if (BrowserApi.getBackgroundPage() != null) { if (BrowserApi.getBackgroundPage() != null) {
stateService.save(ConstantsService.disableFaviconKey, stateService.save(ConstantsService.disableFaviconKey,
await storageService.get<boolean>(ConstantsService.disableFaviconKey)); await storageService.get<boolean>(ConstantsService.disableFaviconKey));