feat: 修改代码结构

This commit is contained in:
2025-08-15 03:22:14 -07:00
parent 77e246198f
commit 5524d25d9a
24 changed files with 128 additions and 77 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Default Language
NEXT_PUBLIC_DEFAULT_LANGUAGE=en-US
NEXT_PUBLIC_DEFAULT_LANGUAGE=zh-CN
# Site URL and API URL
NEXT_PUBLIC_SITE_URL=https://admin.ppanel.dev
@@ -62,20 +62,52 @@ export function Invite() {
</TableRow>
<TableRow>
<TableCell>
<Label>{t('inviteCommissionPercentage')}</Label>
<p className='text-muted-foreground text-xs'>
{t('inviteCommissionPercentageDescription')}
</p>
<Label></Label>
<p className='text-muted-foreground text-xs'></p>
</TableCell>
<TableCell className='text-right'>
<EnhancedInput
placeholder={t('inputPlaceholder')}
value={data?.referral_percentage}
value={data?.first_yearly_purchase_percentage}
type='number'
min={0}
max={100}
suffix='%'
onValueBlur={(value) => updateConfig('referral_percentage', value)}
onValueBlur={(value) => updateConfig('first_yearly_purchase_percentage', value)}
/>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Label></Label>
<p className='text-muted-foreground text-xs'></p>
</TableCell>
<TableCell className='text-right'>
<EnhancedInput
placeholder={t('inputPlaceholder')}
value={data?.first_purchase_percentage}
type='number'
min={0}
max={100}
suffix='%'
onValueBlur={(value) => updateConfig('first_purchase_percentage', value)}
/>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Label></Label>
<p className='text-muted-foreground text-xs'></p>
</TableCell>
<TableCell className='text-right'>
<EnhancedInput
placeholder={t('inputPlaceholder')}
value={data?.non_first_purchase_percentage}
type='number'
min={0}
max={100}
suffix='%'
onValueBlur={(value) => updateConfig('non_first_purchase_percentage', value)}
/>
</TableCell>
</TableRow>
@@ -656,9 +656,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
{
name: 'discount',
type: 'number',
min: 0.01,
max: 100,
step: 0.01,
placeholder: t('form.discountPercent'),
suffix: '%',
},