feat: add invitation code.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"invitation code":"邀请码",
|
||||
"Please enter your code":"请填写邀请码",
|
||||
"signIn":"登录",
|
||||
"signUp":"注册",
|
||||
"username":"用户名",
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
:append-inner-icon="passwordInputType === 'password' ? 'visibility' : 'visibility_off'"
|
||||
@click:append-inner="passwordInputType = passwordInputType === 'password' ? 'text' : 'password'"
|
||||
></v-text-field>
|
||||
|
||||
</v-form>
|
||||
|
||||
<div v-if="errorMsg" class="text-red">{{ errorMsg }}</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ const formData = ref({
|
||||
email: '',
|
||||
password1: '',
|
||||
password2: '',
|
||||
code:'',
|
||||
})
|
||||
|
||||
const fieldErrors = ref({
|
||||
@@ -16,6 +17,7 @@ const fieldErrors = ref({
|
||||
email: '',
|
||||
password1: '',
|
||||
password2: '',
|
||||
code:'',
|
||||
})
|
||||
|
||||
const formRules = ref({
|
||||
@@ -35,7 +37,10 @@ const formRules = ref({
|
||||
v => !!v || $i18n.t('Please confirm your password'),
|
||||
v => v.length >= 8 || $i18n.t('Password must be at least 8 characters'),
|
||||
v => v === formData.value.password1 || $i18n.t('Confirm password must match password')
|
||||
]
|
||||
],
|
||||
code: [
|
||||
v => !!v || $i18n.t('Please enter your code'),
|
||||
],
|
||||
})
|
||||
|
||||
const submitting = ref(false)
|
||||
@@ -145,6 +150,15 @@ const handleFieldUpdate = (field) => {
|
||||
clearable
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
v-model="formData.code"
|
||||
:rules="formRules.code"
|
||||
:label="$t('invitation code')"
|
||||
variant="underlined"
|
||||
@keyup.enter="submit"
|
||||
clearable
|
||||
></v-text-field>
|
||||
|
||||
</v-form>
|
||||
|
||||
<div v-if="errorMsg" class="text-red">{{ errorMsg }}</div>
|
||||
|
||||
Reference in New Issue
Block a user