Files
live-hub-py/web/frontend
yml2213 e24af9ad75 fix(ui): 账号列表按反馈调整 —— 保留批量操作与凭据开关,去掉「分配给」列
上一个提交把四项一起砍了,其中两项理解反了,按反馈改回来:

## 恢复(撤销上一提交的 ① ④)

- **「显示凭据」开关 + 密码/邮箱/邮箱密码三列**
- **「批量打标签」「批量删除」按钮**,以及随之必需的**整套勾选机制**:
  `rowSelection`、`selectedRowKeys`、`selectedAllMatching`、
  「已选择 N 个 / 选择当前筛选下全部」提示条、批量设置标签弹窗、
  `handleBatchTag` / `handleBatchDelete`

## 新增去掉:**「分配给」列**

分配统一走「分配管理」页(`/accounts/assignments`,页面一直在),
列表里的内联分配下拉是重复入口。随之清掉只服务于它的
`handleAssign` / `loadUsers` / `users` 状态 / `userApi` 与 `UserInfo` 导入。

## 保持删除(反馈里未提)

**「标签」列**与**「导入时间」列**仍不恢复。注意因此产生的一处连带:
标签列里的**内联编辑框**也没了 —— 现在改标签的入口是
**批量打标签**(列表)+ **详情页状态卡**(S6 已做),够用。

## 踩到并修掉

用「区间删除」砍 `handleAssign`→`handleDelete` 时,把夹在中间的
**`handleBatchTag` 一起删了**(后来 `handleBatchTag` 引用未定义才暴露)。
已补回。教训:按区间删代码前要先确认区间里没有别的东西 ——
这类错误 `tsc` 只在**引用处**报,很容易看漏。

## 最终形态

- 列:账号 / 状态 / 绑定 / 积分·鱼翅 /(凭据三列,开关控制)/ 操作
- 工具栏:筛选(标签 · CK · 绑定 · 搜索)+ 显示凭据 + 批量打标签 + 批量删除 + 批量导入
- 618 行;`TAG_COLORS` / `tagColorMap` / `handleSetTag`(单条改标签)
  等确认无用的死代码已清

## 验证

- `TZ=Asia/Shanghai`:500 passed / 6 skipped;ruff 全绿
- 前端 build 通过、`npm run lint` **0 errors**
2026-10-04 17:10:17 +08:00
..
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-07-05 12:25:18 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])