diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-10-11 21:05:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-11 21:05:53 +0900 |
| commit | af1cbc131fc9e045692f9f9def708c0978817fff (patch) | |
| tree | 84143fc3e0d9a889a6005ddb62e08298087c8acf /packages/frontend/src/components/MkSignupDialog.form.vue | |
| parent | chore: add description (diff) | |
| download | misskey-af1cbc131fc9e045692f9f9def708c0978817fff.tar.gz misskey-af1cbc131fc9e045692f9f9def708c0978817fff.tar.bz2 misskey-af1cbc131fc9e045692f9f9def708c0978817fff.zip | |
wip (#14745)
Diffstat (limited to 'packages/frontend/src/components/MkSignupDialog.form.vue')
| -rw-r--r-- | packages/frontend/src/components/MkSignupDialog.form.vue | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkSignupDialog.form.vue b/packages/frontend/src/components/MkSignupDialog.form.vue index ffb5551ff3..3d1c44fc90 100644 --- a/packages/frontend/src/components/MkSignupDialog.form.vue +++ b/packages/frontend/src/components/MkSignupDialog.form.vue @@ -66,6 +66,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkCaptcha v-if="instance.enableMcaptcha" ref="mcaptcha" v-model="mCaptchaResponse" :class="$style.captcha" provider="mcaptcha" :sitekey="instance.mcaptchaSiteKey" :instanceUrl="instance.mcaptchaInstanceUrl"/> <MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/> <MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/> + <MkCaptcha v-if="instance.enableTestcaptcha" ref="testcaptcha" v-model="testcaptchaResponse" :class="$style.captcha" provider="testcaptcha"/> <MkButton type="submit" :disabled="shouldDisableSubmitting" large gradate rounded data-cy-signup-submit style="margin: 0 auto;"> <template v-if="submitting"> <MkLoading :em="true" :colored="false"/> @@ -108,6 +109,7 @@ const hcaptcha = ref<Captcha | undefined>(); const mcaptcha = ref<Captcha | undefined>(); const recaptcha = ref<Captcha | undefined>(); const turnstile = ref<Captcha | undefined>(); +const testcaptcha = ref<Captcha | undefined>(); const username = ref<string>(''); const password = ref<string>(''); @@ -123,6 +125,7 @@ const hCaptchaResponse = ref<string | null>(null); const mCaptchaResponse = ref<string | null>(null); const reCaptchaResponse = ref<string | null>(null); const turnstileResponse = ref<string | null>(null); +const testcaptchaResponse = ref<string | null>(null); const usernameAbortController = ref<null | AbortController>(null); const emailAbortController = ref<null | AbortController>(null); @@ -132,6 +135,7 @@ const shouldDisableSubmitting = computed((): boolean => { instance.enableMcaptcha && !mCaptchaResponse.value || instance.enableRecaptcha && !reCaptchaResponse.value || instance.enableTurnstile && !turnstileResponse.value || + instance.enableTestcaptcha && !testcaptchaResponse.value || instance.emailRequiredForSignup && emailState.value !== 'ok' || usernameState.value !== 'ok' || passwordRetypeState.value !== 'match'; @@ -259,6 +263,7 @@ async function onSubmit(): Promise<void> { 'm-captcha-response': mCaptchaResponse.value, 'g-recaptcha-response': reCaptchaResponse.value, 'turnstile-response': turnstileResponse.value, + 'testcaptcha-response': testcaptchaResponse.value, }; const res = await fetch(`${config.apiUrl}/signup`, { @@ -301,6 +306,7 @@ function onSignupApiError() { mcaptcha.value?.reset?.(); recaptcha.value?.reset?.(); turnstile.value?.reset?.(); + testcaptcha.value?.reset?.(); os.alert({ type: 'error', |