feat(agents, validation): enhance agent profile and player management with input validation

Added input validation for admin login and player creation forms, ensuring usernames and passwords meet specified criteria. Introduced new components for numeric input handling in agent profile fields, improving user experience. Updated agent line detail and provision wizard to reflect these changes, enhancing overall data integrity and user interaction.
This commit is contained in:
2026-06-14 21:13:21 +08:00
parent 6ea0a6feec
commit 4fe206cb10
14 changed files with 1299 additions and 504 deletions

View File

@@ -29,7 +29,13 @@ This version has breaking changes — APIs, conventions, and file structure may
新增涉及玩家资金的页面时,先读 `src/lib/admin-player-display.ts`
## Learned User Preferences
- 占成/授信/回水/上限等数值字段用 `AdminNumericStepper`(± 步进 + 可手输),勿单独裸 `input[type=number]`
## Learned Workspace Facts
- 无接入站时依赖站点的页面展示 `<AdminNoIntegrationSiteState />`;仅 `profile.is_super_admin` 显示创建入口。
- 超管判定用登录态 `is_super_admin`,勿用站点角色或 `admin_user_site_roles` 绑定推断。
- 站点管理员(`profile.site != null`)代理 UI 绕过选中代理的 `can_create_*` 门控,按自身 manage 权限展示 Tab/操作。
- 站点管理员在代理下创建玩家须传 `agent_node_id`(与超管同逻辑),勿默认挂根代理。