1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 18:44:02 +02:00

fix(frontend): Paginatorの型エラー解消 (#16230)

* fix(frontend): fix paginator type error

* fix

* refactor

* fix

* fix

* fix(paginator): remove readonly type

* fix

* typo

* fix: R -> E

* remove any

---------

Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-07-03 11:20:26 +09:00
committed by GitHub
parent c48acad04b
commit 09a5e4b10a
18 changed files with 216 additions and 138 deletions

View File

@@ -48,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script setup lang="ts">
import * as Misskey from 'misskey-js';
import { computed, markRaw, ref, watch } from 'vue';
import tinycolor from 'tinycolor2';
import type { StyleValue } from 'vue';
@@ -62,7 +63,7 @@ import MkSelect from '@/components/MkSelect.vue';
import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js';
import { Paginator } from '@/utility/paginator.js';
const sortMode = ref('+size');
const sortMode = ref<Misskey.entities.DriveFilesRequest['sort']>('+size');
const paginator = markRaw(new Paginator('drive/files', {
limit: 10,
computedParams: computed(() => ({ sort: sortMode.value })),

View File

@@ -208,9 +208,9 @@ const blockingPaginator = markRaw(new Paginator('blocking/list', {
limit: 10,
}));
const expandedRenoteMuteItems = ref([]);
const expandedMuteItems = ref([]);
const expandedBlockItems = ref([]);
const expandedRenoteMuteItems = ref<string[]>([]);
const expandedMuteItems = ref<string[]>([]);
const expandedBlockItems = ref<string[]>([]);
const showSoftWordMutedWord = prefer.model('showSoftWordMutedWord');
@@ -253,7 +253,7 @@ async function unblock(user, ev) {
}], ev.currentTarget ?? ev.target);
}
async function toggleRenoteMuteItem(item) {
async function toggleRenoteMuteItem(item: { id: string }) {
if (expandedRenoteMuteItems.value.includes(item.id)) {
expandedRenoteMuteItems.value = expandedRenoteMuteItems.value.filter(x => x !== item.id);
} else {
@@ -261,7 +261,7 @@ async function toggleRenoteMuteItem(item) {
}
}
async function toggleMuteItem(item) {
async function toggleMuteItem(item: { id: string }) {
if (expandedMuteItems.value.includes(item.id)) {
expandedMuteItems.value = expandedMuteItems.value.filter(x => x !== item.id);
} else {
@@ -269,7 +269,7 @@ async function toggleMuteItem(item) {
}
}
async function toggleBlockItem(item) {
async function toggleBlockItem(item: { id: string }) {
if (expandedBlockItems.value.includes(item.id)) {
expandedBlockItems.value = expandedBlockItems.value.filter(x => x !== item.id);
} else {