|
|
@ -6,21 +6,6 @@
|
|
|
|
WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing')
|
|
|
|
WEB_PIC_SRC=$(uci -q get argon.@global[0].online_wallpaper || echo 'bing')
|
|
|
|
CACHE=/var/run/argon_${WEB_PIC_SRC}.url
|
|
|
|
CACHE=/var/run/argon_${WEB_PIC_SRC}.url
|
|
|
|
WRLOCK=/var/lock/argon_${WEB_PIC_SRC}.lock
|
|
|
|
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() {
|
|
|
|
fetch_pic_url() {
|
|
|
|
case $WEB_PIC_SRC in
|
|
|
|
case $WEB_PIC_SRC in
|
|
|
|