add user settings

This commit is contained in:
Simon Vieille 2025-04-13 20:32:13 +02:00
commit fdd8f8850d
Signed by untrusted user: deblan
GPG key ID: 579388D585F70417
20 changed files with 839 additions and 316 deletions

View file

@ -98,7 +98,6 @@ class AdminSettingController extends Controller
'add-logo-link',
'show-settings',
'loader-enabled',
'top-menu-mouse-over-hidden-label',
'always-displayed',
'enabled',
'force',
@ -139,7 +138,6 @@ class AdminSettingController extends Controller
'add-logo-link' => '1',
'show-settings' => '0',
'loader-enabled' => '1',
'top-menu-mouse-over-hidden-label' => '0',
'always-displayed' => '0',
'enabled' => '1',
'force' => '0',
@ -207,6 +205,12 @@ class AdminSettingController extends Controller
}
}
foreach ($defaults as $key => $default) {
if (!array_key_exists($key, $config)) {
$config[$key] = $default;
}
}
$config['langs'] = $this->langRepository->getUsedLangs();
return new JSONResponse($config);