2023-02-16 23:37:45 +08:00
local api = require " luci.passwall.api "
2022-03-11 19:09:49 +08:00
local appname = api.appname
m = Map ( appname )
-- [[ App Settings ]]--
s = m : section ( TypedSection , " global_app " , translate ( " App Update " ) ,
2023-03-22 09:20:32 +08:00
" <font color='red'> " ..
translate ( " Please confirm that your firmware supports FPU. " ) ..
" </font> " )
2022-03-11 19:09:49 +08:00
s.anonymous = true
2023-03-21 16:22:45 +08:00
s : append ( Template ( appname .. " /app_update/app_version " ) )
local k , v
local com = require " luci.passwall.com "
for k , v in pairs ( com ) do
2023-03-22 09:20:32 +08:00
o = s : option ( Value , k : gsub ( " %- " , " _ " ) .. " _file " , translatef ( " %s App Path " , v.name ) )
o.default = v.default_path or ( " /usr/bin/ " .. k )
o.rmempty = false
2023-03-21 16:22:45 +08:00
end
2022-03-11 19:09:49 +08:00
o = s : option ( DummyValue , " tips " , " " )
o.rawhtml = true
o.cfgvalue = function ( t , n )
2023-03-22 09:20:32 +08:00
return string.format ( ' <font color="red">%s</font> ' , translate ( " if you want to run from memory, change the path, /tmp beginning then save the application and update it manually. " ) )
2022-03-11 19:09:49 +08:00
end
return m