mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 23:03:09 +02:00
fix: reversi allowing you to search globally instead of just locally
Misskey used a local option in the select section but os nor userselectdialog supported this.
This commit is contained in:
parent
5f36bb6747
commit
b68c358688
2 changed files with 3 additions and 1 deletions
|
@ -76,6 +76,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
includeSelf?: boolean;
|
includeSelf?: boolean;
|
||||||
|
local?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const username = ref('');
|
const username = ref('');
|
||||||
|
@ -90,6 +91,7 @@ function search() {
|
||||||
users.value = [];
|
users.value = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (props.local) host.value = '.';
|
||||||
misskeyApi('users/search-by-username-and-host', {
|
misskeyApi('users/search-by-username-and-host', {
|
||||||
username: username.value,
|
username: username.value,
|
||||||
host: host.value,
|
host: host.value,
|
||||||
|
|
|
@ -419,7 +419,7 @@ export function form(title, form) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function selectUser(opts: { includeSelf?: boolean } = {}): Promise<Misskey.entities.UserLite> {
|
export async function selectUser(opts: { includeSelf?: boolean, local?: boolean } = {}): Promise<Misskey.entities.UserLite> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {
|
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {
|
||||||
includeSelf: opts.includeSelf,
|
includeSelf: opts.includeSelf,
|
||||||
|
|
Loading…
Reference in a new issue