enhance(client): improve usability of user select

This commit is contained in:
syuilo
2023-01-16 05:29:44 +09:00
parent f3c5ca6cf4
commit fbfe42d6f0
3 changed files with 17 additions and 4 deletions

View File

@@ -322,9 +322,11 @@ export function form(title, form) {
});
}
export async function selectUser() {
export async function selectUser(opts: { includeSelf?: boolean } = {}) {
return new Promise((resolve, reject) => {
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {}, {
popup(defineAsyncComponent(() => import('@/components/MkUserSelectDialog.vue')), {
includeSelf: opts.includeSelf,
}, {
ok: user => {
resolve(user);
},