mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-21 18:05:29 +02:00
refactor
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user