From f48235f3cfecf5f59aa4f8432e115ac757d591b4 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Fri, 21 May 2021 15:17:04 +0300 Subject: [PATCH] [themes] fix dependance theme from config --- apps/common/main/lib/util/htmlutils.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js index 24e522aba..37bff2dbf 100644 --- a/apps/common/main/lib/util/htmlutils.js +++ b/apps/common/main/lib/util/htmlutils.js @@ -32,8 +32,17 @@ var params = (function() { return urlParams; })(); -if ( !!params.uitheme && !localStorage.getItem("ui-theme") ) +if ( !!params.uitheme && !localStorage.getItem("ui-theme") ) { + // const _t = params.uitheme.match(/([\w-]+)/g); + + if ( params.uitheme == 'default-dark' ) + params.uitheme = 'theme-dark'; + else + if ( params.uitheme == 'default-light' ) + params.uitheme = 'theme-classic-light'; + localStorage.setItem("ui-theme", params.uitheme); +} var ui_theme_name = localStorage.getItem("ui-theme"); if ( !!ui_theme_name ) {