wip
This commit is contained in:
parent
4597848438
commit
af7fc7cdaf
|
@ -104,6 +104,10 @@ const isBackupCode = ref(false);
|
||||||
const queryingKey = ref(false);
|
const queryingKey = ref(false);
|
||||||
let credentialRequest: CredentialRequestOptions | null = null;
|
let credentialRequest: CredentialRequestOptions | null = null;
|
||||||
const passkey_context = ref('');
|
const passkey_context = ref('');
|
||||||
|
const hcaptcha = ref<Captcha | undefined>();
|
||||||
|
const mcaptcha = ref<Captcha | undefined>();
|
||||||
|
const recaptcha = ref<Captcha | undefined>();
|
||||||
|
const turnstile = ref<Captcha | undefined>();
|
||||||
const hCaptchaResponse = ref<string | null>(null);
|
const hCaptchaResponse = ref<string | null>(null);
|
||||||
const mCaptchaResponse = ref<string | null>(null);
|
const mCaptchaResponse = ref<string | null>(null);
|
||||||
const reCaptchaResponse = ref<string | null>(null);
|
const reCaptchaResponse = ref<string | null>(null);
|
||||||
|
@ -258,6 +262,11 @@ function onSubmit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loginFailed(err: any): void {
|
function loginFailed(err: any): void {
|
||||||
|
hcaptcha.value?.reset?.();
|
||||||
|
mcaptcha.value?.reset?.();
|
||||||
|
recaptcha.value?.reset?.();
|
||||||
|
turnstile.value?.reset?.();
|
||||||
|
|
||||||
switch (err.id) {
|
switch (err.id) {
|
||||||
case '6cc579cc-885d-43d8-95c2-b8c7fc963280': {
|
case '6cc579cc-885d-43d8-95c2-b8c7fc963280': {
|
||||||
os.alert({
|
os.alert({
|
||||||
|
|
|
@ -81,10 +81,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { toUnicode } from 'punycode/';
|
import { toUnicode } from 'punycode/';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
import * as config from '@@/js/config.js';
|
||||||
import MkButton from './MkButton.vue';
|
import MkButton from './MkButton.vue';
|
||||||
import MkInput from './MkInput.vue';
|
import MkInput from './MkInput.vue';
|
||||||
import MkCaptcha, { type Captcha } from '@/components/MkCaptcha.vue';
|
import MkCaptcha, { type Captcha } from '@/components/MkCaptcha.vue';
|
||||||
import * as config from '@@/js/config.js';
|
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||||
import { login } from '@/account.js';
|
import { login } from '@/account.js';
|
||||||
|
@ -105,6 +105,7 @@ const emit = defineEmits<{
|
||||||
const host = toUnicode(config.host);
|
const host = toUnicode(config.host);
|
||||||
|
|
||||||
const hcaptcha = ref<Captcha | undefined>();
|
const hcaptcha = ref<Captcha | undefined>();
|
||||||
|
const mcaptcha = ref<Captcha | undefined>();
|
||||||
const recaptcha = ref<Captcha | undefined>();
|
const recaptcha = ref<Captcha | undefined>();
|
||||||
const turnstile = ref<Captcha | undefined>();
|
const turnstile = ref<Captcha | undefined>();
|
||||||
|
|
||||||
|
@ -281,6 +282,7 @@ async function onSubmit(): Promise<void> {
|
||||||
} catch {
|
} catch {
|
||||||
submitting.value = false;
|
submitting.value = false;
|
||||||
hcaptcha.value?.reset?.();
|
hcaptcha.value?.reset?.();
|
||||||
|
mcaptcha.value?.reset?.();
|
||||||
recaptcha.value?.reset?.();
|
recaptcha.value?.reset?.();
|
||||||
turnstile.value?.reset?.();
|
turnstile.value?.reset?.();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue