diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js index 5b511ce8f..43f3d64f0 100644 --- a/apps/common/main/lib/util/htmlutils.js +++ b/apps/common/main/lib/util/htmlutils.js @@ -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") ) { // const _t = params.uitheme.match(/([\w-]+)/g);