fix: MkUserSelectDialog/search-by-username-and-hostでローカルユーザーを絞って検索できない問題を修正 (#9943)
* fix: MkUserSelectDialog/search-by-username-and-hostでローカルユーザーを絞って検索できない問題を修正 Fix #9627 * update CHANGELOG.md * clean up * search-by-username-and-host大改造
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<template #label>{{ i18n.ts.username }}</template>
|
||||
<template #prefix>@</template>
|
||||
</MkInput>
|
||||
<MkInput v-model="host" @update:model-value="search">
|
||||
<MkInput v-model="host" @update:model-value="search" :datalist="[hostname]">
|
||||
<template #label>{{ i18n.ts.host }}</template>
|
||||
<template #prefix>@</template>
|
||||
</MkInput>
|
||||
@@ -61,6 +61,7 @@ import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
import { i18n } from '@/i18n';
|
||||
import { $i } from '@/account';
|
||||
import { hostname } from '@/config';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'ok', selected: misskey.entities.UserDetailed): void;
|
||||
@@ -115,7 +116,7 @@ onMounted(() => {
|
||||
os.api('users/show', {
|
||||
userIds: defaultStore.state.recentlyUsedUsers,
|
||||
}).then(users => {
|
||||
if (props.includeSelf) {
|
||||
if (props.includeSelf && users.find(x => $i ? x.id === $i.id : true) == null) {
|
||||
recentUsers = [$i, ...users];
|
||||
} else {
|
||||
recentUsers = users;
|
||||
|
Reference in New Issue
Block a user