refactor(frontend): asとanyをすぐなおせる範囲で除去 (#14848)

* refactor(frontend): できるだけanyを除去

* refactor

* lint

* fix

* remove unused

* Update packages/frontend/src/components/MkReactionsViewer.details.vue

* Update packages/frontend/src/components/MkUsersTooltip.vue

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2024-10-31 13:46:42 +09:00
committed by GitHub
parent 7fc8a2a7b0
commit 17d9aca5a7
56 changed files with 250 additions and 192 deletions

View File

@@ -138,12 +138,13 @@ const token = ref<string | number | null>(null);
const backupCodes = ref<string[]>();
function cancel() {
dialog.value.close();
dialog.value?.close();
}
async function tokenDone() {
if (token.value == null) return;
const res = await os.apiWithDialog('i/2fa/done', {
token: token.value.toString(),
token: typeof token.value === 'string' ? token.value : token.value.toString(),
});
backupCodes.value = res.backupCodes;
@@ -166,7 +167,7 @@ function downloadBackupCodes() {
}
function allDone() {
dialog.value.close();
dialog.value?.close();
}
</script>

View File

@@ -90,7 +90,7 @@ function createAccount() {
});
}
async function switchAccount(account: any) {
async function switchAccount(account: Misskey.entities.UserDetailed) {
const fetchedAccounts = await getAccounts();
const token = fetchedAccounts.find(x => x.id === account.id)!.token;
switchAccountWithToken(token);

View File

@@ -55,6 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { ref, computed } from 'vue';
import * as Misskey from 'misskey-js';
import FormPagination from '@/components/MkPagination.vue';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
@@ -77,7 +78,7 @@ const pagination = {
function revoke(token) {
misskeyApi('i/revoke-token', { tokenId: token.id }).then(() => {
list.value.reload();
list.value?.reload();
});
}

View File

@@ -110,7 +110,7 @@ const decorationsForPreview = computed(() => {
});
function cancel() {
dialog.value.close();
dialog.value?.close();
}
async function update() {
@@ -120,7 +120,7 @@ async function update() {
offsetX: offsetX.value,
offsetY: offsetY.value,
});
dialog.value.close();
dialog.value?.close();
}
async function attach() {
@@ -130,12 +130,12 @@ async function attach() {
offsetX: offsetX.value,
offsetY: offsetY.value,
});
dialog.value.close();
dialog.value?.close();
}
async function detach() {
emit('detach');
dialog.value.close();
dialog.value?.close();
}
</script>