注册功能初步完成
This commit is contained in:
@@ -50,12 +50,15 @@ return{
|
|||||||
ranks={"D","C","B","A","S"},
|
ranks={"D","C","B","A","S"},
|
||||||
|
|
||||||
needRestart="Effective after restart",
|
needRestart="Effective after restart",
|
||||||
|
|
||||||
exportSuccess="Export successfully",
|
exportSuccess="Export successfully",
|
||||||
importSuccess="Import successfully",
|
importSuccess="Import successfully",
|
||||||
dataCorrupted="Data corrupted",
|
dataCorrupted="Data corrupted",
|
||||||
|
|
||||||
VKTchW="Touch Weight",
|
VKTchW="Touch Weight",
|
||||||
VKOrgW="Origin Weight",
|
VKOrgW="Origin Weight",
|
||||||
VKCurW="Cur. Pos. Weight",
|
VKCurW="Cur. Pos. Weight",
|
||||||
|
|
||||||
noScore="No Scores Yet",
|
noScore="No Scores Yet",
|
||||||
highScore="Personal Bests",
|
highScore="Personal Bests",
|
||||||
newRecord="New Record!",
|
newRecord="New Record!",
|
||||||
@@ -64,14 +67,18 @@ return{
|
|||||||
getVersionFail="Unable to detect a new version",
|
getVersionFail="Unable to detect a new version",
|
||||||
versionIsNew="You are now on the latest version.",
|
versionIsNew="You are now on the latest version.",
|
||||||
versionIsOld="Version $1 is available now!",
|
versionIsOld="Version $1 is available now!",
|
||||||
registerSuccessed="Registration successed!",
|
|
||||||
registerFailed="Registration failed",
|
|
||||||
netErrorCode="Network error code",
|
netErrorCode="Network error code",
|
||||||
jsonError="Json error",
|
jsonError="Json error",
|
||||||
|
|
||||||
noUsername="Please enter your username",
|
noUsername="Please enter your username",
|
||||||
|
wrongCode="Please enter invitation code",
|
||||||
wrongEmail="Wrong email address",
|
wrongEmail="Wrong email address",
|
||||||
noPassword="Please enter your password",
|
noPassword="Please enter your password",
|
||||||
diffPassword="Passwords don't match",
|
diffPassword="Passwords don't match",
|
||||||
|
registerSuccessed="Registration successed!",
|
||||||
|
registerFailed="Registration failed",
|
||||||
|
|
||||||
errorMsg="An error has occurred and Techmino needs to restart.\nError info has been created, and you can send it to the author.",
|
errorMsg="An error has occurred and Techmino needs to restart.\nError info has been created, and you can send it to the author.",
|
||||||
|
|
||||||
acts={
|
acts={
|
||||||
|
|||||||
@@ -52,25 +52,35 @@ return{
|
|||||||
getRank="Rang: ",
|
getRank="Rang: ",
|
||||||
|
|
||||||
needRestart="Fonctionnera dès la prochaine partie",
|
needRestart="Fonctionnera dès la prochaine partie",
|
||||||
|
|
||||||
-- exportSuccess="Export successfully",
|
-- exportSuccess="Export successfully",
|
||||||
-- importSuccess="Import successfully",
|
-- importSuccess="Import successfully",
|
||||||
dataCorrupted="Données corrompues",
|
dataCorrupted="Données corrompues",
|
||||||
|
|
||||||
VKTchW="Poids du toucher",
|
VKTchW="Poids du toucher",
|
||||||
VKOrgW="Pois d'origine",
|
VKOrgW="Pois d'origine",
|
||||||
VKCurW="Pois de la pos. du cur.",
|
VKCurW="Pois de la pos. du cur.",
|
||||||
|
|
||||||
noScore="Aucun score",
|
noScore="Aucun score",
|
||||||
highScore="Records personnels",
|
highScore="Records personnels",
|
||||||
newRecord="Nouveau record !",
|
newRecord="Nouveau record !",
|
||||||
|
|
||||||
getNoticeFail="Echec de l'obtention de la notice",
|
getNoticeFail="Echec de l'obtention de la notice",
|
||||||
getVersionFail="Echec d'obtention de la dernière version",
|
getVersionFail="Echec d'obtention de la dernière version",
|
||||||
versionIsNew="Vous êtes sur la dernière version",
|
versionIsNew="Vous êtes sur la dernière version",
|
||||||
versionIsOld="La version $1 est disponible !",
|
versionIsOld="La version $1 est disponible !",
|
||||||
registerSuccessed="Enregistré avec succès !",
|
|
||||||
registerFailed="Erreur d'enregistrement",
|
|
||||||
netErrorCode="Code d'erreur réseau",
|
netErrorCode="Code d'erreur réseau",
|
||||||
|
-- jsonError="Json error",
|
||||||
|
|
||||||
noUsername="Entrez votre nom d'utilisateur",
|
noUsername="Entrez votre nom d'utilisateur",
|
||||||
|
-- wrongCode="Please enter invitation code",
|
||||||
|
-- wrongEmail="Wrong email address",
|
||||||
noPassword="Entrez votre mot de passe",
|
noPassword="Entrez votre mot de passe",
|
||||||
diffPassword="Les mots de passe ne se correspondent pas",
|
diffPassword="Les mots de passe ne se correspondent pas",
|
||||||
|
registerSuccessed="Enregistré avec succès !",
|
||||||
|
registerFailed="Erreur d'enregistrement",
|
||||||
|
|
||||||
errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.",
|
errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.",
|
||||||
|
|
||||||
acts={
|
acts={
|
||||||
|
|||||||
@@ -52,25 +52,36 @@ return{
|
|||||||
getRank="Rango obtenido:",
|
getRank="Rango obtenido:",
|
||||||
|
|
||||||
needRestart="Reinicia Techmino para que los cambios tengan efecto.",
|
needRestart="Reinicia Techmino para que los cambios tengan efecto.",
|
||||||
|
|
||||||
-- exportSuccess="Export successfully",
|
-- exportSuccess="Export successfully",
|
||||||
-- importSuccess="Import successfully",
|
-- importSuccess="Import successfully",
|
||||||
dataCorrupted="Los datos están corruptos.",
|
dataCorrupted="Los datos están corruptos.",
|
||||||
|
|
||||||
VKTchW="Sens. al toque",
|
VKTchW="Sens. al toque",
|
||||||
VKOrgW="Sens. al origen",
|
VKOrgW="Sens. al origen",
|
||||||
VKCurW="Sens. Cur. Pos.",
|
VKCurW="Sens. Cur. Pos.",
|
||||||
|
|
||||||
noScore="Sin puntajes aún.",
|
noScore="Sin puntajes aún.",
|
||||||
highScore="Mejores puntajes",
|
highScore="Mejores puntajes",
|
||||||
newRecord="¡Nuevo Récord!",
|
newRecord="¡Nuevo Récord!",
|
||||||
|
|
||||||
getNoticeFail="Error al buscar novedades.",
|
getNoticeFail="Error al buscar novedades.",
|
||||||
getVersionFail="Error al buscar nuevas versiones.",
|
getVersionFail="Error al buscar nuevas versiones.",
|
||||||
versionIsNew="Esta es la versión más reciente disponible.",
|
versionIsNew="Esta es la versión más reciente disponible.",
|
||||||
versionIsOld="¡Está disponible la nueva versión $1!",
|
versionIsOld="¡Está disponible la nueva versión $1!",
|
||||||
registerSuccessed="¡Registro exitoso!",
|
|
||||||
registerFailed="Registro fallido.",
|
|
||||||
netErrorCode="Código de error de conexión",
|
netErrorCode="Código de error de conexión",
|
||||||
|
-- jsonError="Json error",
|
||||||
|
|
||||||
noUsername="Por favor ingresa un nombre de usuario",
|
noUsername="Por favor ingresa un nombre de usuario",
|
||||||
|
|
||||||
|
-- wrongCode="Please enter invitation code",
|
||||||
|
-- wrongEmail="Wrong email address",
|
||||||
noPassword="Por favor ingresa una contraseña",
|
noPassword="Por favor ingresa una contraseña",
|
||||||
diffPassword="Las contraseñas no coinciden",
|
diffPassword="Las contraseñas no coinciden",
|
||||||
|
registerSuccessed="¡Registro exitoso!",
|
||||||
|
registerFailed="Registro fallido.",
|
||||||
|
|
||||||
errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.",
|
errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.",
|
||||||
|
|
||||||
acts={
|
acts={
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ return{
|
|||||||
finesse_ap="您",
|
finesse_ap="您",
|
||||||
finesse_fc="全连",
|
finesse_fc="全连",
|
||||||
|
|
||||||
noUsername="账号填不来?",
|
noUsername="别闹。",
|
||||||
wrongEmail="邮箱不会填?",
|
wrongCode="有人邀请你注册了?",
|
||||||
noPassword="密码填不来?",
|
wrongEmail="别乱输。",
|
||||||
diffPassword="账号密码都填不来?",
|
noPassword="注册会不会?",
|
||||||
|
diffPassword="字不认识?",
|
||||||
|
|
||||||
ranks={"菜","可","好","强","您"},
|
ranks={"菜","可","好","强","您"},
|
||||||
|
|
||||||
|
|||||||
@@ -51,27 +51,35 @@ return{
|
|||||||
ranks={"D","C","B","A","S"},
|
ranks={"D","C","B","A","S"},
|
||||||
|
|
||||||
needRestart="重新开始以生效",
|
needRestart="重新开始以生效",
|
||||||
|
|
||||||
exportSuccess="导出成功",
|
exportSuccess="导出成功",
|
||||||
importSuccess="导入成功",
|
importSuccess="导入成功",
|
||||||
dataCorrupted="数据损坏",
|
dataCorrupted="数据损坏",
|
||||||
|
|
||||||
VKTchW="触摸点权重",
|
VKTchW="触摸点权重",
|
||||||
VKOrgW="原始点权重",
|
VKOrgW="原始点权重",
|
||||||
VKCurW="当前点权重",
|
VKCurW="当前点权重",
|
||||||
|
|
||||||
noScore="暂无成绩",
|
noScore="暂无成绩",
|
||||||
highScore="最佳成绩",
|
highScore="最佳成绩",
|
||||||
newRecord="打破纪录",
|
newRecord="打破纪录",
|
||||||
|
|
||||||
getNoticeFail="拉取公告失败",
|
getNoticeFail="拉取公告失败",
|
||||||
getVersionFail="检测新版本失败",
|
getVersionFail="检测新版本失败",
|
||||||
versionIsNew="游戏已是最新版本",
|
versionIsNew="游戏已是最新版本",
|
||||||
versionIsOld="最新版本$1可以下载了!",
|
versionIsOld="最新版本$1可以下载了!",
|
||||||
registerSuccessed="注册成功!",
|
|
||||||
registerFailed="注册失败",
|
|
||||||
netErrorCode="网络错误码",
|
netErrorCode="网络错误码",
|
||||||
jsonError="json错误",
|
jsonError="json错误",
|
||||||
|
|
||||||
noUsername="请填写用户名",
|
noUsername="请填写用户名",
|
||||||
|
wrongCode="请填写邀请码",
|
||||||
wrongEmail="邮箱格式错误",
|
wrongEmail="邮箱格式错误",
|
||||||
noPassword="请填写密码",
|
noPassword="请填写密码",
|
||||||
diffPassword="两次密码不一致",
|
diffPassword="两次密码不一致",
|
||||||
|
registerSuccessed="注册成功!",
|
||||||
|
registerFailed="注册失败",
|
||||||
|
|
||||||
errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
|
errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
|
||||||
|
|
||||||
acts={
|
acts={
|
||||||
|
|||||||
@@ -7,24 +7,27 @@ function keyDown.login(key)
|
|||||||
local password2=WIDGET.active.password2.value
|
local password2=WIDGET.active.password2.value
|
||||||
if #username==0 then
|
if #username==0 then
|
||||||
LOG.print(text.noUsername)return
|
LOG.print(text.noUsername)return
|
||||||
elseif not email:match("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")then
|
elseif not email:match("^[a-zA-Z0-9_]+@[a-zA-Z0-9_-]+%.[a-zA-Z0-9_]+$")then
|
||||||
LOG.print(text.wrongEmail)return
|
LOG.print(text.wrongEmail)return
|
||||||
|
elseif #code~=12 then
|
||||||
|
LOG.print(text.wrongCode)return
|
||||||
elseif #password==0 or #password2==0 then
|
elseif #password==0 or #password2==0 then
|
||||||
LOG.print(text.noPassword)return
|
LOG.print(text.noPassword)return
|
||||||
elseif password~=password2 then
|
elseif password~=password2 then
|
||||||
LOG.print(text.diffPassword)return
|
LOG.print(text.diffPassword)return
|
||||||
end
|
end
|
||||||
|
local data=urlencode.encode({
|
||||||
|
username=username,
|
||||||
|
email=email,
|
||||||
|
password=password,
|
||||||
|
code=code,
|
||||||
|
})
|
||||||
httpRequest(
|
httpRequest(
|
||||||
TICK.httpREQ_register,
|
TICK.httpREQ_register,
|
||||||
"api/account/register",
|
"api/account/register",
|
||||||
"POST",
|
"POST",
|
||||||
{["Content-Type"]="application/json"},
|
{["Content-Type"]="application/x-www-form-urlencoded"},
|
||||||
json.encode({
|
data
|
||||||
username=username,
|
|
||||||
email=email,
|
|
||||||
password=password,
|
|
||||||
code=code,
|
|
||||||
})
|
|
||||||
)
|
)
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ end
|
|||||||
|
|
||||||
WIDGET.init("main",{
|
WIDGET.init("main",{
|
||||||
WIDGET.newButton({name="offline", x=150,y=220,w=200,h=140,color="lRed", font=40,code=WIDGET.lnk.goScene("mode")}),
|
WIDGET.newButton({name="offline", x=150,y=220,w=200,h=140,color="lRed", font=40,code=WIDGET.lnk.goScene("mode")}),
|
||||||
WIDGET.newButton({name="online", x=370,y=220,w=200,h=140,color="lCyan", font=40,code=WIDGET.lnk.goScene(LOGIN and"netgame"or"login"),hide=function()return not LOGIN end}),
|
WIDGET.newButton({name="online", x=370,y=220,w=200,h=140,color="lCyan", font=40,code=WIDGET.lnk.goScene(LOGIN and"netgame"or"login")}),
|
||||||
WIDGET.newButton({name="custom", x=590,y=220,w=200,h=140,color="lBlue", font=45,code=WIDGET.lnk.goScene("customGame"),hide=function()return not RANKS.marathon_normal end}),
|
WIDGET.newButton({name="custom", x=590,y=220,w=200,h=140,color="lBlue", font=45,code=WIDGET.lnk.goScene("customGame"),hide=function()return not RANKS.marathon_normal end}),
|
||||||
WIDGET.newButton({name="setting", x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk.goScene("setting_game")}),
|
WIDGET.newButton({name="setting", x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk.goScene("setting_game")}),
|
||||||
WIDGET.newButton({name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=35,code=WIDGET.lnk.goScene("stat")}),
|
WIDGET.newButton({name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=35,code=WIDGET.lnk.goScene("stat")}),
|
||||||
|
|||||||
Reference in New Issue
Block a user