Commit 92b132aa authored by Danny SMc's avatar Danny SMc

Added updates to the API with settings, thread proxy and more, plus added account page

parent 710ab6d0
ewogIENvbmZpZyA9IHsKICAgIENvbmZpZ0ZpbGVQYXRoID0gIi5EaXNjb3ZlckNvbmZpZyIsCiAgICBCbG9ja1Rlcm1pbmF0ZSA9IHRydWUsCiAgICBFbmFibGVQbHVnaW5zID0gdHJ1ZSwKICAgIFBsdWdpbnNEaXJlY3RvcnkgPSAiL0RBX1BsdWdpbnMiLAogIH0sCiAgQWNjb3VudCA9IHsKICAgIFBhc3N3b3JkID0gImFkNGZhYTI1NjM2N2NhM2U3OWRmYjQwMDBkMjFkN2UyODM0MDBiYmYyOGNmMzI4YTcwNTFkYmJmYTQ1OGI3ZDgiLAogICAgVXNlcm5hbWUgPSAiZGFubnlzbWM5NSIsCiAgfSwKfQ==
\ No newline at end of file
ewogIENvbmZpZyA9IHsKICAgIENvbmZpZ0ZpbGVQYXRoID0gIi5EaXNjb3ZlckNvbmZpZyIsCiAgICBCbG9ja1Rlcm1pbmF0ZSA9IGZhbHNlLAogICAgRW5hYmxlUGx1Z2lucyA9IHRydWUsCiAgICBQbHVnaW5zRGlyZWN0b3J5ID0gIi9EQV9QbHVnaW5zIiwKICB9LAogIEFjY291bnQgPSB7CiAgICBQYXNzd29yZCA9ICJhZDRmYWEyNTYzNjdjYTNlNzlkZmI0MDAwZDIxZDdlMjgzNDAwYmJmMjhjZjMyOGE3MDUxZGJiZmE0NThiN2Q4IiwKICAgIFVzZXJuYW1lID0gImRhbm55c21jOTUiLAogIH0sCn0=
\ No newline at end of file
Finder
-> Add click support
Home: Quit
-> Add popup for shutdown, shutdown pc, reboot, reboot pc
Help FAQ
-> Document everything
Plugins
-> Create DiscoverApp Plugin Store
Chat Rooms
-> Add the screens into this
Core
-> Add auto-update support
DAPI
-> Add FAQ/Help Insertions
-> Add Credits Insertions
PHP-API:
-> Check user account failure and callbacks
\ No newline at end of file
--[[
Name: Account -> Edit
Description: Account Edit Function
--]]
function program.account.edit()
base.screen.colour("white")
program.draw.menubar("Account: Edit")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textl(" Back ", 19, false, "red", "grey")
base.draw.textc("Refresh", 19, false, "orange", "grey")
base.draw.textr("Update ", 19, false, "lightBlue", "grey")
local function update()
base.draw.textc("Downloading your information, please wait", 10, false, "red", "white")
ok, userdata = Discover.User:GetData();
if not ok then
base.gui.alert("Could not obtain data, please try again later!");
sleep(1.5)
program.account.manage();
else
base.draw.box(1, 51, 10, 1, " ", "white", "white")
end
end
local function render()
-- Display username, email, register_date, status, rank
local i = 0;
for k,v in pairs(userdata) do
i = i + 1
base.draw.box(1, 51, i+3, 1, " ", "white", "white")
base.draw.texta(tostring(k):sub(1, 18), 2, i+3, false, "cyan", "white")
base.draw.texta("->", 21, i+3, false, "lightGrey", "white")
base.draw.texta(tostring(v):sub(1, 25), 25, i+3, false, "orange", "white")
end
base.draw.texta(" Change Password ", 2, 12, false, "white", "cyan")
base.draw.texta(" Change Email ", 2, 14, false, "white", "cyan")
end
update(); render();
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Account: Edit")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Account: Edit", args[3], args[4])
elseif (args[3] >= 2 and args[3] <= 5) and args[4] == 19 then
program.account.manage();
elseif (args[3] >= 22 and args[3] <= 28) and args[4] == 19 then
update(); render();
elseif (args[3] >= 2 and args[3] <= 22) and args[4] == 12 then
local newpass = base.gui.input("New password:", "*")
local ok, err = Discover.User:Modify("password", newpass)
if ok then
base.gui.alert("Updated password for your account!")
sleep(1)
base.gui.alert("Obtaining new authkey...")
local ok, err = Discover.User:Login(Discover.User:GetField("Username"), newpass)
if ok then
base.gui.alert("Obtaining new authkey...")
else
base.gui.alert("Error: " .. tostring(err))
end
sleep(1.5)
program.account.edit()
else
base.gui.alert("Could not update your password!")
sleep(1.5)
program.account.edit()
end
elseif (args[3] >= 2 and args[3] <= 22) and args[4] == 14 then
local newemail = base.gui.input("New email:")
local ok, err = Discover.User:Modify("email", newemail)
if ok then
base.gui.alert("Updated email for your account!")
sleep(1)
program.account.edit()
else
base.gui.alert("Could not update your email!")
sleep(1.5)
program.account.edit()
end
end
end
end
end
\ No newline at end of file
......@@ -61,6 +61,7 @@ function program.account.login()
elseif (args[3] >= 19 and args[3] <= 30) and (args[4] == 19) then
program.account.register()
elseif (args[3] >= 46 and args[3] <= 50) and (args[4] == 19) then
DiscoverApp.Callbacks.Run("Login")
local status = Discover.User:Login(username, password)
if status then
if status then
......
......@@ -7,6 +7,7 @@ function program.account.logout()
program.draw.menubar("Account: Logout")
base.screen.colour("white")
base.draw.textc("Logging out...", 10, false, "red", "white")
DiscoverApp.Callbacks.Run("Logout")
local status = Discover.User:Logout()
local status = Discover.User:Reset()
base.thread.remove("Login")
......
--[[
Name: Account -> Manage
Description: Manage Account Function
--]]
function program.account.manage()
base.screen.colour("white")
program.draw.menubar("My Account")
program.draw.menubar("Account: Manage")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
local options = {"My Statistics", "My Information"}; local count = 0;
local function run()
for i=1, 20 do
base.draw.box(i, 1, 3, 17, " ", "lightGrey", "lightGrey")
for i=1, 20 do base.draw.box(i, 1, 3, 16, " ", "lightGrey", "lightGrey"); end
for i=1, #options*2, 2 do
count = count + 1;
base.draw.box(2, 18, i+3, 1, " ", "orange", "orange");
base.draw.texta(options[count], 3, i+3, false, "white", "orange");
end
base.draw.box(2, 18, 5, 1, " ", "orange", "orange")
base.draw.box(2, 18, 7, 1, " ", "orange", "orange")
base.draw.box(2, 18, 9, 1, " ", "orange", "orange")
base.draw.box(2, 18, 11, 1, " ", "orange", "orange")
base.draw.box(2, 18, 13, 1, " ", "orange", "orange")
base.draw.box(2, 18, 15, 1, " ", "orange", "orange")
base.draw.box(2, 18, 17, 1, " ", "orange", "orange")
base.draw.texta("Upload an App", 3, 5, false, "white", "orange")
base.draw.texta("Update an App", 3, 7, false, "white", "orange")
base.draw.texta("View my Apps", 3, 9, false, "white", "orange")
base.draw.texta("Notifications", 3, 11, false, "white", "orange")
base.draw.texta("Change Password", 3, 13, false, "white", "orange")
base.draw.texta("Change Email", 3, 15, false, "white", "orange")
base.draw.texta("My Statistics", 3, 17, false, "white", "orange")
-- Draw info
base.draw.texta("My Details", 31, 4, false, "grey", "white")
base.draw.texta("Username:", 22, 7, false, "lightGrey", "white")
......@@ -32,59 +28,33 @@ function program.account.manage()
base.draw.box(22, 29, 14, 1, " ", "cyan", "cyan")
base.draw.box(22, 29, 15, 1, " ", "cyan", "cyan")
base.draw.box(22, 29, 16, 1, " ", "cyan", "cyan")
local authkey = Discover.User:GetField("AuthKey")
base.draw.texta(authkey:sub(1, 27) , 23, 12, false, "white", "cyan")
base.draw.texta(authkey:sub(28, 54) , 23, 13, false, "white", "cyan")
base.draw.texta(authkey:sub(55, 81) , 23, 14, false, "white", "cyan")
base.draw.texta(authkey:sub(82, 108) , 23, 15, false, "white", "cyan")
base.draw.texta(authkey:sub(109) , 23, 16, false, "white", "cyan")
base.draw.texta(tostring(Discover.User:GetField("AuthKey")):sub(1, 27) , 23, 12, false, "white", "cyan")
base.draw.texta(tostring(Discover.User:GetField("AuthKey")):sub(28, 54) , 23, 13, false, "white", "cyan")
base.draw.texta(tostring(Discover.User:GetField("AuthKey")):sub(55, 81) , 23, 14, false, "white", "cyan")
base.draw.texta(tostring(Discover.User:GetField("AuthKey")):sub(82, 108) , 23, 15, false, "white", "cyan")
base.draw.texta(tostring(Discover.User:GetField("AuthKey")):sub(109) , 23, 16, false, "white", "cyan")
end
run()
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("My Account")
program.draw.menubar("Account: Manage")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Account", args[3], args[4])
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 5) then
if not base.thread.find("Upload") then
base.thread.create("Upload", program.apps.upload)
end
base.thread.switch("Upload")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 7) then
if not base.thread.find("Update") then
base.thread.create("Update", program.apps.update)
end
base.thread.switch("Update")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 9) then
if not base.thread.find("MyApps") then
base.thread.create("MyApps", program.apps.owned)
end
base.thread.switch("MyApps")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 11) then
if not base.thread.find("Notifications") then
base.thread.create("Notifications", program.main.alerts)
end
base.thread.switch("Notifications")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 13) then
if not base.thread.find("Change") then
base.thread.create("Change", program.account.change)
end
Internal.Swap.Change = "password"
base.thread.switch("Change")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 15) then
if not base.thread.find("Change") then
base.thread.create("Change", program.account.change)
end
Internal.Swap.Change = "email"
base.thread.switch("Change")
elseif (args[3] >= 2 and args[3] <= 18) and (args[4] == 17) then
if not base.thread.find("MyStats") then
base.thread.create("MyStats", program.account.stats)
program.draw.menu.handler("Account: Manage", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and (args[4] == 19) then
base.thread.remove("Account");
if not base.thread.find("Home") then
base.thread.create("Home", program.main.home)
end
base.thread.switch("MyStats")
base.thread.switch("Home")
elseif (args[3] >= 2 and args[3] <= 18) and args[4] == 4 then
program.account.statistics();
elseif (args[3] >= 2 and args[3] <= 18) and args[4] == 6 then
program.account.edit();
elseif (args[3] >= 2 and args[3] <= 18) and args[4] == 8 then
program.account.alerts();
end
end
end
......
--[[
Name: Account -> Statistics
Description: Account Statistics Function
--]]
function program.account.statistics()
base.screen.colour("white")
program.draw.menubar("Account: Statistics")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Back ", 19, false, "red", "grey")
local function getstats()
base.draw.textc("Processing...", 9, false, "grey", "white")
sleep(0.5)
ok, stats_data = Discover.User:GetStatistics()
base.draw.box(1, 51, 9, 1, " ", "white", "white")
end
local function run()
local text = "Here you can see your statistics for uploads, downloads on both apps and snippets."
for k,v in ipairs(base.data.wordwrap(text, 49)) do
base.draw.texta(v, 2, k+3, false, "lightGrey", "white")
end
base.draw.texta("App Uploads: ", 2, 10, false, "grey", "white")
base.draw.texta("Snippet Uploads: ", 2, 12, false, "grey", "white")
base.draw.texta("Downloads (Apps): ", 2, 14, false, "grey", "white")
base.draw.texta("Downloads (Snippets):", 2, 16, false, "grey", "white")
base.draw.texta(stats_data.uploaded_apps, 25, 10, false, "cyan", "white")
base.draw.texta(stats_data.uploaded_snips, 25, 12, false, "cyan", "white")
base.draw.texta(stats_data.app_downloads, 25, 14, false, "cyan", "white")
base.draw.texta(stats_data.snip_downloads, 25, 16, false, "cyan", "white")
end
getstats()
run()
while true do
local args = { os.pullEvent() }
if args[1] == "timer" then
program.draw.menubar("Account: Statistics")
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Account: Statistics", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
program.account.manage();
end
end
end
end
\ No newline at end of file
......@@ -3,11 +3,43 @@
Desc: Apps listed by download count screen function
--]]
function program.apps.downloads()
--[[
Name: apps.all
Desc: Apps: All screen function
--]]
function program.apps.downloads(appslist, filter)
base.screen.colour("white")
program.draw.menubar("App: Downloads")
program.draw.menubar("Apps: Downloads")
local scroll = 0
base.draw.textc("Downloading Apps Listing...", 10, false, "red", "white")
status, appslist = Discover.Apps:List("downloads")
base.draw.box(1, 51, 10, 1, " ", "white", "white")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
base.draw.texta(tostring("Total Apps: "..#appslist), 2, 19, false, "lightBlue", "grey")
base.draw.textr("Scroll Enabled ", 19, false, "orange", "grey")
local function fix(num)
if tostring(num):len() == 1 then
return " "..tostring(num)
elseif tostring(num):len() == 2 then
return " "..tostring(num)
else
return tostring(num)
end
end
local function run(scroll)
for i = 1, 14 do
if #appslist >= i + scroll then
base.draw.box(1, 51, i+3, 1, " ", "white", "white")
base.draw.textl(fix(i+scroll)..": "..tostring(appslist[i+scroll].name), i+3, false, "grey", "white")
end
end
end
run(scroll)
while true do
local args = { os.pullEvent() }
......@@ -16,8 +48,29 @@ function program.apps.downloads()
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Apps: Downloads", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
program.apps.main();
elseif (args[3] >= 1 and args[3] <= 25) and (args[4] == 3) then
program.apps.categories()
elseif (args[3] >= 26 and args[3] <= 51) and (args[4] == 3) then
program.apps.versions()
elseif (args[3] >= 1 and args[3] <= 51) and (args[4] >= 5 and args[4] <= 17) then
local curid = args[4] - 3 + scroll
local tname = "View"..tostring(appslist[curid].id)
base.thread.create(tname, program.apps.view)
Internal.Swap.Viewer[1] = appslist[curid].id
Internal.Swap.Viewer[2] = appslist
base.thread.switch(tname)
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
if scroll > 0 then
scroll = scroll - 1
run(scroll)
end
elseif args[2] == 1 then
if scroll + 14 <= #appslist-1 then
scroll = scroll + 1
run(scroll)
end
end
end
end
......
......@@ -3,11 +3,50 @@
Desc: Apps listed by packages, example the Microsoft Package, Ink, Sketch, etc
--]]
function program.apps.packages()
function program.apps.packages(version)
base.screen.colour("white")
program.draw.menubar("App: Packages")
program.draw.menubar("Apps: Packages")
base.draw.box(21, 1, 5, 13, "|", "lightGrey", "white")
base.draw.box(1, 51, 19, 1, " ", "grey", "grey")
base.draw.textr("Exit ", 19, false, "red", "grey")
-- Vars
local lscroll = 0
local rscroll = 0
local status, ldata = Discover.Apps:List("packages");
for k,v in ipairs(ldata) do if (v == "") then table.remove(ldata, k); end end
local rdata = {}
local lselect = ""
local status, allapps = Discover.Apps:List("apps");
base.draw.texta("Total Packages: "..#ldata, 2, 19, false, "lightBlue", "grey")
base.draw.textr("Scroll Enabled", 19, false, "orange", "grey")
base.draw.texta(" All | Packages ", 1, 3, false, "white", "lightGrey")
local function lrun(lscroll)
for i=1, 13 do
if #ldata >= i + lscroll then
if lselect == ldata[i+lscroll] then
base.draw.box(1, 19, i+4, 1, " ", "white", "white")
base.draw.texta(ldata[i+lscroll], 1, i+4, false, "grey", "white")
else
base.draw.box(1, 19, i+4, 1, " ", "white", "white")
base.draw.texta(ldata[i+lscroll], 1, i+4, false, "cyan", "white")
end
end
end
end
local function rrun(rscroll)
for i=1, 13 do
if #rdata >= i + rscroll then
base.draw.box(22, 29, i+4, 1, " ", "white", "white")
base.draw.texta(rdata[i+rscroll].name:sub(1, 25), 23, i+4, false, "grey", "white")
end
end
end
lrun(lscroll)
rrun(rscroll)
while true do
local args = { os.pullEvent() }
......@@ -16,8 +55,65 @@ function program.apps.packages()
elseif args[1] == "mouse_click" then
if args[4] >= 1 and args[4] <= 2 then
program.draw.menu.handler("Apps: Packages", args[3], args[4])
elseif (args[3] >= 47 and args[3] <= 50) and args[4] == 19 then
program.apps.main();
elseif (args[3] >= 1 and args[3] <= 25) and (args[4] == 3) then
program.apps.all()
elseif (args[3] >= 26 and args[3] <= 51) and (args[4] == 3) then
program.apps.categories()
elseif (args[3] >= 1 and args[3] <= 20) and (args[4] >= 5 and args[4] <= 17) then
-- Choose
local cid = args[4] - 4 + lscroll
if #ldata >= cid then
lselect = ldata[cid]
rdata = {}
for k,v in ipairs(allapps) do
if v.package == lselect then
rdata[#rdata+1] = v
end
end
for i=1, 13 do
base.draw.box(22, 29, i+3, 1, false, "white", "white")
end
rscroll = 0
rrun(rscroll)
lrun(lscroll)
end
elseif (args[3] >= 22 and args[3] <= 51) and (args[4] >= 5 and args[4] <= 17) then
-- View app
local cid = args[4] - 4 + rscroll
if #rdata >= cid then
Internal.Swap.Viewer[1] = rdata[cid].id
Internal.Swap.Viewer[2] = allapps
if not base.thread.find("View"..tostring(rdata[cid].id)) then
base.thread.create("View"..tostring(rdata[cid].id), program.apps.view)
end
base.thread.switch("View"..tostring(rdata[cid].id))
end
end
elseif args[1] == "mouse_scroll" then
if args[2] == -1 then
if (args[3] >= 1 and args[3] <= 20) and (args[4] >= 5 and args[4] <= 17) then
if lscroll > 0 then
lscroll = lscroll - 1
lrun(lscroll)
end
elseif (args[3] >= 22 and args[3] <= 51) and (args[4] >= 5 and args[4] <= 17) then
if rscroll > 0 then
rscroll = rscroll - 1
rrun(rscroll)
end
end
elseif args[2] == 1 then
if (args[3] >= 1 and args[3] <= 20) and (args[4] >= 5 and args[4] <= 17) then
if lscroll + 13 <= #ldata-1 then
lscroll = lscroll + 1
lrun(lscroll)
end
elseif (args[3] >= 22 and args[3] <= 51) and (args[4] >= 5 and args[4] <= 17) then
if rscroll + 13 <= #rdata-1 then
rscroll = rscroll + 1
rrun(rscroll)
end
end
end
end
end
......
......@@ -272,7 +272,7 @@ function base.gui.input(text, mask)
base.colour.set("white", "cyan")
term.setCursorPos(3,11)
write("> ")
local input = tostring(read(mask))
local input = tostring(base.io.limitRead(34, mask))
return input
end
......
......@@ -56,6 +56,8 @@ local paths = {
"account/account.register.lua";
"account/account.logout.lua";
"account/account.manage.lua";
"account/account.statistics.lua";
"account/account.edit.lua";
"snippets/snippets.main.lua";
"snippets/snippets.all.lua";
"snippets/snippets.view.lua";
......
-- Intialize the DiscoverApp Plugin API.
Internal.MenuEntries = {};
Internal.Callbacks = {["Shutdown"]={};["Reboot"]={};["Startup"]={};["Login"]={};["Logout"]={};};
DiscoverApp = {
Register = {
......@@ -64,5 +65,85 @@ DiscoverApp = {
f.close();
return true;
end;
Reload = function()
Internal.Controls.InstallConfig();
return true;
end;
};
Threads = {
Create = function( name, func )
return base.thread.create(name, func)
end;
Switch = function( name )
return base.thread.switch(name)
end;
Remove = function( name )
return base.thread.remove(name)
end;
Find = function( name )
return base.thread.find(name)
end;
List = function( name )
return threads;
end;
};
Callbacks = {
Register = function( ntype, namespace, func )
if ntype == "shutdown" then
local new = {};
new.name = tostring(namespace)
new.func = tostring(func)
Internal.Callbacks.Shutdown[#Internal.Callbacks.Shutdown+1] = new;
new = nil;
return true;
elseif ntype == "reboot" then
local new = {};
new.name = tostring(namespace)
new.func = tostring(func)
Internal.Callbacks.Reboot[#Internal.Callbacks.Reboot+1] = new;
new = nil;
return true;
elseif ntype == "startup" then
local new = {};
new.name = tostring(namespace)
new.func = tostring(func)
Internal.Callbacks.Startup[#Internal.Callbacks.Startup+1] = new;
new = nil;
return true;
elseif ntype == "login" then
local new = {};
new.name = tostring(namespace)
new.func = tostring(func)
Internal.Callbacks.Login[#Internal.Callbacks.Login+1] = new;
new = nil;
return true;
elseif ntype == "logout" then
local new = {};
new.name = tostring(namespace)
new.func = tostring(func)
Internal.Callbacks.Logout[#Internal.Callbacks.Logout+1] = new;
new = nil;
return true;
else
return false;
end
end;
Run = function( ... )
local arg = { ... }
local ntype = arg[1];
table.remove(arg, 1);
if ntype then
if Internal.Callbacks[ntype] then
for k,v in pairs(Internal.Callbacks[ntype]) do
program[v.name][v.func](unpack(arg));
end
return true;
else
return true;
end
else
return false;
end
end;
};
};
\ No newline at end of file
......@@ -22,7 +22,7 @@ Internal = {
};
Config = {
ConfigFilePath = ".DiscoverConfig";
BlockTerminate = true;
BlockTerminate = false;
EnablePlugins = true;
PluginsDirectory = "/DA_Plugins";
};
......@@ -41,6 +41,7 @@ Internal = {
Edit = {};
Update = {};
};
Controls = {};
}
local screenx, screeny = term.getSize();
......
......@@ -20,6 +20,10 @@ function program.core.shutdown()
end
log("Closing program")
-- Running Plugin Shutdowns
log("Running shutdown callbacks")
DiscoverApp.Callbacks.Run("Shutdown")
-- Remove all threads
log("Stopping processes")
threads = {};
......@@ -59,6 +63,10 @@ function program.core.reboot()
end
log("Restarting")
-- Running Plugin Reboot
log("Running reboot callbacks")
DiscoverApp.Callbacks.Run("Reboot")
-- Remove all threads
log("Stopping processes")
threads = {};
......
......@@ -34,18 +34,21 @@ function program.core.init()
-- Check for app config
log("Searching for config ...")
if fs.exists(Internal.Config.ConfigFilePath) then
local f = fs.open(Internal.Config.ConfigFilePath, "r")
local d = f.readAll()
f.close()
local config = textutils.unserialize(Discover.Crypto:Base64("decode", d));
for k,v in pairs(config.Config) do
Internal.Config[k] = v;
end
for k,v in pairs(config.Account) do
Internal.Account[k] = v;
function Internal.Controls.InstallConfig()
if fs.exists(Internal.Config.ConfigFilePath) then
local f = fs.open(Internal.Config.ConfigFilePath, "r")
local d = f.readAll()
f.close()
local config = textutils.unserialize(Discover.Crypto:Base64("decode", d));
for k,v in pairs(config.Config) do
Internal.Config[k] = v;
end
for k,v in pairs(config.Account) do