mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-07 01:56:53 +00:00
style(ui): align wallet and profile interactions
This commit is contained in:
@@ -44,7 +44,7 @@ export function AffiliateRewardsCard({
|
||||
const { t } = useTranslation()
|
||||
if (loading) {
|
||||
return (
|
||||
<Card className='bg-muted/20 py-0'>
|
||||
<Card data-card-hover='false' className='bg-muted/20 py-0'>
|
||||
<CardContent className='grid gap-4 p-3 sm:p-4 lg:grid-cols-[minmax(220px,1fr)_minmax(220px,0.72fr)_minmax(320px,1.15fr)] lg:items-center'>
|
||||
<div>
|
||||
<Skeleton className='h-5 w-32' />
|
||||
@@ -60,7 +60,7 @@ export function AffiliateRewardsCard({
|
||||
const hasRewards = (user?.aff_quota ?? 0) > 0
|
||||
|
||||
return (
|
||||
<Card className='bg-muted/20 py-0'>
|
||||
<Card data-card-hover='false' className='bg-muted/20 py-0'>
|
||||
<CardContent className='grid gap-3 p-3 sm:gap-4 sm:p-4 lg:grid-cols-[minmax(200px,1fr)_minmax(180px,0.65fr)_minmax(280px,1fr)] lg:items-center'>
|
||||
<div className='flex min-w-0 items-center gap-2.5'>
|
||||
<div className='bg-background flex size-8 shrink-0 items-center justify-center rounded-lg border'>
|
||||
|
||||
@@ -55,7 +55,8 @@ export function CreemProductsSection({
|
||||
{products.map((product) => (
|
||||
<Card
|
||||
key={product.productId}
|
||||
className='hover:border-foreground/50 cursor-pointer transition-all hover:shadow-md'
|
||||
data-card-hover='false'
|
||||
className='cursor-pointer'
|
||||
onClick={() => onProductSelect(product)}
|
||||
>
|
||||
<CardContent className='p-3 text-center sm:p-4'>
|
||||
@@ -63,7 +64,7 @@ export function CreemProductsSection({
|
||||
<div className='text-muted-foreground mb-2 text-sm'>
|
||||
{t('Quota')}: {formatNumber(product.quota)}
|
||||
</div>
|
||||
<div className='text-lg font-semibold text-indigo-600'>
|
||||
<div className='text-primary text-lg font-semibold'>
|
||||
{formatCreemPrice(product.price, product.currency)}
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
+1
-1
@@ -183,7 +183,7 @@ export function BillingHistoryDialog({
|
||||
return (
|
||||
<div
|
||||
key={record.id}
|
||||
className='hover:bg-muted/50 rounded-lg border p-3 transition-colors sm:p-4'
|
||||
className='rounded-lg border p-3 sm:p-4'
|
||||
>
|
||||
{/* Header Row */}
|
||||
<div className='flex items-start justify-between gap-2'>
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ export function CreemConfirmDialog({
|
||||
</div>
|
||||
<div className='flex items-center justify-between'>
|
||||
<span className='text-muted-foreground'>{t('Price')}</span>
|
||||
<span className='font-medium text-indigo-600'>
|
||||
<span className='text-primary font-medium'>
|
||||
{formatCreemPrice(product.price, product.currency)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -139,7 +139,7 @@ export function RechargeFormCard({
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Card className='gap-0 overflow-hidden py-0'>
|
||||
<Card data-card-hover='false' className='gap-0 overflow-hidden py-0'>
|
||||
<CardHeader className='border-b p-3 !pb-3 sm:p-5 sm:!pb-5'>
|
||||
<Skeleton className='h-6 w-32' />
|
||||
<Skeleton className='mt-2 h-4 w-48' />
|
||||
@@ -191,6 +191,7 @@ export function RechargeFormCard({
|
||||
title={t('Add Funds')}
|
||||
description={t('Choose an amount and payment method')}
|
||||
icon={<WalletCards className='h-4 w-4' />}
|
||||
disableHoverEffect
|
||||
action={
|
||||
onOpenBilling ? (
|
||||
<Button
|
||||
@@ -238,7 +239,7 @@ export function RechargeFormCard({
|
||||
key={index}
|
||||
variant='outline'
|
||||
className={cn(
|
||||
'hover:border-foreground flex min-h-16 flex-col items-start rounded-lg px-3 py-2.5 text-left whitespace-normal sm:min-h-[72px] sm:p-4',
|
||||
'flex min-h-16 flex-col items-start rounded-lg px-3 py-2.5 text-left whitespace-normal sm:min-h-[72px] sm:p-4',
|
||||
selectedPreset === preset.value
|
||||
? 'border-foreground bg-foreground/5 dark:border-foreground dark:bg-foreground/10'
|
||||
: 'border-muted'
|
||||
|
||||
@@ -235,7 +235,7 @@ export function SubscriptionPlansCard({
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Card className='gap-0 overflow-hidden py-0'>
|
||||
<Card data-card-hover='false' className='gap-0 overflow-hidden py-0'>
|
||||
<CardHeader className='border-b p-3 !pb-3 sm:p-5 sm:!pb-5'>
|
||||
<Skeleton className='h-6 w-32' />
|
||||
</CardHeader>
|
||||
@@ -261,6 +261,7 @@ export function SubscriptionPlansCard({
|
||||
title={t('Subscription Plans')}
|
||||
description={t('Subscribe to a plan for model access')}
|
||||
icon={<Crown className='h-4 w-4' />}
|
||||
disableHoverEffect
|
||||
contentClassName='space-y-4 sm:space-y-5'
|
||||
>
|
||||
{/* My subscriptions & billing preference */}
|
||||
@@ -539,10 +540,8 @@ export function SubscriptionPlansCard({
|
||||
return (
|
||||
<Card
|
||||
key={plan.id}
|
||||
className={cn(
|
||||
'transition-shadow hover:shadow-md',
|
||||
isPopular && 'border-primary/70 shadow-sm'
|
||||
)}
|
||||
data-card-hover='false'
|
||||
className={cn(isPopular && 'border-primary/70 shadow-sm')}
|
||||
>
|
||||
<CardContent className='flex h-full flex-col p-3.5 sm:p-4'>
|
||||
<div className='mb-2 flex items-start justify-between gap-3'>
|
||||
|
||||
Reference in New Issue
Block a user