From a18a84edcf78533e3e170d8837748d7bbb927bd3 Mon Sep 17 00:00:00 2001 From: Ale2610 Date: Sat, 29 Aug 2015 16:13:05 +0200 Subject: [PATCH] Update sID.lua --- src/apps/system/sID.lua | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/apps/system/sID.lua b/src/apps/system/sID.lua index d07e637..0395bc5 100644 --- a/src/apps/system/sID.lua +++ b/src/apps/system/sID.lua @@ -36,17 +36,35 @@ if isDown ~= "true" then return end -if fs.exists("/.sPhone/config/.sIDpw") then - menu = { - "Logout", - } - _, id = ui.menu("Sertex ID") -else - menu = { - "Login", - "New Account", - } - _, id = ui.menu("Sertex ID") +local function login() + +end + +local function register() + +end + +while true do + if fs.exists("/.sPhone/config/.sIDpw") then + menu = { + "Logout", + } + _, id = ui.menu("Sertex ID") + if id == 1 then + fs.delete("/.sPhone/config/.sIDpw") + end + else + menu = { + "Login", + "Register", + } + _, id = ui.menu("Sertex ID") + if id == 1 then + login() + elseif id == 2 then + register() + end + end end header()