Skip to content

feat: support multi-plan display in admin backend - #10

Open
Fearless743 wants to merge 4 commits into
mainfrom
agent/mika/01a03a4c
Open

feat: support multi-plan display in admin backend#10
Fearless743 wants to merge 4 commits into
mainfrom
agent/mika/01a03a4c

Conversation

@Fearless743

Copy link
Copy Markdown
Owner

改动说明

适配多套餐功能,管理后台用户列表展示多套餐信息。

变更内容

  1. 类型定义 ()

    • 新增 字段,含 plan id/name/expired_at/speed_limit
  2. 用户列表 ()

    • 订阅列优先读取 ,支持多套餐平铺显示(多个 Badge)
    • 窄屏手机视图同步渲染所有套餐标签
    • 列头文案改为「套餐列表 / Plans」,宽度从 120px 调整为 140px
  3. 订阅配置 ()

    • 新增 开关(多套餐模式开关)
  4. 多语言 ( / / / )

    • 新增 文案
    • 新增 列头文案

兼容性

  • 关闭时后端不返回 ,前端自动回退到 旧逻辑,完全向后兼容

Fearless and others added 4 commits August 25, 2026 19:05
- Add plan_list field to UserListItem type
- User list table shows multiple plan badges when multi-plan is active
- Column header renamed to 套餐列表 / Plans
- Narrow-screen mobile view also renders all plan badges
- Add multi_plan_enable switch to subscribe settings section
- Add i18n keys for multi_plan_enable and plan_list column (zh-CN/zh-TW/en-US/ru-RU)

Co-authored-by: multica-agent <github@multica.ai>
- Add updateUserPlans API endpoint to backend (UserController)
- Register new route /user/updateUserPlans in AdminRoute.php
- Update UserEditDialog to show plan list when multi-plan is active
- Allow adding/removing/editing plan entries with plan, expiry, speed limit
- Add i18n keys for multi-plan UI (zh-CN, en-US)
- Preserve backward compatibility for single-plan mode

Co-authored-by: multica-agent <github@multica.ai>
- Remove unused multiPlanMode state
- isMultiPlanEnabled now directly checks planList.length > 0
- Fixes potential stale closure issue in onSubmit

Co-authored-by: multica-agent <github@multica.ai>
- 添加 PlanFormState 接口用于表单内部状态(expired_at 用 string)
- planList state 类型改为 PlanFormState[]
- updatePlan 泛型参数改为 keyof PlanFormState

Co-authored-by: multica-agent <github@multica.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant