Added ability to have per user color themes in CP

This commit is contained in:
Pinga 2025-04-25 13:34:00 +03:00
parent 6413515e75
commit 5b39a7fc19
5 changed files with 153 additions and 47 deletions

View file

@ -155,6 +155,11 @@ $container->set('view', function ($container) {
} else {
$view->getEnvironment()->addGlobal('screen_mode', 'light');
}
if (isset($_SESSION['_theme'])) {
$view->getEnvironment()->addGlobal('theme', $_SESSION['_theme']);
} else {
$view->getEnvironment()->addGlobal('theme', 'blue');
}
if (envi('MINIMUM_DATA') === 'true') {
$view->getEnvironment()->addGlobal('minimum_data', 'true');
} else {