mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 10:19:06 +01:00
fix: 🐛query search endpoint for local userselect, disregard host
This commit is contained in:
parent
abdf2038d6
commit
3955d8f51b
@ -23,7 +23,7 @@
|
||||
</FormSplit>
|
||||
</div>
|
||||
<div
|
||||
v-if="username != '' || host != ''"
|
||||
v-if="username != ''"
|
||||
class="result"
|
||||
:class="{ hit: users.length > 0 }"
|
||||
>
|
||||
@ -54,7 +54,7 @@
|
||||
<span>{{ i18n.ts.noUsers }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="username == '' && host == ''" class="recent">
|
||||
<div v-if="username == ''" class="recent">
|
||||
<div class="users">
|
||||
<div
|
||||
v-for="user in recentUsers"
|
||||
@ -100,20 +100,19 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
|
||||
let username = $ref("");
|
||||
let host = $ref("");
|
||||
let users: misskey.entities.UserDetailed[] = $ref([]);
|
||||
let recentUsers: misskey.entities.UserDetailed[] = $ref([]);
|
||||
let selected: misskey.entities.UserDetailed | null = $ref(null);
|
||||
let dialogEl = $ref();
|
||||
|
||||
const search = () => {
|
||||
if (username === "" && host === "") {
|
||||
if (username === "") {
|
||||
users = [];
|
||||
return;
|
||||
}
|
||||
os.api("users/search-by-username-and-host", {
|
||||
username: username,
|
||||
host: null,
|
||||
os.api("users/search", {
|
||||
query: username,
|
||||
origin: "local",
|
||||
limit: 10,
|
||||
detail: false,
|
||||
}).then((_users) => {
|
||||
|
Loading…
Reference in New Issue
Block a user