luci-app-argon-config: sync upstream
This commit is contained in:
parent
7e36d40e58
commit
f5a3312827
@ -6,9 +6,9 @@
|
||||
'require ui';
|
||||
'require view';
|
||||
|
||||
var callSystemInfo = rpc.declare({
|
||||
object: 'system',
|
||||
method: 'info'
|
||||
var callAvailSpace = rpc.declare({
|
||||
object: 'luci.argon',
|
||||
method: 'avail'
|
||||
});
|
||||
|
||||
var callRemoveArgon = rpc.declare({
|
||||
@ -34,7 +34,7 @@ return view.extend({
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
uci.load('argon'),
|
||||
L.resolveDefault(callSystemInfo(), {}),
|
||||
L.resolveDefault(callAvailSpace(), {}),
|
||||
L.resolveDefault(fs.list(bg_path), {})
|
||||
]);
|
||||
},
|
||||
@ -112,7 +112,7 @@ return view.extend({
|
||||
}
|
||||
|
||||
s = m.section(form.TypedSection, null, _('Upload background (available space: %1024.2mB)')
|
||||
.format(data[1].root.avail * 1024),
|
||||
.format(data[1].avail * 1024),
|
||||
_('You can upload files such as gif/jpg/mp4/png/webm/webp files, to change the login page background.'));
|
||||
s.addremove = false;
|
||||
s.anonymous = true;
|
||||
|
@ -9,6 +9,8 @@ readonly tmp_path="/tmp/argon_background.tmp"
|
||||
case "$1" in
|
||||
"list")
|
||||
json_init
|
||||
json_add_object "avail"
|
||||
json_close_object
|
||||
json_add_object "remove"
|
||||
json_add_string "filename" "filename"
|
||||
json_close_object
|
||||
@ -20,6 +22,12 @@ case "$1" in
|
||||
;;
|
||||
"call")
|
||||
case "$2" in
|
||||
"avail")
|
||||
json_init
|
||||
json_add_int "avail" "$(df | grep -E '/$' | awk '{print $4}')"
|
||||
json_dump
|
||||
json_cleanup
|
||||
;;
|
||||
"remove")
|
||||
read -r input
|
||||
json_load "$input"
|
||||
|
@ -6,8 +6,7 @@
|
||||
"/www/luci-static/argon/background/*": [ "list" ]
|
||||
},
|
||||
"ubus": {
|
||||
"luci.argon": [ "remove", "rename" ],
|
||||
"system": [ "info" ]
|
||||
"luci.argon": [ "avail", "remove", "rename" ]
|
||||
},
|
||||
"uci": [ "argon" ]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user