fix(frontend): ユーザー選択ダイアログで検索結果が表示されない

This commit is contained in:
NoriDev 2023-10-05 21:08:08 +09:00
parent 879f863b58
commit 2282b6a876
2 changed files with 10 additions and 4 deletions

View file

@ -52,6 +52,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
- Fix: 대화 페이지에서 일부 요소가 중복으로 표시될 수 있음
- Fix: 브랜딩에서 적용한 이미지가 대화 페이지에서 반영되지 않음
- Fix: 유저 검색에서 로컬/리모트 설정이 제대로 작동하지 않음
- Fix: 유저 선택 다이얼로그에서 검색 결과가 표시되지 않음
### Server
- Revert: Feat: 이모티콘 중복 체크 (misskey-dev/misskey#11941)

View file

@ -17,17 +17,21 @@ SPDX-License-Identifier: AGPL-3.0-only
<div>
<div :class="$style.form">
<FormSplit :minWidth="170">
<MkInput v-model="username" autofocus @update:modelValue="includeHost ? search : searchLocal">
<MkInput v-if="includeHost" v-model="username" autofocus @update:modelValue="search">
<template #label>{{ i18n.ts.username }}</template>
<template #prefix>@</template>
</MkInput>
<MkInput v-if="includeHost" v-model="host" :datalist="[hostname]" @update:modelValue="includeHost ? search : searchLocal">
<MkInput v-else v-model="username" autofocus @update:modelValue="searchLocal">
<template #label>{{ i18n.ts.username }}</template>
<template #prefix>@</template>
</MkInput>
<MkInput v-if="includeHost" v-model="host" :datalist="[hostname]" @update:modelValue="search">
<template #label>{{ i18n.ts.host }}</template>
<template #prefix>@</template>
</MkInput>
</FormSplit>
</div>
<div v-if="username != '' || (host != '' && includeHost)" :class="[$style.result, { [$style.hit]: users.length > 0 }]">
<div v-if="username != '' || host != ''" :class="[$style.result, { [$style.hit]: users.length > 0 }]">
<div v-if="users.length > 0" :class="$style.users">
<div v-for="user in users" :key="user.id" class="_button" :class="[$style.user, { [$style.selected]: selected && selected.id === user.id }]" @click="selected = user" @dblclick="ok()">
<MkAvatar :user="user" :class="$style.avatar" indicator/>
@ -109,7 +113,8 @@ const searchLocal = () => {
return;
}
os.api('users/search', {
username: username,
query: username,
origin: 'local',
limit: 10,
detail: false,
}).then(_users => {