mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Auth: Reload CSS if mode change
This commit is contained in:
parent
4ba0fb102f
commit
492a9ec229
@ -104,9 +104,10 @@ class Auth
|
|||||||
// Reload CSS if the theme changed
|
// Reload CSS if the theme changed
|
||||||
$themingConfig = Icinga::app()->getConfig()->getSection('themes');
|
$themingConfig = Icinga::app()->getConfig()->getSection('themes');
|
||||||
$userTheme = $user->getPreferences()->getValue('icingaweb', 'theme');
|
$userTheme = $user->getPreferences()->getValue('icingaweb', 'theme');
|
||||||
|
$themeMode = $user->getPreferences()->getValue('icingaweb', 'theme_mode');
|
||||||
if (! (bool) $themingConfig->get('disabled', false) && $userTheme !== null) {
|
if (! (bool) $themingConfig->get('disabled', false) && $userTheme !== null) {
|
||||||
$defaultTheme = $themingConfig->get('default', StyleSheet::DEFAULT_THEME);
|
$defaultTheme = $themingConfig->get('default', StyleSheet::DEFAULT_THEME);
|
||||||
if ($userTheme !== $defaultTheme) {
|
if (($userTheme !== $defaultTheme) || ($themeMode !== StyleSheet::DEFAULT_MODE)) {
|
||||||
$this->getResponse()->setReloadCss(true);
|
$this->getResponse()->setReloadCss(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user