Skip to content

Commit

Permalink
fix(frontend): ユーザー選択ダイアログで検索結果が表示されない
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Oct 5, 2023
1 parent 879f863 commit 2282b6a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
- Fix: 대화 페이지에서 일부 요소가 중복으로 표시될 수 있음
- Fix: 브랜딩에서 적용한 이미지가 대화 페이지에서 반영되지 않음
- Fix: 유저 검색에서 로컬/리모트 설정이 제대로 작동하지 않음
- Fix: 유저 선택 다이얼로그에서 검색 결과가 표시되지 않음

### Server
- Revert: Feat: 이모티콘 중복 체크 (misskey-dev/misskey#11941)
Expand Down
13 changes: 9 additions & 4 deletions packages/frontend/src/components/MkUserSelectDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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/>
Expand Down Expand Up @@ -109,7 +113,8 @@ const searchLocal = () => {
return;
}
os.api('users/search', {
username: username,
query: username,
origin: 'local',
limit: 10,
detail: false,
}).then(_users => {
Expand Down

0 comments on commit 2282b6a

Please sign in to comment.