Merge tag '2023.9.0' into merge-upstream
This commit is contained in:
commit
87223add7b
1235 changed files with 19016 additions and 13835 deletions
|
@ -51,19 +51,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
import { toUnicode } from 'punycode/';
|
||||
import { UserDetailed } from 'misskey-js/built/entities';
|
||||
import { supported as WebAuthnSupported, get as WebAuthnRequest, parseRequestOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
|
||||
import { showSuspendedDialog } from '@/scripts/show-suspended-dialog';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { supported as webAuthnSupported, get as webAuthnRequest, parseRequestOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
|
||||
import { showSuspendedDialog } from '@/scripts/show-suspended-dialog.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import { host as configHost } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import { login } from '@/account';
|
||||
import { i18n } from '@/i18n';
|
||||
import { host as configHost } from '@/config.js';
|
||||
import * as os from '@/os.js';
|
||||
import { login } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
let signing = $ref(false);
|
||||
let user = $ref<UserDetailed | null>(null);
|
||||
let user = $ref<Misskey.entities.UserDetailed | null>(null);
|
||||
let username = $ref('');
|
||||
let password = $ref('');
|
||||
let token = $ref('');
|
||||
|
@ -74,7 +74,9 @@ let credentialRequest = $ref<CredentialRequestOptions | null>(null);
|
|||
let hCaptchaResponse = $ref(null);
|
||||
let reCaptchaResponse = $ref(null);
|
||||
|
||||
const emit = defineEmits<(ev: 'login', v: any) => void>();
|
||||
const emit = defineEmits<{
|
||||
(ev: 'login', v: any): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps({
|
||||
withAvatar: {
|
||||
|
@ -112,7 +114,7 @@ function onLogin(res: any): Promise<void> | void {
|
|||
|
||||
async function queryKey(): Promise<void> {
|
||||
queryingKey = true;
|
||||
await WebAuthnRequest(credentialRequest)
|
||||
await webAuthnRequest(credentialRequest)
|
||||
.catch(() => {
|
||||
queryingKey = false;
|
||||
return Promise.reject(null);
|
||||
|
@ -143,7 +145,7 @@ async function queryKey(): Promise<void> {
|
|||
function onSubmit(): void {
|
||||
signing = true;
|
||||
if (!totpLogin && user && user.twoFactorEnabled) {
|
||||
if (WebAuthnSupported() && user.securityKeys) {
|
||||
if (webAuthnSupported() && user.securityKeys) {
|
||||
os.api('signin', {
|
||||
username,
|
||||
password,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue