feat: 添加国际化支持,更新登录和注册组件中的文本,优化用户体验
This commit is contained in:
@@ -3,6 +3,8 @@ import type { PropType } from "vue";
|
||||
import type { AuthUserSignup } from "@/auth/type";
|
||||
import { toastController } from "@ionic/vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "success", value: AuthUserSignup): void;
|
||||
}>();
|
||||
@@ -11,7 +13,7 @@ const model = defineModel({ type: Object as PropType<AuthUserSignup>, required:
|
||||
async function submitSignup() {
|
||||
if (model.value.verificationCode.length !== 6) {
|
||||
const toast = await toastController.create({
|
||||
message: "Please enter a valid 6-digit verification code.",
|
||||
message: t('auth.common.validVerificationCodeError'),
|
||||
duration: 1500,
|
||||
position: "bottom",
|
||||
});
|
||||
@@ -25,8 +27,8 @@ async function submitSignup() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1><strong>Verify your email</strong></h1>
|
||||
<p>We have sent a verification code to {{ model.email }}. Please enter the code below to verify your email address.</p>
|
||||
<h1><strong>{{ t('auth.verification.title') }}</strong></h1>
|
||||
<p>{{ t('auth.verification.description', { email: model.email }) }}</p>
|
||||
|
||||
<div>
|
||||
<ion-input-otp v-model="model.verificationCode" :length="6" />
|
||||
@@ -38,7 +40,7 @@ async function submitSignup() {
|
||||
<ui-input v-model="model.confirmPassword" placeholder="Confirm Password" /> -->
|
||||
|
||||
<ion-button expand="block" class="ion-margin-top" shape="round" @click="submitSignup">
|
||||
Submit
|
||||
{{ t('auth.common.submit') }}
|
||||
</ion-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user