🎨 chore(web): apply ESLint and Prettier auto-fixes (baseline)
- Ran: bun run eslint:fix && bun run lint:fix - Inserted AGPL license header via eslint-plugin-header - Enforced no-multiple-empty-lines and other lint rules - Formatted code using Prettier v3 (@so1ve/prettier-config) - No functional changes; formatting-only baseline across JS/JSX files
This commit is contained in:
@@ -40,15 +40,17 @@ const InvitationCard = ({
|
||||
handleAffLinkClick,
|
||||
}) => {
|
||||
return (
|
||||
<Card className="!rounded-2xl shadow-sm border-0">
|
||||
<Card className='!rounded-2xl shadow-sm border-0'>
|
||||
{/* 卡片头部 */}
|
||||
<div className="flex items-center mb-4">
|
||||
<Avatar size="small" color="green" className="mr-3 shadow-md">
|
||||
<div className='flex items-center mb-4'>
|
||||
<Avatar size='small' color='green' className='mr-3 shadow-md'>
|
||||
<Gift size={16} />
|
||||
</Avatar>
|
||||
<div>
|
||||
<Typography.Text className="text-lg font-medium">{t('邀请奖励')}</Typography.Text>
|
||||
<div className="text-xs">{t('邀请好友获得额外奖励')}</div>
|
||||
<Typography.Text className='text-lg font-medium'>
|
||||
{t('邀请奖励')}
|
||||
</Typography.Text>
|
||||
<div className='text-xs'>{t('邀请好友获得额外奖励')}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,28 +61,33 @@ const InvitationCard = ({
|
||||
className='!rounded-xl w-full'
|
||||
cover={
|
||||
<div
|
||||
className="relative h-30"
|
||||
className='relative h-30'
|
||||
style={{
|
||||
'--palette-primary-darkerChannel': '0 75 80',
|
||||
backgroundImage: `linear-gradient(0deg, rgba(var(--palette-primary-darkerChannel) / 80%), rgba(var(--palette-primary-darkerChannel) / 80%)), url('/cover-4.webp')`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'center',
|
||||
backgroundRepeat: 'no-repeat'
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}}
|
||||
>
|
||||
{/* 标题和按钮 */}
|
||||
<div className="relative z-10 h-full flex flex-col justify-between p-4">
|
||||
<div className='relative z-10 h-full flex flex-col justify-between p-4'>
|
||||
<div className='flex justify-between items-center'>
|
||||
<Text strong style={{ color: 'white', fontSize: '16px' }}>{t('收益统计')}</Text>
|
||||
<Text strong style={{ color: 'white', fontSize: '16px' }}>
|
||||
{t('收益统计')}
|
||||
</Text>
|
||||
<Button
|
||||
type='primary'
|
||||
theme='solid'
|
||||
size='small'
|
||||
disabled={!userState?.user?.aff_quota || userState?.user?.aff_quota <= 0}
|
||||
disabled={
|
||||
!userState?.user?.aff_quota ||
|
||||
userState?.user?.aff_quota <= 0
|
||||
}
|
||||
onClick={() => setOpenTransfer(true)}
|
||||
className='!rounded-lg'
|
||||
>
|
||||
<Zap size={12} className="mr-1" />
|
||||
<Zap size={12} className='mr-1' />
|
||||
{t('划转到余额')}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -89,34 +96,76 @@ const InvitationCard = ({
|
||||
<div className='grid grid-cols-3 gap-6 mt-4'>
|
||||
{/* 待使用收益 */}
|
||||
<div className='text-center'>
|
||||
<div className='text-base sm:text-2xl font-bold mb-2' style={{ color: 'white' }}>
|
||||
<div
|
||||
className='text-base sm:text-2xl font-bold mb-2'
|
||||
style={{ color: 'white' }}
|
||||
>
|
||||
{renderQuota(userState?.user?.aff_quota || 0)}
|
||||
</div>
|
||||
<div className='flex items-center justify-center text-sm'>
|
||||
<TrendingUp size={14} className="mr-1" style={{ color: 'rgba(255,255,255,0.8)' }} />
|
||||
<Text style={{ color: 'rgba(255,255,255,0.8)', fontSize: '12px' }}>{t('待使用收益')}</Text>
|
||||
<TrendingUp
|
||||
size={14}
|
||||
className='mr-1'
|
||||
style={{ color: 'rgba(255,255,255,0.8)' }}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: 'rgba(255,255,255,0.8)',
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('待使用收益')}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 总收益 */}
|
||||
<div className='text-center'>
|
||||
<div className='text-base sm:text-2xl font-bold mb-2' style={{ color: 'white' }}>
|
||||
<div
|
||||
className='text-base sm:text-2xl font-bold mb-2'
|
||||
style={{ color: 'white' }}
|
||||
>
|
||||
{renderQuota(userState?.user?.aff_history_quota || 0)}
|
||||
</div>
|
||||
<div className='flex items-center justify-center text-sm'>
|
||||
<BarChart2 size={14} className="mr-1" style={{ color: 'rgba(255,255,255,0.8)' }} />
|
||||
<Text style={{ color: 'rgba(255,255,255,0.8)', fontSize: '12px' }}>{t('总收益')}</Text>
|
||||
<BarChart2
|
||||
size={14}
|
||||
className='mr-1'
|
||||
style={{ color: 'rgba(255,255,255,0.8)' }}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: 'rgba(255,255,255,0.8)',
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('总收益')}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 邀请人数 */}
|
||||
<div className='text-center'>
|
||||
<div className='text-base sm:text-2xl font-bold mb-2' style={{ color: 'white' }}>
|
||||
<div
|
||||
className='text-base sm:text-2xl font-bold mb-2'
|
||||
style={{ color: 'white' }}
|
||||
>
|
||||
{userState?.user?.aff_count || 0}
|
||||
</div>
|
||||
<div className='flex items-center justify-center text-sm'>
|
||||
<Users size={14} className="mr-1" style={{ color: 'rgba(255,255,255,0.8)' }} />
|
||||
<Text style={{ color: 'rgba(255,255,255,0.8)', fontSize: '12px' }}>{t('邀请人数')}</Text>
|
||||
<Users
|
||||
size={14}
|
||||
className='mr-1'
|
||||
style={{ color: 'rgba(255,255,255,0.8)' }}
|
||||
/>
|
||||
<Text
|
||||
style={{
|
||||
color: 'rgba(255,255,255,0.8)',
|
||||
fontSize: '12px',
|
||||
}}
|
||||
>
|
||||
{t('邀请人数')}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,11 +196,7 @@ const InvitationCard = ({
|
||||
{/* 奖励说明 */}
|
||||
<Card
|
||||
className='!rounded-xl w-full'
|
||||
title={
|
||||
<Text type='tertiary'>
|
||||
{t('奖励说明')}
|
||||
</Text>
|
||||
}
|
||||
title={<Text type='tertiary'>{t('奖励说明')}</Text>}
|
||||
>
|
||||
<div className='space-y-3'>
|
||||
<div className='flex items-start gap-2'>
|
||||
|
||||
Reference in New Issue
Block a user