Merge pull request #1188 from ONLYOFFICE/feature/desktop-themes-fix

Feature/desktop themes fix
This commit is contained in:
maxkadushkin 2021-09-20 18:56:52 +03:00 committed by GitHub
commit d846aa49c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,17 @@ var checkLocalStorage = (function () {
} }
})(); })();
if ( window.desktop && window.desktop.theme ) {
if ( window.desktop.theme.id ) {
// params.uitheme = undefined;
localStorage.setItem("ui-theme-id", window.desktop.theme.id);
} else
if ( window.desktop.theme.type ) {
if ( window.desktop.theme.type == 'dark' ) params.uitheme == 'default-dark'; else
if ( window.desktop.theme.type == 'light' ) params.uitheme == 'default-light';
}
}
if ( !!params.uitheme && checkLocalStorage && !localStorage.getItem("ui-theme-id") ) { if ( !!params.uitheme && checkLocalStorage && !localStorage.getItem("ui-theme-id") ) {
// const _t = params.uitheme.match(/([\w-]+)/g); // const _t = params.uitheme.match(/([\w-]+)/g);