feat: support multi-plan display in admin backend - #10
Open
Fearless743 wants to merge 4 commits into
Open
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动说明
适配多套餐功能,管理后台用户列表展示多套餐信息。
变更内容
类型定义 ()
用户列表 ()
订阅配置 ()
多语言 ( / / / )
兼容性