diff --git a/docs/screenshots/admin-users-batch-ui.png b/docs/screenshots/admin-users-batch-ui.png new file mode 100644 index 0000000..6d68eb5 Binary files /dev/null and b/docs/screenshots/admin-users-batch-ui.png differ diff --git a/source/www/admin.html b/source/www/admin.html index 9d5054d..5ea6605 100644 --- a/source/www/admin.html +++ b/source/www/admin.html @@ -97,6 +97,29 @@ tbody tr:hover{background:#fafbfd} .empty{text-align:center;color:var(--muted);padding:34px 0 !important;font-size:13px} + /* ---------- 筛选 / 批量操作条 ---------- */ + /* 两条工具条和表格同属一个面板:用更浅的底色 + 内缩把它们跟表格区分开, + 但不用边框——面板里再套边框会显得很碎 */ + .toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center; + background:#f8fafc;border:1px solid var(--border);border-radius:var(--radius); + padding:10px 12px;margin-bottom:10px} + .toolbar .grow{flex:1;min-width:180px} + .toolbar input[type=text],.toolbar select{width:auto;min-width:120px;padding:6px 9px;font-size:12.5px} + .toolbar .grow input[type=text]{width:100%} + .toolbar .sep{width:1px;height:22px;background:var(--border);margin:0 2px} + .toolbar .checkbox{padding-bottom:0;font-size:12.5px} + .toolbar .hint{color:var(--muted);font-size:12.5px} + + /* 行内编辑:单元格里的小输入框,Enter 保存 / Esc 取消 */ + .inline-edit{display:flex;gap:6px;align-items:center} + .inline-edit input{padding:4px 8px;font-size:12.5px;min-width:110px;width:auto;flex:1} + .edit-trigger{cursor:pointer;border-bottom:1px dashed var(--border-strong);padding-bottom:1px} + .edit-trigger:hover{border-bottom-color:var(--accent);color:var(--accent)} + td.col-chk,th.col-chk{width:34px;padding-right:0} + td.col-chk input,th.col-chk input{width:15px;height:15px;accent-color:var(--accent);cursor:pointer} + tr.row-locked{background:#fff8f8} + tr.row-locked:hover{background:#fff2f2} + .badge{display:inline-block;padding:2px 8px;border-radius:20px;font-size:12px;line-height:18px;white-space:nowrap} .b-ok{background:var(--ok-bg);color:var(--ok-fg)} .b-warn{background:var(--warn-bg);color:var(--warn-fg)} @@ -213,12 +236,46 @@
/api/admin/users/profile 与
- /api/admin/users/role 直接改(见 docs/roadmap.md)。X-Auth-*,是下游系统授权的依据:
+ 点表格里的部门与用户组可就地编辑;勾选多个账号后用下面的批量条一次改完。
+ API Key 完整值在创建时展示一次;此处可复制或重置。| 账号 | 角色 | 部门 | 用户组 | 邮箱 | API Key | 操作 | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| 还没有账号 | ||||||||||
| ' + + (state.users.length ? "没有符合条件的账号" : "还没有账号") + " | ||||||||||
| " + " | " + esc(u.name || u.username) + "" +
- " @" + esc(u.username) + " · " + esc(u.created_at_text) + " | " +
- "" + (u.is_admin - ? "管理员" - : "普通") + " | " + - "" + (u.department ? esc(u.department) : "-") + " | " + - "" + groupsCell(u) + " | " + + "" + + " | " + + (u.department ? esc(u.department) : "点此设置") + " | " + + "" + groupsCell(u) + + " | " + "" + (u.email ? esc(u.email) : "-") + " | " + "" + esc(u.api_key_masked) + "" +
"" +
@@ -515,10 +651,52 @@ export OAUTH_ISSUER=https://sso.example.com
" | " +
"" +
"" +
"" +
+ (u.locked ? "" : "") +
"" +
" |