diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-28 11:15:17 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-28 11:15:17 +0900 |
| commit | 3e2441998107d37f9d0f683430c5dedd4c5cd0b5 (patch) | |
| tree | e3233f6d16d53a08bf4e9e301a39a23a8ef4b92f /packages | |
| parent | build-misskey-js-with-types (#16470) (diff) | |
| download | misskey-3e2441998107d37f9d0f683430c5dedd4c5cd0b5.tar.gz misskey-3e2441998107d37f9d0f683430c5dedd4c5cd0b5.tar.bz2 misskey-3e2441998107d37f9d0f683430c5dedd4c5cd0b5.zip | |
refactor
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/frontend/src/components/MkDrive.vue | 3 | ||||
| -rw-r--r-- | packages/frontend/src/components/MkLaunchPad.vue | 3 | ||||
| -rw-r--r-- | packages/frontend/src/components/form/suspense.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/about.emojis.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/channels.vue | 5 | ||||
| -rw-r--r-- | packages/frontend/src/pages/explore.users.vue | 13 | ||||
| -rw-r--r-- | packages/frontend/src/pages/settings/notifications.vue | 6 | ||||
| -rw-r--r-- | packages/frontend/src/ui/_common_/navbar-h.vue | 6 |
8 files changed, 21 insertions, 19 deletions
diff --git a/packages/frontend/src/components/MkDrive.vue b/packages/frontend/src/components/MkDrive.vue index 83169496ff..9f1364aec4 100644 --- a/packages/frontend/src/components/MkDrive.vue +++ b/packages/frontend/src/components/MkDrive.vue @@ -152,11 +152,12 @@ import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js'; import { Paginator } from '@/utility/paginator.js'; const props = withDefaults(defineProps<{ - initialFolder?: Misskey.entities.DriveFolder['id'] | null; + initialFolder?: Misskey.entities.DriveFolder | Misskey.entities.DriveFolder['id'] | null; type?: string; multiple?: boolean; select?: 'file' | 'folder' | null; }>(), { + initialFolder: null, multiple: false, select: null, }); diff --git a/packages/frontend/src/components/MkLaunchPad.vue b/packages/frontend/src/components/MkLaunchPad.vue index 584afff55c..d8725ade0b 100644 --- a/packages/frontend/src/components/MkLaunchPad.vue +++ b/packages/frontend/src/components/MkLaunchPad.vue @@ -34,9 +34,10 @@ import { deviceKind } from '@/utility/device-kind.js'; import { prefer } from '@/preferences.js'; const props = withDefaults(defineProps<{ - anchorElement?: HTMLElement; + anchorElement?: HTMLElement | null; anchor?: { x: string; y: string; }; }>(), { + anchorElement: null, anchor: () => ({ x: 'right', y: 'center' }), }); diff --git a/packages/frontend/src/components/form/suspense.vue b/packages/frontend/src/components/form/suspense.vue index 821f07510b..3b23acf612 100644 --- a/packages/frontend/src/components/form/suspense.vue +++ b/packages/frontend/src/components/form/suspense.vue @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkLoading/> </div> <div v-else-if="resolved"> - <slot :result="result"></slot> + <slot :result="result as T"></slot> </div> <div v-else> <div :class="$style.error"> diff --git a/packages/frontend/src/pages/about.emojis.vue b/packages/frontend/src/pages/about.emojis.vue index 43133bb573..7e514c5a73 100644 --- a/packages/frontend/src/pages/about.emojis.vue +++ b/packages/frontend/src/pages/about.emojis.vue @@ -48,7 +48,7 @@ import { $i } from '@/i.js'; const customEmojiTags = getCustomEmojiTags(); const q = ref(''); -const searchEmojis = ref<Misskey.entities.EmojiSimple[]>(null); +const searchEmojis = ref<Misskey.entities.EmojiSimple[] | null>(null); const selectedTags = ref(new Set()); function search() { diff --git a/packages/frontend/src/pages/channels.vue b/packages/frontend/src/pages/channels.vue index 324e0c573a..1e7301d06d 100644 --- a/packages/frontend/src/pages/channels.vue +++ b/packages/frontend/src/pages/channels.vue @@ -110,6 +110,11 @@ async function search() { 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', { limit: 10, params: { diff --git a/packages/frontend/src/pages/explore.users.vue b/packages/frontend/src/pages/explore.users.vue index 72f2a6813c..08f9f5e582 100644 --- a/packages/frontend/src/pages/explore.users.vue +++ b/packages/frontend/src/pages/explore.users.vue @@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only </template> </div> <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> <div> @@ -39,7 +39,7 @@ SPDX-License-Identifier: AGPL-3.0-only </div> </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> <MkUserList :paginator="tagUsersPaginator"/> </MkFoldableSection> @@ -78,22 +78,17 @@ const props = defineProps<{ }>(); const origin = ref('local'); -const tagsEl = useTemplateRef('tagsEl'); const tagsLocal = ref<Misskey.entities.Hashtag[]>([]); const tagsRemote = ref<Misskey.entities.Hashtag[]>([]); -watch(() => props.tag, () => { - if (tagsEl.value) tagsEl.value.toggleContent(props.tag == null); -}); - -const tagUsersPaginator = markRaw(new Paginator('hashtags/users', { +const tagUsersPaginator = props.tag != null ? markRaw(new Paginator('hashtags/users', { limit: 30, params: { tag: props.tag, origin: 'combined', sort: '+follower', }, -})); +})) : null; const pinnedUsersPaginator = markRaw(new Paginator('pinned-users', { noPaging: true, diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index 2f2b57bdaf..84ecc23e84 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -55,11 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only <MkPushNotificationAllowButton ref="allowButton"/> <MkSwitch :disabled="!pushRegistrationInServer" :modelValue="sendReadMessage" @update:modelValue="onChangeSendReadMessage"> <template #label>{{ i18n.ts.sendPushNotificationReadMessage }}</template> - <template #caption> - <I18n :src="i18n.ts.sendPushNotificationReadMessageCaption"> - <template #emptyPushNotificationMessage>{{ i18n.ts._notification.emptyPushNotificationMessage }}</template> - </I18n> - </template> + <template #caption>{{ i18n.ts.sendPushNotificationReadMessageCaption }}</template> </MkSwitch> </div> </FormSection> diff --git a/packages/frontend/src/ui/_common_/navbar-h.vue b/packages/frontend/src/ui/_common_/navbar-h.vue index 4f91078893..a78bdd52d1 100644 --- a/packages/frontend/src/ui/_common_/navbar-h.vue +++ b/packages/frontend/src/ui/_common_/navbar-h.vue @@ -57,6 +57,7 @@ import { i18n } from '@/i18n.js'; import { prefer } from '@/preferences.js'; import { openAccountMenu as openAccountMenu_ } from '@/accounts.js'; import { $i } from '@/i.js'; +import { getHTMLElementOrNull } from '@/utility/get-dom-node-or-null.js'; const WINDOW_THRESHOLD = 1400; @@ -72,8 +73,11 @@ const otherNavItemIndicated = computed<boolean>(() => { }); 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), { - anchorElement: ev.currentTarget ?? ev.target, + anchorElement: target, anchor: { x: 'center', y: 'bottom' }, }, { closed: () => dispose(), |