From 4580a80ca1fc968d339d87146b69bf7ad8a83096 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 10 Nov 2023 08:15:30 +0000 Subject: [PATCH] Update 'root/usr/libexec/rpcd/luci.argon' --- root/usr/libexec/rpcd/luci.argon | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/root/usr/libexec/rpcd/luci.argon b/root/usr/libexec/rpcd/luci.argon index 9a9468b..be50fb9 100755 --- a/root/usr/libexec/rpcd/luci.argon +++ b/root/usr/libexec/rpcd/luci.argon @@ -3,6 +3,21 @@ . /lib/functions.sh . /usr/share/libubox/jshn.sh + 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 + readonly bg_path="/www/luci-static/argon/background" readonly tmp_path="/tmp/argon_background.tmp"