Merge branch 'develop' into bmjwt

This commit is contained in:
tamaina 2025-08-28 11:43:49 +09:00
commit eb210ff8f3
12 changed files with 27 additions and 27 deletions

View File

@ -244,7 +244,6 @@ export class WebhookTestService {
case 'reaction': case 'reaction':
return; return;
default: { default: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _exhaustiveAssertion: never = params.type; const _exhaustiveAssertion: never = params.type;
return; return;
} }
@ -327,7 +326,6 @@ export class WebhookTestService {
break; break;
} }
default: { default: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _exhaustiveAssertion: never = params.type; const _exhaustiveAssertion: never = params.type;
return; return;
} }
@ -412,7 +410,7 @@ export class WebhookTestService {
name: user.name, name: user.name,
username: user.username, username: user.username,
host: user.host, host: user.host,
avatarUrl: user.avatarId == null ? null : user.avatarUrl, avatarUrl: (user.avatarId == null ? null : user.avatarUrl) ?? '',
avatarBlurhash: user.avatarId == null ? null : user.avatarBlurhash, avatarBlurhash: user.avatarId == null ? null : user.avatarBlurhash,
avatarDecorations: user.avatarDecorations.map(it => ({ avatarDecorations: user.avatarDecorations.map(it => ({
id: it.id, id: it.id,

View File

@ -471,8 +471,8 @@ export class UserEntityService implements OnModuleInit {
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount : (profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
null; null;
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : null; const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : undefined;
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : null; const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : undefined;
const unreadAnnouncements = isMe && isDetailed ? const unreadAnnouncements = isMe && isDetailed ?
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({ (await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
createdAt: this.idService.parse(announcement.id).date.toISOString(), createdAt: this.idService.parse(announcement.id).date.toISOString(),

View File

@ -465,11 +465,11 @@ export const packedMeDetailedOnlySchema = {
}, },
isModerator: { isModerator: {
type: 'boolean', type: 'boolean',
nullable: true, optional: false, nullable: false, optional: false,
}, },
isAdmin: { isAdmin: {
type: 'boolean', type: 'boolean',
nullable: true, optional: false, nullable: false, optional: false,
}, },
injectFeaturedNote: { injectFeaturedNote: {
type: 'boolean', type: 'boolean',

View File

@ -152,11 +152,12 @@ import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js';
import { Paginator } from '@/utility/paginator.js'; import { Paginator } from '@/utility/paginator.js';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
initialFolder?: Misskey.entities.DriveFolder['id'] | null; initialFolder?: Misskey.entities.DriveFolder | Misskey.entities.DriveFolder['id'] | null;
type?: string; type?: string;
multiple?: boolean; multiple?: boolean;
select?: 'file' | 'folder' | null; select?: 'file' | 'folder' | null;
}>(), { }>(), {
initialFolder: null,
multiple: false, multiple: false,
select: null, select: null,
}); });

View File

@ -34,9 +34,10 @@ import { deviceKind } from '@/utility/device-kind.js';
import { prefer } from '@/preferences.js'; import { prefer } from '@/preferences.js';
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
anchorElement?: HTMLElement; anchorElement?: HTMLElement | null;
anchor?: { x: string; y: string; }; anchor?: { x: string; y: string; };
}>(), { }>(), {
anchorElement: null,
anchor: () => ({ x: 'right', y: 'center' }), anchor: () => ({ x: 'right', y: 'center' }),
}); });

View File

@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkLoading/> <MkLoading/>
</div> </div>
<div v-else-if="resolved"> <div v-else-if="resolved">
<slot :result="result"></slot> <slot :result="result as T"></slot>
</div> </div>
<div v-else> <div v-else>
<div :class="$style.error"> <div :class="$style.error">

View File

@ -48,7 +48,7 @@ import { $i } from '@/i.js';
const customEmojiTags = getCustomEmojiTags(); const customEmojiTags = getCustomEmojiTags();
const q = ref(''); const q = ref('');
const searchEmojis = ref<Misskey.entities.EmojiSimple[]>(null); const searchEmojis = ref<Misskey.entities.EmojiSimple[] | null>(null);
const selectedTags = ref(new Set()); const selectedTags = ref(new Set());
function search() { function search() {

View File

@ -110,6 +110,11 @@ async function search() {
const type = searchType.value.toString().trim(); const type = searchType.value.toString().trim();
if (type !== 'nameAndDescription' && type !== 'nameOnly') {
console.error(`Unrecognized search type: ${type}`);
return;
}
channelPaginator.value = markRaw(new Paginator('channels/search', { channelPaginator.value = markRaw(new Paginator('channels/search', {
limit: 10, limit: 10,
params: { params: {

View File

@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template> </template>
</div> </div>
<div v-else> <div v-else>
<MkFoldableSection ref="tagsEl" :foldable="true" :expanded="false" class="_margin"> <MkFoldableSection :foldable="true" :expanded="false" class="_margin">
<template #header><i class="ti ti-hash ti-fw" style="margin-right: 0.5em;"></i>{{ i18n.ts.popularTags }}</template> <template #header><i class="ti ti-hash ti-fw" style="margin-right: 0.5em;"></i>{{ i18n.ts.popularTags }}</template>
<div> <div>
@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</MkFoldableSection> </MkFoldableSection>
<MkFoldableSection v-if="tag != null" :key="`${tag}`" class="_margin"> <MkFoldableSection v-if="tagUsersPaginator != null" :key="`${tag}`" class="_margin">
<template #header><i class="ti ti-hash ti-fw" style="margin-right: 0.5em;"></i>{{ tag }}</template> <template #header><i class="ti ti-hash ti-fw" style="margin-right: 0.5em;"></i>{{ tag }}</template>
<MkUserList :paginator="tagUsersPaginator"/> <MkUserList :paginator="tagUsersPaginator"/>
</MkFoldableSection> </MkFoldableSection>
@ -78,22 +78,17 @@ const props = defineProps<{
}>(); }>();
const origin = ref('local'); const origin = ref('local');
const tagsEl = useTemplateRef('tagsEl');
const tagsLocal = ref<Misskey.entities.Hashtag[]>([]); const tagsLocal = ref<Misskey.entities.Hashtag[]>([]);
const tagsRemote = ref<Misskey.entities.Hashtag[]>([]); const tagsRemote = ref<Misskey.entities.Hashtag[]>([]);
watch(() => props.tag, () => { const tagUsersPaginator = props.tag != null ? markRaw(new Paginator('hashtags/users', {
if (tagsEl.value) tagsEl.value.toggleContent(props.tag == null);
});
const tagUsersPaginator = markRaw(new Paginator('hashtags/users', {
limit: 30, limit: 30,
params: { params: {
tag: props.tag, tag: props.tag,
origin: 'combined', origin: 'combined',
sort: '+follower', sort: '+follower',
}, },
})); })) : null;
const pinnedUsersPaginator = markRaw(new Paginator('pinned-users', { const pinnedUsersPaginator = markRaw(new Paginator('pinned-users', {
noPaging: true, noPaging: true,

View File

@ -55,11 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkPushNotificationAllowButton ref="allowButton"/> <MkPushNotificationAllowButton ref="allowButton"/>
<MkSwitch :disabled="!pushRegistrationInServer" :modelValue="sendReadMessage" @update:modelValue="onChangeSendReadMessage"> <MkSwitch :disabled="!pushRegistrationInServer" :modelValue="sendReadMessage" @update:modelValue="onChangeSendReadMessage">
<template #label>{{ i18n.ts.sendPushNotificationReadMessage }}</template> <template #label>{{ i18n.ts.sendPushNotificationReadMessage }}</template>
<template #caption> <template #caption>{{ i18n.ts.sendPushNotificationReadMessageCaption }}</template>
<I18n :src="i18n.ts.sendPushNotificationReadMessageCaption">
<template #emptyPushNotificationMessage>{{ i18n.ts._notification.emptyPushNotificationMessage }}</template>
</I18n>
</template>
</MkSwitch> </MkSwitch>
</div> </div>
</FormSection> </FormSection>

View File

@ -34,7 +34,7 @@ const props = withDefaults(defineProps<{
limit: 50, limit: 50,
}); });
const chartSrc = ref('per-user-notes'); const chartSrc = ref<'per-user-notes' | 'per-user-pv'>('per-user-notes');
function showMenu(ev: MouseEvent) { function showMenu(ev: MouseEvent) {
os.popupMenu([{ os.popupMenu([{

View File

@ -57,6 +57,7 @@ import { i18n } from '@/i18n.js';
import { prefer } from '@/preferences.js'; import { prefer } from '@/preferences.js';
import { openAccountMenu as openAccountMenu_ } from '@/accounts.js'; import { openAccountMenu as openAccountMenu_ } from '@/accounts.js';
import { $i } from '@/i.js'; import { $i } from '@/i.js';
import { getHTMLElementOrNull } from '@/utility/get-dom-node-or-null.js';
const WINDOW_THRESHOLD = 1400; const WINDOW_THRESHOLD = 1400;
@ -72,8 +73,11 @@ const otherNavItemIndicated = computed<boolean>(() => {
}); });
async function more(ev: MouseEvent) { async function more(ev: MouseEvent) {
const target = getHTMLElementOrNull(ev.currentTarget ?? ev.target);
if (!target) return;
const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLaunchPad.vue').then(x => x.default), { const { dispose } = await os.popupAsyncWithDialog(import('@/components/MkLaunchPad.vue').then(x => x.default), {
anchorElement: ev.currentTarget ?? ev.target, anchorElement: target,
anchor: { x: 'center', y: 'bottom' }, anchor: { x: 'center', y: 'bottom' },
}, { }, {
closed: () => dispose(), closed: () => dispose(),