修正一些新登录界面小问题
This commit is contained in:
@@ -487,9 +487,9 @@ return {
|
||||
},
|
||||
login={
|
||||
title="Sign In",
|
||||
-- ticket="Auth Ticket",
|
||||
-- authorize="Open Authorizing Page",
|
||||
-- submit="Submit",
|
||||
ticket="***",
|
||||
authorize="**?",
|
||||
submit="<!>",
|
||||
},
|
||||
reset_password={
|
||||
title="R ***",
|
||||
|
||||
@@ -746,9 +746,9 @@ return {
|
||||
},
|
||||
login={
|
||||
title="登录",
|
||||
ticket="授权令牌",
|
||||
authorize="打开授权页面",
|
||||
submit="提交",
|
||||
ticket="登录口令",
|
||||
authorize="去官网获取口令",
|
||||
submit="登录",
|
||||
},
|
||||
reset_password={
|
||||
title="重置密码",
|
||||
|
||||
@@ -746,9 +746,9 @@ return {
|
||||
},
|
||||
login={
|
||||
title="登錄",
|
||||
-- ticket="Auth Ticket",
|
||||
-- authorize="Open Authorizing Page",
|
||||
-- submit="Submit",
|
||||
ticket="登錄口令",
|
||||
authorize="去官網獲取口令",
|
||||
submit="登錄",
|
||||
},
|
||||
reset_password={
|
||||
title="重設密碼",
|
||||
|
||||
@@ -120,20 +120,20 @@ local function getMsg(request,timeout)
|
||||
end
|
||||
end
|
||||
|
||||
function NET.autoLogin()
|
||||
if not TASK.lock('autoLogin') then return end
|
||||
function NET.login(auto)
|
||||
if not TASK.lock('login') then return end
|
||||
TASK.new(function()
|
||||
WAIT{
|
||||
quit=function()
|
||||
TASK.unlock('autoLogin')
|
||||
HTTP.deletePool('autoLogin')
|
||||
TASK.unlock('login')
|
||||
HTTP.deletePool('login')
|
||||
end,
|
||||
timeout=12.6,
|
||||
}
|
||||
|
||||
if USER.aToken then
|
||||
local res=getMsg({
|
||||
pool='autoLogin',
|
||||
pool='login',
|
||||
url='cafuuchino1.3322.org:8081',
|
||||
path='/studio26f/api/v1/auth/check',
|
||||
headers={["x-access-token"]=USER.aToken},
|
||||
@@ -146,12 +146,12 @@ function NET.autoLogin()
|
||||
end
|
||||
saveUser()
|
||||
NET.ws_connect()
|
||||
if not auto then-- Quit login menu
|
||||
SCN.pop()
|
||||
end
|
||||
SCN.go('net_menu')
|
||||
WAIT.interrupt()
|
||||
return
|
||||
else
|
||||
WAIT.interrupt()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ local function _submit()
|
||||
else
|
||||
USER.aToken=tickets:sub(1,64)
|
||||
USER.oToken=tickets:sub(65)
|
||||
NET.autoLogin()
|
||||
NET.login()
|
||||
end
|
||||
end
|
||||
local function _paste()
|
||||
@@ -50,9 +50,9 @@ scene.widgetList={
|
||||
|
||||
WIDGET.newInputBox{name='ticket', x=280, y=200,w=730,h=320,font=30,regex="[0-9A-Z]",limit=128},
|
||||
|
||||
WIDGET.newKey{name='authorize', x=430, y=640,w=300,h=80,font=40,code=_authorize},
|
||||
WIDGET.newKey{name='submit', x=755, y=640,w=300,h=80,font=40,code=_submit},
|
||||
WIDGET.newKey{name='paste', x=970, y=640,w=80,font=40,fText=CHAR.icon.import,code=_paste},
|
||||
WIDGET.newKey{name='authorize', x=430, y=600,w=300,h=80,font=40,code=_authorize},
|
||||
WIDGET.newKey{name='submit', x=755, y=600,w=300,h=80,font=40,code=_submit},
|
||||
WIDGET.newKey{name='paste', x=970, y=600,w=80,font=40,fText=CHAR.icon.import,code=_paste},
|
||||
|
||||
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=pressKey'escape'},
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ function scene.keyDown(key,isRep)
|
||||
end
|
||||
elseif key=='a' then
|
||||
if _testButton(3) then
|
||||
NET.autoLogin()
|
||||
NET.login(true)
|
||||
end
|
||||
elseif key=='z' then
|
||||
if _testButton(4) then
|
||||
|
||||
Reference in New Issue
Block a user