1
0
forked from xomf/slabOS

Update eCash.lua

This commit is contained in:
xomf 2025-06-06 04:38:54 +00:00
parent a1d2140017
commit c20170a0a3

View File

@ -243,21 +243,16 @@ local loginButton = login:addButton()
username = usernameInput:getText()
if not fs.exists("/.usrcache") then
local file = fs.open("/.usrcache","w")
file.write(username)
file.close()
end
login:setVisible(false)
appFrame:setVisible(true)
refresh_ui()
end)
if fs.exists("/.usrcache") then
local file = fs.open("/.usrcache","r")
local username = file.readLine()
if fs.exists("/config.json") then
local file = fs.open("/config.json","r")
local file_content = file.readAll()
local username = textutils.unserialiseJSON(file_content).username
file.close()
usernameInput:setText(username)
end