mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: add group member count
This commit is contained in:
10 files changed
+21
-18
No files matched your search
@@ -5,16 +5,16 @@
|
||||
"main": "base.mjs",
|
||||
"repository": "https://github.com/hydro-dev/Hydro",
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config": "^8.0.0",
|
||||
"@antfu/eslint-config": "^8.2.0",
|
||||
"@eslint-react/eslint-plugin": "^4.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
||||
"@typescript-eslint/parser": "^8.58.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
||||
"@typescript-eslint/parser": "^8.58.2",
|
||||
"eslint-plugin-de-morgan": "^2.1.1",
|
||||
"eslint-plugin-github": "^6.0.0",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-hooks": "^7.1.0",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"globals": "^17.4.0"
|
||||
"globals": "^17.5.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">= 9"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@koa/router": "^15.4.0",
|
||||
"@mongodb-js/saslprep": "^1.4.6",
|
||||
"@mongodb-js/saslprep": "^1.4.8",
|
||||
"emoji-regex": "^10.6.0",
|
||||
"fs-extra": "^11.3.4",
|
||||
"koa": "^3.2.0",
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
"@hydrooj/common": "workspace:^",
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.214.0",
|
||||
"@opentelemetry/sdk-node": "^0.214.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.215.0",
|
||||
"@opentelemetry/sdk-node": "^0.215.0",
|
||||
"@zip.js/zip.js": "^2.8.26",
|
||||
"cac": "^7.0.0",
|
||||
"p-queue": "^9.1.1",
|
||||
"p-queue": "^9.1.2",
|
||||
"schemastery": "^3.18.0",
|
||||
"semver": "^7.7.4",
|
||||
"shell-quote": "^1.8.3",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"@zip.js/zip.js": "^2.8.26",
|
||||
"adm-zip": "0.5.16",
|
||||
"cac": "^7.0.0",
|
||||
"cordis": "4.0.0-rc.2",
|
||||
"cordis": "4.0.0-rc.3",
|
||||
"csv-stringify": "^6.7.0",
|
||||
"emoji-regex": "^10.6.0",
|
||||
"emojis-list": "2.1.0",
|
||||
|
||||
@@ -41,7 +41,7 @@ function initTimePicker(input: HTMLInputElement) {
|
||||
}).on('mousedown', (e) => {
|
||||
e.preventDefault();
|
||||
$input.val(time).trigger('change');
|
||||
closeDropdown();
|
||||
closeDropdown(); // eslint-disable-line no-use-before-define
|
||||
}).on('mouseenter', function () {
|
||||
$(this).css('background', 'var(--highlight-color, #e8f0fe)');
|
||||
}).on('mouseleave', function () {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"clipboard": "^2.0.11",
|
||||
"copy-webpack-plugin": "^14.0.0",
|
||||
"cordis": "4.0.0-rc.2",
|
||||
"cordis": "4.0.0-rc.3",
|
||||
"core-js": "^3.49.0",
|
||||
"core-js-compat": "^3.49.0",
|
||||
"css-loader": "^7.1.4",
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<input type="checkbox" data-checkbox-group="group" data-checkbox-range>
|
||||
</label>
|
||||
</td>
|
||||
<td class="col--group">{{ gdoc.name }}</td>
|
||||
<td class="col--group">{{ gdoc.name }}<br><small class="supplementary group-member-count">{{ gdoc.uids.length }} {{ _('members') }}</small></td>
|
||||
<td class="col--user"><input type="text" value="{{ gdoc.uids.join(',') }}" data-gid="{{ gdoc.name }}"></input></td>
|
||||
</tr>
|
||||
{%- endfor -%}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4"
|
||||
"react": "^19.2.5",
|
||||
"react-dom": "^19.2.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react-swc": "^4.3.0",
|
||||
"vite": "^8.0.3"
|
||||
"vite": "^8.0.8"
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
"preferUnplugged": true,
|
||||
"dependencies": {
|
||||
"@hydrooj/utils": "workspace:^",
|
||||
"jsdom": "^29.0.1",
|
||||
"jsdom": "^29.0.2",
|
||||
"superagent-charset": "^1.2.0",
|
||||
"superagent-proxy": "^3.0.0"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user