Update sPhone.lua

This commit is contained in:
Ale32bit 2016-07-18 13:30:48 +02:00 committed by GitHub
parent 3a7dca9bf7
commit 57b7493c81

View file

@ -20,14 +20,6 @@ local function kernel()
sPhone.defaultTheme = sPhone.theme
if not fs.exists("/.sPhone/config/newIDSystem") then
fs.delete("/.sPhone/config/username")
fs.delete("/.sPhone/config/.sIDpw")
f = fs.open("/.sPhone/config/newIDSystem","w")
f.write("Ignore Me. I just check if you use the new Sertex ID system to fix password issues")
f.close()
end
if not fs.exists("/.sPhone/config/newPassword") and fs.exists("/.sPhone/.password") then
fs.move("/.sPhone/.password","/.sPhone/config/.password")
f = fs.open("/.sPhone/config/newPassword","w")
@ -862,6 +854,19 @@ end
local name
term.setBackgroundColor(sPhone.theme["backgroundColor"])
term.clear()
sPhone.header("Setup")
term.setCursorPos(1,1)
term.setTextColor(sPhone.theme["text"])
term.setCursorPos(2,3)
visum.align("center","Username",false,3)
term.setCursorPos(2,5)
local newUsername = read()
local f = fs.open("/.sPhone/config/username","w")
f.write(newUsername)
f.close()
if fs.exists("/.sPhone/config/username") then
local f = fs.open("/.sPhone/config/username","r")
name = f.readLine()