登录界面可选隐藏邮箱 close #639

This commit is contained in:
MrZ_26
2022-03-22 02:39:26 +08:00
parent d17e62e36b
commit 6c69c38b32
11 changed files with 20 additions and 6 deletions

View File

@@ -687,6 +687,7 @@ return{
register="Sign Up",
email="Email Address",
password="Password",
showEmail="Show Email",
keepPW="Remember me",
login="Log In",
},

View File

@@ -550,6 +550,7 @@ return{
register="Registrarse",
email="Correo Elec.",
password="Contraseña",
-- showEmail="Show Email",
keepPW="Recordar credenciales",
login="Entrar",
},

View File

@@ -641,6 +641,7 @@ return{
register="Enregistrement",
email="E-mail",
password="Mot de passe",
-- showEmail="Show Email",
-- keepPW="Remember me",
login="Connexion",
},

View File

@@ -689,6 +689,7 @@ return{
register="Daftar",
email="Alamat Email",
password="Password",
-- showEmail="Show Email",
keepPW="Ingat Saya",
login="Masuk",
},

View File

@@ -689,6 +689,7 @@ return{
register="サインアップ",
email="Eメールアドレス",
password="パスワード",
-- showEmail="Show Email",
keepPW="常にログイン",
login="ログイン",
},

View File

@@ -677,6 +677,7 @@ return{
register="Registrar",
email="Endereço De Email",
password="Senha",
-- showEmail="Show Email",
-- keepPW="Remember me",
login="Log in",
},

View File

@@ -488,7 +488,8 @@ return{
register="Sign up",
email="@",
password="*",
-- keepPW="I",
showEmail="?",
keepPW="!",
login="Log in",
},
register={

View File

@@ -687,6 +687,7 @@ return{
register="注册",
email="邮箱",
password="密码",
showEmail="显示邮箱",
keepPW="保存密码",
login="登录",
},

View File

@@ -685,6 +685,7 @@ return{
register="登记",
email="电子邮件地址",
password="密码",
showEmail="显示电子邮件",
keepPW="记得我吗",
login="登录",
},

View File

@@ -687,6 +687,7 @@ return{
register="註冊",
email="電郵",
password="密碼",
showEmail="顯示郵箱",
keepPW="保存密碼",
login="登錄",
},

View File

@@ -2,6 +2,7 @@ local emailBox=WIDGET.newInputBox{name='email',x=380,y=200,w=500,h=60,limit=128}
local passwordBox=WIDGET.newInputBox{name='password',x=380,y=300,w=620,h=60,secret=true,regex="[ -~]",limit=64}
local savePW=false
local showEmail=true
local function _login()
local email,password=emailBox:getText(),passwordBox:getText()
@@ -25,19 +26,22 @@ function scene.sceneInit()
local data=loadFile('conf/account','-canSkip')
if data then
savePW=true
showEmail=false
emailBox.secret=true
emailBox:setText(data[1])
passwordBox:setText(data[2])
end
end
scene.widgetList={
WIDGET.newText{name='title', x=80, y=50,font=70,align='L'},
WIDGET.newButton{name='register',x=1140,y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
WIDGET.newText{name='title', x=80, y=50,font=70,align='L'},
WIDGET.newButton{name='register', x=1140,y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end},
emailBox,
passwordBox,
WIDGET.newSwitch{name='keepPW', x=900, y=420,disp=function()return savePW end,code=function()savePW=not savePW end},
WIDGET.newKey{name='login', x=1140,y=540,w=170,h=80,font=40,code=_login},
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
WIDGET.newSwitch{name='showEmail',x=550, y=420,disp=function()return showEmail end,code=function()showEmail=not showEmail emailBox.secret=not showEmail end},
WIDGET.newSwitch{name='keepPW', x=900, y=420,disp=function()return savePW end,code=function()savePW=not savePW end},
WIDGET.newKey{name='login', x=1140,y=540,w=170,h=80,font=40,code=_login},
WIDGET.newButton{name='back', x=1140,y=640,w=170,h=80,sound='back',font=60,fText=CHAR.icon.back,code=backScene},
}
return scene