14655の変更取り込み
This commit is contained in:
parent
8865cefece
commit
305925d2af
|
@ -25,7 +25,7 @@
|
||||||
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MkButton type="submit" large primary rounded style="margin: 0 auto;" data-cy-signin-page-password-continue>{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i></MkButton>
|
<MkButton type="submit" :disabled="captchaFailed" large primary rounded style="margin: 0 auto;" data-cy-signin-page-password-continue>{{ i18n.ts.continue }} <i class="ti ti-arrow-right"></i></MkButton>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,7 +44,7 @@ export type PwResponse = {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineAsyncComponent } from 'vue';
|
import { ref, computed, defineAsyncComponent } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
|
||||||
import { instance } from '@/instance.js';
|
import { instance } from '@/instance.js';
|
||||||
|
@ -70,6 +70,14 @@ const mCaptchaResponse = ref<string | null>(null);
|
||||||
const reCaptchaResponse = ref<string | null>(null);
|
const reCaptchaResponse = ref<string | null>(null);
|
||||||
const turnstileResponse = ref<string | null>(null);
|
const turnstileResponse = ref<string | null>(null);
|
||||||
|
|
||||||
|
const captchaFailed = computed((): boolean => {
|
||||||
|
return (
|
||||||
|
instance.enableHcaptcha && !hCaptchaResponse.value ||
|
||||||
|
instance.enableMcaptcha && !mCaptchaResponse.value ||
|
||||||
|
instance.enableRecaptcha && !reCaptchaResponse.value ||
|
||||||
|
instance.enableTurnstile && !turnstileResponse.value);
|
||||||
|
});
|
||||||
|
|
||||||
function resetPassword(): void {
|
function resetPassword(): void {
|
||||||
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkForgotPassword.vue')), {}, {
|
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkForgotPassword.vue')), {}, {
|
||||||
closed: () => dispose(),
|
closed: () => dispose(),
|
||||||
|
|
|
@ -82,14 +82,6 @@ import XPasskey from '@/components/MkSignin.passkey.vue';
|
||||||
import type { AuthenticationPublicKeyCredential } from '@github/webauthn-json/browser-ponyfill';
|
import type { AuthenticationPublicKeyCredential } from '@github/webauthn-json/browser-ponyfill';
|
||||||
import type { OpenOnRemoteOptions } from '@/scripts/please-login.js';
|
import type { OpenOnRemoteOptions } from '@/scripts/please-login.js';
|
||||||
|
|
||||||
const captchaFailed = computed((): boolean => {
|
|
||||||
return (
|
|
||||||
instance.enableHcaptcha && !hCaptchaResponse.value ||
|
|
||||||
instance.enableMcaptcha && !mCaptchaResponse.value ||
|
|
||||||
instance.enableRecaptcha && !reCaptchaResponse.value ||
|
|
||||||
instance.enableTurnstile && !turnstileResponse.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'login', v: Misskey.entities.SigninResponse): void;
|
(ev: 'login', v: Misskey.entities.SigninResponse): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
Loading…
Reference in New Issue