diff --git a/root/usr/libexec/argon/online_wallpaper b/root/usr/libexec/argon/online_wallpaper index daafcd3..230e60c 100755 --- a/root/usr/libexec/argon/online_wallpaper +++ b/root/usr/libexec/argon/online_wallpaper @@ -6,6 +6,21 @@ WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing') CACHE=/var/run/argon_${WEB_PIC_SRC}.url WRLOCK=/var/lock/argon_${WEB_PIC_SRC}.lock +#Fix Dark and Light mode CSS on dashboard +local argon_mode=$(uci get argon.@global[0].mode 2>/dev/null) + local css_path="/www/luci-static/resources/view/dashboard/css/custom.css" + + if [[ "$argon_mode" == "dark" ]]; then + echo "Applying dark mode..." + rm -f "$css_path" + cp -f /etc/dark.css "$css_path" + elif [[ "$argon_mode" == "light" ]]; then + echo "Applying light mode..." + rm -f "$css_path" + cp -f /etc/light.css "$css_path" + else + echo "The Argon theme mode is set to normal or is undefined. No changes made." +fi fetch_pic_url() { case $WEB_PIC_SRC in