mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: support search by displayname (#621)
This commit is contained in:
1 parent
28a32869e2
commit
ced52792be
3 files changed
+6
-3
No files matched your search
@@ -36,8 +36,9 @@ function searchUser() {
|
||||
$('.enroll_user_menu_item').each((i, e) => {
|
||||
const $item = $(e);
|
||||
const $username = $item.data('uname').toString().toLowerCase();
|
||||
const $displayName = $item.data('displayname')?.toString().toLowerCase();
|
||||
const $uid = $item.data('uid').toString();
|
||||
$item.toggle(($username.includes(val) && (group === 'all' || group.split(',').includes($uid))) || $uid === val);
|
||||
$item.toggle((($displayName?.includes(val) || $username.includes(val)) && (group === 'all' || group.split(',').includes($uid))) || $uid === val);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user