#11543 Added login screen changes in white mode

This commit is contained in:
Jorge Rincon 2023-07-03 17:37:01 +02:00
parent b3d098794d
commit d25a5e2b89
3 changed files with 16 additions and 5 deletions

View File

@ -30,7 +30,7 @@ require_once __DIR__.'/../include/functions_html.php';
echo '<style>
:root {';
if ($config['style'] === 'pandora') {
echo '--login-background-color: rgba(255, 255, 255, 0.4);';
echo '--login-background-color: rgba(255, 255, 255, 0.46);';
echo '--login-label-color: #545454;';
echo '--login-text-color: #000;';
$style_theme = 'white-theme';
@ -237,16 +237,18 @@ if (is_metaconsole() === true) {
);
}
} else if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo/logo-default-pandorafms.png' : 'enterprise/images/custom_logo_login/'.$config['custom_logo_login'];
if (!isset($config['custom_logo_login'])) {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else {
html_print_image(ui_get_full_url('enterprise/images/custom_logo_login/'.$config['custom_logo_login']), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
}
} else {
$theme_logo = ($config['style'] === 'pandora') ? 'images/custom_logo/logo-default-pandorafms.png' : 'images/custom_logo_login/'.$config['custom_logo_login'];
if (empty($config['custom_logo_login']) === true) {
html_print_image(ui_get_full_url('images/custom_logo_login/Pandora-FMS-1.png'), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
} else {
html_print_image(ui_get_full_url('images/custom_logo_login/').$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
html_print_image(ui_get_full_url($theme_logo), false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
}
}

View File

@ -572,6 +572,9 @@ $userManagementTable->data['line2_looknfeel'][0] = html_print_select_from_sql(
true
);
// Hidden hint to change theme.
$hin_change_theme = ui_print_help_tip(__('When changing the theme, the login screen logo will be restricted to the default for that color scheme, if you have a custom logo, adjust it after changing the theme.'), true, '', '', 'display: none;');
if (is_metaconsole() === true) {
if (users_is_admin() === true) {
$userManagementTable->data['line1_looknfeel'][1] = $outputMetaAccess[0];
@ -579,7 +582,7 @@ if (is_metaconsole() === true) {
}
} else {
if (function_exists('skins_print_select')) {
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme');
$userManagementTable->data['line1_looknfeel'][1] = __('User color scheme').$hin_change_theme;
$userManagementTable->data['line2_looknfeel'][1] = skins_print_select($id_usr, 'skin', $user_info['id_skin'], '', __('None'), 0, true);
}
}
@ -795,5 +798,10 @@ $(document).ready(function () {
128,
128
);
//Hint to change theme.
$('#skin1').on("change", () => {
$('#advanced-line1_looknfeel-1 > a').css('display', 'block');
})
});
</script>

View File

@ -351,6 +351,7 @@ span.span1 {
font-family: "lato-bolder";
color: #fff;
margin-right: 30px;
text-shadow: 20px 15px 7px rgba(9, 9, 9, 0.8);
}
span.span2 {