diff --git a/application/src/main/resources/static/js/main.js b/application/src/main/resources/static/js/main.js index 241caa097b..269b35a52f 100644 --- a/application/src/main/resources/static/js/main.js +++ b/application/src/main/resources/static/js/main.js @@ -90,9 +90,11 @@ const Toast = (function () { function sendVerificationCode(button, sendRequest) { let timer; const countdown = 60; + const originalButtonText = button.textContent; button.addEventListener("click", () => { button.disabled = true; + button.textContent = i18nResources.sendVerificationCodeSending; sendRequest() .then(() => { startCountdown(); @@ -100,6 +102,7 @@ function sendVerificationCode(button, sendRequest) { }) .catch((e) => { button.disabled = false; + button.textContent = originalButtonText; if (e instanceof Error) { Toast.error(e.message); } else { @@ -119,7 +122,7 @@ function sendVerificationCode(button, sendRequest) { remainingTime--; } else { clearInterval(timer); - button.textContent = "Send"; + button.textContent = originalButtonText; button.disabled = false; button.classList.remove("disabled"); } diff --git a/application/src/main/resources/templates/gateway_fragments/common.html b/application/src/main/resources/templates/gateway_fragments/common.html index 127692d41c..296af122c8 100644 --- a/application/src/main/resources/templates/gateway_fragments/common.html +++ b/application/src/main/resources/templates/gateway_fragments/common.html @@ -8,6 +8,7 @@ const i18nResources = { sendVerificationCodeSuccess: `[(#{js.sendVerificationCode.success})]`, sendVerificationCodeFailed: `[(#{js.sendVerificationCode.failed})]`, + sendVerificationCodeSending: `[(#{js.sendVerificationCode.sending})]`, passwordConfirmationFailed: `[(#{js.passwordConfirmation.failed})]`, }; diff --git a/application/src/main/resources/templates/gateway_fragments/common.properties b/application/src/main/resources/templates/gateway_fragments/common.properties index 22053bc75c..526bdbe513 100644 --- a/application/src/main/resources/templates/gateway_fragments/common.properties +++ b/application/src/main/resources/templates/gateway_fragments/common.properties @@ -1,6 +1,7 @@ socialLogin.label=社交登录 js.sendVerificationCode.success=发送成功 js.sendVerificationCode.failed=发送失败,请稍后再试 +js.sendVerificationCode.sending=发送中... js.passwordConfirmation.failed=确认密码不匹配 signupNotice.description=没有账号? diff --git a/application/src/main/resources/templates/gateway_fragments/common_en.properties b/application/src/main/resources/templates/gateway_fragments/common_en.properties index 70af7ab8db..ef1ab42f41 100644 --- a/application/src/main/resources/templates/gateway_fragments/common_en.properties +++ b/application/src/main/resources/templates/gateway_fragments/common_en.properties @@ -1,6 +1,7 @@ socialLogin.label=Social Login js.sendVerificationCode.success=Sent Successfully js.sendVerificationCode.failed=Sending Failed, Please Try Again Later +js.sendVerificationCode.sending=Sending... js.passwordConfirmation.failed=Password confirmation does not match signupNotice.description=Don't have an account? diff --git a/application/src/main/resources/templates/gateway_fragments/common_es.properties b/application/src/main/resources/templates/gateway_fragments/common_es.properties index db6c8cef4f..e786b10d35 100644 --- a/application/src/main/resources/templates/gateway_fragments/common_es.properties +++ b/application/src/main/resources/templates/gateway_fragments/common_es.properties @@ -1,6 +1,7 @@ socialLogin.label=Inicio de Sesión Social js.sendVerificationCode.success=Enviado con éxito js.sendVerificationCode.failed=Error al enviar, por favor intente nuevamente más tarde +js.sendVerificationCode.sending=Enviando... js.passwordConfirmation.failed=La confirmación de la contraseña no coincide signupNotice.description=¿No tienes una cuenta? diff --git a/application/src/main/resources/templates/gateway_fragments/common_zh_TW.properties b/application/src/main/resources/templates/gateway_fragments/common_zh_TW.properties index 63129e1666..c06c3afd1a 100644 --- a/application/src/main/resources/templates/gateway_fragments/common_zh_TW.properties +++ b/application/src/main/resources/templates/gateway_fragments/common_zh_TW.properties @@ -1,6 +1,7 @@ socialLogin.label=社交登入 js.sendVerificationCode.success=發送成功 js.sendVerificationCode.failed=發送失敗,請稍後再試 +js.sendVerificationCode.sending=發送中... js.passwordConfirmation.failed=確認密碼不匹配 signupNotice.description=沒有帳號? diff --git a/platform/application/build.gradle b/platform/application/build.gradle index 4fa2bdf591..f4e63f645c 100644 --- a/platform/application/build.gradle +++ b/platform/application/build.gradle @@ -13,7 +13,7 @@ description = 'Platform of application.' ext { commonsLang3 = "3.12.0" base62 = "0.1.3" - pf4j = '3.12.0' + pf4j = '3.13.0' javaDiffUtils = "4.12" guava = "33.3.1-jre" jsoup = '1.18.1'