Merge remote-tracking branch 'misskey-dev/develop' into develop

# Conflicts:
#	package.json
#	pnpm-lock.yaml
This commit is contained in:
mattyatea 2024-07-17 21:25:40 +09:00
commit d80f37328d
7 changed files with 620 additions and 313 deletions

View file

@ -25,7 +25,7 @@
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-replace": "5.0.7",
"@rollup/pluginutils": "5.1.0",
"@syuilo/aiscript": "0.18.0",
"@syuilo/aiscript": "0.19.0",
"@tabler/icons-webfont": "3.3.0",
"@twemoji/parser": "15.1.1",
"@vitejs/plugin-vue": "5.0.5",

View file

@ -86,7 +86,7 @@ const host = ref(toUnicode(configHost));
const totpLogin = ref(false);
const isBackupCode = ref(false);
const queryingKey = ref(false);
const credentialRequest = ref<CredentialRequestOptions | null>(null);
let credentialRequest: CredentialRequestOptions | null = null;
const emit = defineEmits<{
(ev: 'login', v: any): void;
@ -121,14 +121,14 @@ function onLogin(res: any): Promise<void> | void {
}
async function queryKey(): Promise<void> {
if (credentialRequest.value == null) return;
if (credentialRequest == null) return;
queryingKey.value = true;
await webAuthnRequest(credentialRequest.value)
await webAuthnRequest(credentialRequest)
.catch(() => {
queryingKey.value = false;
return Promise.reject(null);
}).then(credential => {
credentialRequest.value = null;
credentialRequest = null;
queryingKey.value = false;
signing.value = true;
return misskeyApi('signin', {
@ -159,7 +159,7 @@ function onSubmit(): void {
}).then(res => {
totpLogin.value = true;
signing.value = false;
credentialRequest.value = parseRequestOptionsFromJSON({
credentialRequest = parseRequestOptionsFromJSON({
publicKey: res,
});
})

View file

@ -37,6 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, ref } from 'vue';
import * as Misskey from 'misskey-js';
import { AISCRIPT_VERSION } from '@syuilo/aiscript';
import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
@ -48,7 +49,7 @@ import MkInput from '@/components/MkInput.vue';
import MkSelect from '@/components/MkSelect.vue';
import { useRouter } from '@/router/supplier.js';
const PRESET_DEFAULT = `/// @ 0.18.0
const PRESET_DEFAULT = `/// @ ${AISCRIPT_VERSION}
var name = ""
@ -66,7 +67,7 @@ Ui:render([
])
`;
const PRESET_OMIKUJI = `/// @ 0.18.0
const PRESET_OMIKUJI = `/// @ ${AISCRIPT_VERSION}
//
//
@ -109,7 +110,7 @@ Ui:render([
])
`;
const PRESET_SHUFFLE = `/// @ 0.18.0
const PRESET_SHUFFLE = `/// @ ${AISCRIPT_VERSION}
//
let string = "ペペロンチーノ"
@ -188,7 +189,7 @@ var cursor = 0
do()
`;
const PRESET_QUIZ = `/// @ 0.18.0
const PRESET_QUIZ = `/// @ ${AISCRIPT_VERSION}
let title = '地理クイズ'
let qas = [{
@ -301,7 +302,7 @@ qaEls.push(Ui:C:container({
Ui:render(qaEls)
`;
const PRESET_TIMELINE = `/// @ 0.18.0
const PRESET_TIMELINE = `/// @ ${AISCRIPT_VERSION}
// API
@fetch() {