관리자가 모든 모듈의 다크모드 설정을 제어하도록 합니다. (#1558)

* 관리자가 다크모드 작동 여부를 선택할 수 있도록 수정
This commit is contained in:
Min-Soo Kim 2021-01-10 22:21:13 +09:00 committed by GitHub
parent b7856e5683
commit 899fe00dda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 75 additions and 9 deletions

View file

@ -1113,6 +1113,13 @@ class adminAdminController extends admin
$vars->html_header = utf8_trim($vars->html_header);
$vars->html_footer = utf8_trim($vars->html_footer);
// Validate the color scheme setting.
$valid_color_scheme_options = array('off_light', 'off_dark', 'auto_light_dark');
if (!in_array($vars->color_scheme, $valid_color_scheme_options))
{
$vars->color_scheme = 'off_light';
}
// Merge all settings into an array.
$settings = array(
'title' => $vars->title,
@ -1123,6 +1130,7 @@ class adminAdminController extends admin
'meta_description' => $vars->meta_description,
'html_header' => $vars->html_header,
'html_footer' => $vars->html_footer,
'color_scheme' => $vars->color_scheme
);
// Get the DB object and begin a transaction.