Update appList.lua
This commit is contained in:
parent
aab808b9dd
commit
319cb28ffe
1 changed files with 8 additions and 16 deletions
|
@ -1,26 +1,11 @@
|
||||||
local spkList = "/.sPhone/config/spklist"
|
local spkList = "/.sPhone/config/spklist"
|
||||||
local dir = "/.sPhone/spk/"
|
local dir = "/.sPhone/apps/spk/"
|
||||||
if not fs.exists(spkList) then
|
if not fs.exists(spkList) then
|
||||||
config.list("/.sPhone/config/spklist")
|
config.list("/.sPhone/config/spklist")
|
||||||
end
|
end
|
||||||
|
|
||||||
local _list = config.list("/.sPhone/config/spklist")
|
|
||||||
|
|
||||||
local apps = {}
|
local apps = {}
|
||||||
|
|
||||||
for k, v in pairs(_list) do
|
|
||||||
if fs.isDir("/.sPhone/spk/"..k) then
|
|
||||||
if fs.exists(dir..k.."/.spk") then
|
|
||||||
local nDir = dir..k.."/.spk"
|
|
||||||
pDir = dir..k.."/.spk"
|
|
||||||
local name = config.read(pDir,"name")
|
|
||||||
local author = config.read(pDir,"author")
|
|
||||||
local version = config.read(pDir,"version")
|
|
||||||
local id = k
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for k,v in pairs(config.list(spkList)) do
|
for k,v in pairs(config.list(spkList)) do
|
||||||
table.insert(apps,{
|
table.insert(apps,{
|
||||||
id = k,
|
id = k,
|
||||||
|
@ -28,6 +13,13 @@ end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for k,v in ipairs(apps) do
|
||||||
|
local hid = config.read(dir..v.id.."/.spk","hidden")
|
||||||
|
if hid then
|
||||||
|
table.remove(apps,k)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function drawHome()
|
local function drawHome()
|
||||||
term.setBackgroundColor(sPhone.theme["backgroundColor"])
|
term.setBackgroundColor(sPhone.theme["backgroundColor"])
|
||||||
term.clear()
|
term.clear()
|
||||||
|
|
Loading…
Reference in a new issue