Files
live-hub-py/web/frontend
yml2213 d3f5198227 style(ui): 账号列表列宽优化 —— 账号列不再吃掉全部剩余空间
截图里的毛病很具体:**「账号」列被撑到 1000+px**,中间空出一大块,
而「状态」列只有 150px,把「检测 2026-10-01 19:07:25」挤成了两行。

根因是我前面把 ID 合并进「账号」列时,顺手把它的 `width` 去掉了 ——
于是它成了唯一的弹性列,把剩余空间全吃了。

修法:
- **账号列定宽 200 + `ellipsis`**,用户名过长就省略(`title` 保留全文)
- **CK 时间改用 `formatTimeShort`**(`10-01 19:07`),状态列加宽到 180,
  一句话能放下,不再折行
- 其余列宽按内容重新配比:绑定 190→150、积分 110→120、标签 170→190、操作 80→90(居中)
- **`tableLayout="fixed"`**:列宽按比例分配、剩余空间**均匀摊开**,
  而不是像 auto 布局那样全塞给内容最宽的那一列 —— 这才不会再出现「一列独大」

顺带清掉因此失效的 `formatTime` 导入(导入时间列上轮已删,它没有其它调用点)。

验证:pytest 500 passed / 6 skipped;ruff 全绿;build 通过、lint 0 errors。
2026-10-04 17:19:09 +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...
    },
  },
])