mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add group member count
This commit is contained in:
10 files changed
+21
-18
No files matched your search
@@ -51,13 +51,16 @@ const page = new NamedPage('domain_group', () => {
|
||||
const gid = ele.getAttribute('data-gid');
|
||||
targets[gid] = input;
|
||||
let loaded = false;
|
||||
const save = _.debounce(() => update(gid, input.value()), 500);
|
||||
input.onChange(() => {
|
||||
if (input.value().length && !loaded) {
|
||||
loaded = true;
|
||||
$(ele).closest('tr').find('.group-member-count').text(`${input.value().length} ${i18n('members')}`);
|
||||
return;
|
||||
}
|
||||
if (!loaded) return;
|
||||
update(gid, input.value());
|
||||
$(ele).closest('tr').find('.group-member-count').text(`${input.value().length} ${i18n('members')}`);
|
||||
save();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user