mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 17:43:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,10 @@
|
||||
config global
|
||||
option primary '#5e72e4'
|
||||
option dark_primary '#483d8b'
|
||||
option blur '0'
|
||||
option blur_dark '0'
|
||||
option transparency '0.3'
|
||||
option transparency_dark '0.3'
|
||||
option mode 'normal'
|
||||
option online_wallpaper 'bing'
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
bing_background="$(uci -q get "argon.@global[0].bing_background")"
|
||||
[ -n "$bing_background" ] || exit 0
|
||||
|
||||
if [ "$bing_background" = "1" ]; then
|
||||
uci -q set "argon.@global[0].online_wallpaper"="bing"
|
||||
else
|
||||
uci -q set "argon.@global[0].online_wallpaper"="none"
|
||||
fi
|
||||
uci -q delete "argon.@global[0].bing_background"
|
||||
uci -q commit "argon"
|
||||
|
||||
exit 0
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
readonly bg_path="/www/luci-static/argon/background"
|
||||
readonly tmp_path="/tmp/argon_background.tmp"
|
||||
|
||||
case "$1" in
|
||||
"list")
|
||||
json_init
|
||||
json_add_object "remove"
|
||||
json_add_string "filename" "filename"
|
||||
json_close_object
|
||||
json_add_object "rename"
|
||||
json_add_string "newname" "filename"
|
||||
json_close_object
|
||||
json_dump
|
||||
json_cleanup
|
||||
;;
|
||||
"call")
|
||||
case "$2" in
|
||||
"remove")
|
||||
read -r input
|
||||
json_load "$input"
|
||||
json_get_var filename "filename"
|
||||
json_cleanup
|
||||
|
||||
if dirname "$filename" | grep -q ".."; then
|
||||
echo '{ "result": 255 }'
|
||||
exit 255
|
||||
fi
|
||||
|
||||
rm -f "$bg_path/$filename"
|
||||
echo '{ "result": 0 }'
|
||||
;;
|
||||
"rename")
|
||||
read -r input
|
||||
json_load "$input"
|
||||
json_get_var newname "newname"
|
||||
json_cleanup
|
||||
|
||||
if dirname "$newname" | grep -q ".."; then
|
||||
echo '{ "result": 255 }'
|
||||
exit 255
|
||||
fi
|
||||
|
||||
if mv "$tmp_path" "$bg_path/$newname" 2>"/dev/null"; then
|
||||
chmod 0644 "$bg_path/$newname"
|
||||
echo '{ "result": 0 }'
|
||||
else
|
||||
echo '{ "result": 1 }'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"admin/system/argon-config": {
|
||||
"title": "Argon Config",
|
||||
"order": 90,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "argon-config"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-argon-config" ],
|
||||
"uci": { "argon": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"luci-app-argon-config": {
|
||||
"description": "Grant UCI access for luci-app-argon-config",
|
||||
"read": {
|
||||
"file": {
|
||||
"/www/luci-static/argon/background/*": [ "list" ]
|
||||
},
|
||||
"ubus": {
|
||||
"luci.argon": [ "remove", "rename" ],
|
||||
"system": [ "info" ]
|
||||
},
|
||||
"uci": [ "argon" ]
|
||||
},
|
||||
"write": {
|
||||
"file": {
|
||||
"/tmp/argon_background.tmp": [ "write" ]
|
||||
},
|
||||
"uci": [ "argon" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user