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:
Marie 2024-01-25 14:11:41 +01:00
parent 5f36bb6747
commit b68c358688
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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,