feat: add birthday field to register page

This commit is contained in:
limes
2026-08-17 23:25:17 +02:00
parent 1f5745d8a1
commit 09e08f44d0
3 changed files with 16 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ const loginURI = computed(() => {
return `/account/login`;
});
const registerForm = reactive({ email: '', username: '', mii_name: '', password: '', password_confirm: '' });
const registerForm = reactive({ email: '', username: '', mii_name: '', birthday: '', password: '', password_confirm: '' });
const captchaRef = useTemplateRef('captcha');
const { execute, isLoading } = useAsync({
@@ -36,6 +36,7 @@ const { execute, isLoading } = useAsync({
miiName: registerForm.mii_name,
password: registerForm.password,
username: registerForm.username,
birthday: registerForm.birthday,
captchaResponse: captchaResponse ?? undefined
} satisfies ApiAuthRegisterRequest
});
@@ -95,6 +96,16 @@ const { execute, isLoading } = useAsync({
required
>
</div>
<div>
<label for="mii_name">{{ $t("account.loginForm.birthdate") }}</label>
<input
id="birthday"
v-model="registerForm.birthday"
name="birthday"
type="date"
required
>
</div>
<div>
<label for="password">{{ $t("account.loginForm.password") }}</label>
<input