mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Merge pull request #853 from johnwang16/auto_dark_mode
Allow auto light/dark mode matching user OS setting by @johnwang16 🙏
This commit is contained in:
@@ -73,10 +73,14 @@
|
||||
<!-- Dark-Mode Patch -->
|
||||
|
||||
<?php
|
||||
if ($ENABLED_DARKMODE === True) {
|
||||
echo '<link rel="stylesheet" href="css/dark-patch.css">';
|
||||
$BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/boxed-bg-dark.png\');"';
|
||||
} else { $BACKGROUND_IMAGE_PATCH='style="background-image: url(\'img/background.png\');"';}
|
||||
switch ($UI_THEME) {
|
||||
case "Dark":
|
||||
echo '<link rel="stylesheet" href="css/dark-patch.css">';
|
||||
break;
|
||||
case "System":
|
||||
echo '<link rel="stylesheet" href="css/system-dark-patch.css">';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
@@ -114,7 +118,7 @@
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
<!-- Layout Boxed Yellow -->
|
||||
|
||||
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" <?php echo $BACKGROUND_IMAGE_PATCH;?> onLoad="show_pia_servertime();" >
|
||||
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="show_pia_servertime();" >
|
||||
<!-- Site wrapper -->
|
||||
<div class="wrapper">
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
// ## GUI settings processing start
|
||||
// ###################################
|
||||
|
||||
if( isset($_COOKIE['UI_dark_mode']))
|
||||
if( isset($_COOKIE['UI_theme']))
|
||||
{
|
||||
$ENABLED_DARKMODE = $_COOKIE['UI_dark_mode'] == "True";
|
||||
$UI_THEME = $_COOKIE['UI_theme'];
|
||||
}else
|
||||
{
|
||||
$ENABLED_DARKMODE = False;
|
||||
$UI_THEME = "Light";
|
||||
}
|
||||
|
||||
$pia_skin_selected = 'skin-blue';
|
||||
@@ -18,4 +18,4 @@ $pia_skin_selected = 'skin-blue';
|
||||
// ## GUI settings processing end
|
||||
// ###################################
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user