Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Dec 3, 2024
2 parents 04e9a31 + 568c7d2 commit 41f6e46
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion application/src/main/resources/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,19 @@ 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();
Toast.success(i18nResources.sendVerificationCodeSuccess);
})
.catch((e) => {
button.disabled = false;
button.textContent = originalButtonText;
if (e instanceof Error) {
Toast.error(e.message);
} else {
Expand All @@ -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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
const i18nResources = {
sendVerificationCodeSuccess: `[(#{js.sendVerificationCode.success})]`,
sendVerificationCodeFailed: `[(#{js.sendVerificationCode.failed})]`,
sendVerificationCodeSending: `[(#{js.sendVerificationCode.sending})]`,
passwordConfirmationFailed: `[(#{js.passwordConfirmation.failed})]`,
};
</script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
socialLogin.label=社交登录
js.sendVerificationCode.success=发送成功
js.sendVerificationCode.failed=发送失败,请稍后再试
js.sendVerificationCode.sending=发送中...
js.passwordConfirmation.failed=确认密码不匹配

signupNotice.description=没有账号?
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
socialLogin.label=社交登入
js.sendVerificationCode.success=發送成功
js.sendVerificationCode.failed=發送失敗,請稍後再試
js.sendVerificationCode.sending=發送中...
js.passwordConfirmation.failed=確認密碼不匹配

signupNotice.description=沒有帳號?
Expand Down
2 changes: 1 addition & 1 deletion platform/application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 41f6e46

Please sign in to comment.