- 新增家庭共享订阅管理 - 新增用户邀请统计 - 新增签名和订阅模式设置表单 - 更新 API 服务层和国际化文件 - UI 组件优化(enhanced-input、pro-table)
This commit is contained in:
@@ -36,6 +36,7 @@ const inviteSchema = z.object({
|
||||
forced_invite: z.boolean().optional(),
|
||||
referral_percentage: z.number().optional(),
|
||||
only_first_purchase: z.boolean().optional(),
|
||||
gift_days: z.number().optional(),
|
||||
});
|
||||
|
||||
type InviteFormData = z.infer<typeof inviteSchema>;
|
||||
@@ -60,6 +61,7 @@ export default function InviteConfig() {
|
||||
forced_invite: false,
|
||||
referral_percentage: 0,
|
||||
only_first_purchase: false,
|
||||
gift_days: 0,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -185,6 +187,38 @@ export default function InviteConfig() {
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="gift_days"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
{t("invite.giftDays", "Invite Gift Days")}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<EnhancedInput
|
||||
min={0}
|
||||
onValueBlur={(value) => field.onChange(Number(value))}
|
||||
placeholder={t(
|
||||
"invite.giftDaysPlaceholder",
|
||||
"Enter days"
|
||||
)}
|
||||
suffix={t("invite.giftDaysSuffix", "day(s)")}
|
||||
type="number"
|
||||
value={field.value}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
{t(
|
||||
"invite.giftDaysDescription",
|
||||
"When referral percentage is 0, both the inviter and invitee receive extra subscription days after a purchase"
|
||||
)}
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="only_first_purchase"
|
||||
|
||||
Reference in New Issue
Block a user