1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-18 11:05:41 +01:00

add size adjustment classes

This commit is contained in:
Kyle Spearrin 2018-04-06 15:52:53 -04:00
parent fa8761073a
commit 1256e6ddc7

View File

@ -60,10 +60,15 @@ export const authService = new AuthService(getBgService<CryptoService>('cryptoSe
export function initFactory(i18nService: I18nService, storageService: StorageService): Function {
return async () => {
const htmlEl = window.document.documentElement;
if (window.screen.availHeight < 600) {
window.document.body.classList.add('xs');
} else if (window.screen.availHeight <= 800) {
window.document.body.classList.add('sm');
}
if (i18nService != null) {
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
authService.init();
htmlEl.classList.add('locale_' + i18nService.translationLocale);
}
stateService.save(ConstantsService.disableFaviconKey,