forked from xomf/slabOS
Update eCash.lua
This commit is contained in:
parent
a1d2140017
commit
c20170a0a3
13
eCash.lua
13
eCash.lua
|
@ -243,21 +243,16 @@ local loginButton = login:addButton()
|
||||||
|
|
||||||
username = usernameInput:getText()
|
username = usernameInput:getText()
|
||||||
|
|
||||||
if not fs.exists("/.usrcache") then
|
|
||||||
local file = fs.open("/.usrcache","w")
|
|
||||||
file.write(username)
|
|
||||||
file.close()
|
|
||||||
end
|
|
||||||
|
|
||||||
login:setVisible(false)
|
login:setVisible(false)
|
||||||
appFrame:setVisible(true)
|
appFrame:setVisible(true)
|
||||||
refresh_ui()
|
refresh_ui()
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if fs.exists("/.usrcache") then
|
if fs.exists("/config.json") then
|
||||||
local file = fs.open("/.usrcache","r")
|
local file = fs.open("/config.json","r")
|
||||||
local username = file.readLine()
|
local file_content = file.readAll()
|
||||||
|
local username = textutils.unserialiseJSON(file_content).username
|
||||||
file.close()
|
file.close()
|
||||||
usernameInput:setText(username)
|
usernameInput:setText(username)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user