diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2026-01-14 14:02:50 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-14 14:02:50 +0900 |
| commit | b941c896aa5512240de9121a1850d55aa5f8b68b (patch) | |
| tree | 5d96055387b458f5295d791cc00fd5abf14b1752 /packages/frontend/src/pages/channels.vue | |
| parent | Bump version to 2026.1.0-beta.0 (diff) | |
| download | misskey-b941c896aa5512240de9121a1850d55aa5f8b68b.tar.gz misskey-b941c896aa5512240de9121a1850d55aa5f8b68b.tar.bz2 misskey-b941c896aa5512240de9121a1850d55aa5f8b68b.zip | |
refactor(frontend): MkRadiosの指定をpropsから行うように (#16597)
* refactor(frontend): MkRadiosの指定をpropsから行うように
* spdx
* fix lint
* fix: mkradiosを動的slotsに対応させる
* fix: remove comment [ci skip]
* fix lint
* fix lint
* migrate
* rename
* fix
* fix
* fix types
* remove unused imports
* fix
* wip
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/pages/channels.vue')
| -rw-r--r-- | packages/frontend/src/pages/channels.vue | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/frontend/src/pages/channels.vue b/packages/frontend/src/pages/channels.vue index f77034e318..26dc5b80df 100644 --- a/packages/frontend/src/pages/channels.vue +++ b/packages/frontend/src/pages/channels.vue @@ -11,9 +11,14 @@ SPDX-License-Identifier: AGPL-3.0-only <MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search"> <template #prefix><i class="ti ti-search"></i></template> </MkInput> - <MkRadios v-model="searchType" @update:modelValue="search()"> - <option value="nameAndDescription">{{ i18n.ts._channel.nameAndDescription }}</option> - <option value="nameOnly">{{ i18n.ts._channel.nameOnly }}</option> + <MkRadios + v-model="searchType" + :options="[ + { value: 'nameAndDescription', label: i18n.ts._channel.nameAndDescription }, + { value: 'nameOnly', label: i18n.ts._channel.nameOnly }, + ]" + @update:modelValue="search()" + > </MkRadios> <MkButton large primary gradate rounded @click="search">{{ i18n.ts.search }}</MkButton> </div> @@ -72,15 +77,17 @@ import { Paginator } from '@/utility/paginator.js'; const router = useRouter(); +type SearchType = 'nameAndDescription' | 'nameOnly'; + const props = defineProps<{ query: string; - type?: string; + type?: SearchType; }>(); const key = ref(''); const tab = ref('featured'); const searchQuery = ref(''); -const searchType = ref('nameAndDescription'); +const searchType = ref<SearchType>('nameAndDescription'); const channelPaginator = shallowRef(); onMounted(() => { |