Update settings.lua
This commit is contained in:
parent
3127b95378
commit
bece6eacca
1 changed files with 1 additions and 16 deletions
|
@ -1,7 +1,6 @@
|
||||||
local menu = {
|
local menu = {
|
||||||
"Update",
|
"Update",
|
||||||
"Change username",
|
"Change PIN",
|
||||||
"Change password",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local function clear()
|
local function clear()
|
||||||
|
@ -23,18 +22,6 @@ local function header()
|
||||||
term.setTextColor(colors.black)
|
term.setTextColor(colors.black)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function changeUsername()
|
|
||||||
header()
|
|
||||||
term.setCursorPos(2,3)
|
|
||||||
write("New Username: ")
|
|
||||||
local newUsername = read()
|
|
||||||
local f = fs.open("/.sPhone/config/username","w")
|
|
||||||
f.write(newUsername)
|
|
||||||
f.close()
|
|
||||||
sPhone.user = newUsername
|
|
||||||
print(" All Set!")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function changePassword()
|
local function changePassword()
|
||||||
while true do
|
while true do
|
||||||
term.clear()
|
term.clear()
|
||||||
|
@ -183,8 +170,6 @@ local function redraw()
|
||||||
elseif id == 1 then
|
elseif id == 1 then
|
||||||
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
|
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
|
||||||
elseif id == 2 then
|
elseif id == 2 then
|
||||||
changeUsername()
|
|
||||||
elseif id == 3 then
|
|
||||||
changePassword()
|
changePassword()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue