diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index defea6760e..7738a8a1d1 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -98,8 +98,13 @@ environmentService.setUrlsFromStorage().then(() => { return syncService.fullSync(true); }); -function initFactory(i18n: I18nService): Function { - return () => i18n.init(); +function initFactory(i18n: I18nService, platformUtilsService: DesktopPlatformUtilsService): Function { + return async () => { + await i18n.init(); + const htmlEl = window.document.documentElement; + htmlEl.classList.add('os_' + platformUtilsService.getDeviceString()); + htmlEl.classList.add('locale_' + i18n.translationLocale); + }; } @NgModule({ @@ -121,7 +126,10 @@ function initFactory(i18n: I18nService): Function { { provide: APP_INITIALIZER, useFactory: initFactory, - deps: [I18nServiceAbstraction], + deps: [ + I18nServiceAbstraction, + PlatformUtilsServiceAbstraction, + ], multi: true, }, ], diff --git a/src/index.html b/src/index.html index c67cc8fa9f..d786e532d5 100644 --- a/src/index.html +++ b/src/index.html @@ -1,5 +1,5 @@  - + diff --git a/src/scss/base.scss b/src/scss/base.scss index 8ceb536165..b5a162b273 100644 --- a/src/scss/base.scss +++ b/src/scss/base.scss @@ -16,10 +16,6 @@ html, body { line-height: 1.42857143; } -body { - border-top: 1px solid $border-color-dark; -} - h1, h2, h3, h4, h5, h6 { font-family: $font-family-sans-serif; color: $text-color; diff --git a/src/scss/environment.scss b/src/scss/environment.scss new file mode 100644 index 0000000000..95ce9ffa04 --- /dev/null +++ b/src/scss/environment.scss @@ -0,0 +1,7 @@ +@import "variables.scss"; + +html.os_windows { + body { + border-top: 1px solid $border-color-dark; + } +} diff --git a/src/scss/styles.scss b/src/scss/styles.scss index 2af19043a6..f876ed3171 100644 --- a/src/scss/styles.scss +++ b/src/scss/styles.scss @@ -8,3 +8,4 @@ @import "misc.scss"; @import "modal.scss"; @import "plugins.scss"; +@import "environment.scss";