mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: improve light theme visibility for dashboard and subscription cards
- Increase card opacity and shadow contrast in glassTheme for light mode - Add accent-tinted borders and shadows to subscription cards (active, expired, trial) - Fix grid patterns to use dark lines instead of white in light mode - Fix trial CTA button: solid green with dark text instead of invisible transparent - Fix trial icon background: light accent gradient instead of hardcoded dark - Add + prefix to referral earnings in StatsGrid
This commit is contained in:
@@ -83,7 +83,7 @@ export default function StatsGrid({
|
|||||||
label: t('dashboard.stats.referrals'),
|
label: t('dashboard.stats.referrals'),
|
||||||
value: `${referralCount}`,
|
value: `${referralCount}`,
|
||||||
valueColor: g.text,
|
valueColor: g.text,
|
||||||
subtitle: `${formatAmount(earningsRubles)} ${currencySymbol}`,
|
subtitle: `+${formatAmount(earningsRubles)} ${currencySymbol}`,
|
||||||
subtitleColor: zone.mainHex,
|
subtitleColor: zone.mainHex,
|
||||||
to: '/referral',
|
to: '/referral',
|
||||||
icon: (color: string) => (
|
icon: (color: string) => (
|
||||||
|
|||||||
@@ -73,9 +73,11 @@ export default function SubscriptionCardActive({
|
|||||||
background: g.cardBg,
|
background: g.cardBg,
|
||||||
border: subscription.is_trial
|
border: subscription.is_trial
|
||||||
? '1px solid rgba(62,219,176,0.15)'
|
? '1px solid rgba(62,219,176,0.15)'
|
||||||
: `1px solid ${g.cardBorder}`,
|
: isDark
|
||||||
|
? `1px solid ${g.cardBorder}`
|
||||||
|
: `1px solid ${zone.mainHex}25`,
|
||||||
padding: '28px 28px 24px',
|
padding: '28px 28px 24px',
|
||||||
boxShadow: g.shadow,
|
boxShadow: isDark ? g.shadow : `0 2px 16px ${zone.mainHex}12, 0 0 0 1px ${zone.mainHex}08`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Trial shimmer border */}
|
{/* Trial shimmer border */}
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ export default function SubscriptionCardExpired({ subscription }: SubscriptionCa
|
|||||||
className="relative overflow-hidden rounded-3xl"
|
className="relative overflow-hidden rounded-3xl"
|
||||||
style={{
|
style={{
|
||||||
background: g.cardBg,
|
background: g.cardBg,
|
||||||
border: '1px solid rgba(255,70,70,0.12)',
|
border: isDark ? '1px solid rgba(255,70,70,0.12)' : '1px solid rgba(255,59,92,0.2)',
|
||||||
boxShadow: g.shadow,
|
boxShadow: isDark
|
||||||
|
? g.shadow
|
||||||
|
: '0 2px 16px rgba(255,59,92,0.1), 0 0 0 1px rgba(255,59,92,0.06)',
|
||||||
padding: '28px 28px 24px',
|
padding: '28px 28px 24px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -40,10 +42,14 @@ export default function SubscriptionCardExpired({ subscription }: SubscriptionCa
|
|||||||
/>
|
/>
|
||||||
{/* Grid pattern */}
|
{/* Grid pattern */}
|
||||||
<div
|
<div
|
||||||
className="pointer-events-none absolute inset-0 opacity-[0.02]"
|
className="pointer-events-none absolute inset-0"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
|
opacity: isDark ? 0.02 : 0.04,
|
||||||
linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`,
|
backgroundImage: isDark
|
||||||
|
? `linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`
|
||||||
|
: `linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px)`,
|
||||||
backgroundSize: '40px 40px',
|
backgroundSize: '40px 40px',
|
||||||
}}
|
}}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
|||||||
@@ -33,8 +33,16 @@ export default function TrialOfferCard({
|
|||||||
className="relative overflow-hidden rounded-3xl text-center"
|
className="relative overflow-hidden rounded-3xl text-center"
|
||||||
style={{
|
style={{
|
||||||
background: g.cardBg,
|
background: g.cardBg,
|
||||||
border: `1px solid ${g.cardBorder}`,
|
border: isDark
|
||||||
boxShadow: g.shadow,
|
? `1px solid ${g.cardBorder}`
|
||||||
|
: isFree
|
||||||
|
? '1px solid rgba(62,219,176,0.2)'
|
||||||
|
: '1px solid rgba(255,184,0,0.2)',
|
||||||
|
boxShadow: isDark
|
||||||
|
? g.shadow
|
||||||
|
: isFree
|
||||||
|
? '0 2px 16px rgba(62,219,176,0.12), 0 0 0 1px rgba(62,219,176,0.06)'
|
||||||
|
: '0 2px 16px rgba(255,184,0,0.12), 0 0 0 1px rgba(255,184,0,0.06)',
|
||||||
padding: '32px 28px 28px',
|
padding: '32px 28px 28px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -55,10 +63,14 @@ export default function TrialOfferCard({
|
|||||||
/>
|
/>
|
||||||
{/* Grid pattern */}
|
{/* Grid pattern */}
|
||||||
<div
|
<div
|
||||||
className="pointer-events-none absolute inset-0 opacity-[0.025]"
|
className="pointer-events-none absolute inset-0"
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
|
opacity: isDark ? 0.025 : 0.04,
|
||||||
linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`,
|
backgroundImage: isDark
|
||||||
|
? `linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`
|
||||||
|
: `linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px)`,
|
||||||
backgroundSize: '40px 40px',
|
backgroundSize: '40px 40px',
|
||||||
}}
|
}}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@@ -68,10 +80,14 @@ export default function TrialOfferCard({
|
|||||||
<div
|
<div
|
||||||
className="relative mx-auto mb-5 flex h-14 w-14 items-center justify-center rounded-2xl"
|
className="relative mx-auto mb-5 flex h-14 w-14 items-center justify-center rounded-2xl"
|
||||||
style={{
|
style={{
|
||||||
background: isFree
|
background: isDark
|
||||||
? 'linear-gradient(135deg, #1a3a30, #142824)'
|
? isFree
|
||||||
: 'linear-gradient(135deg, #3a3020, #282418)',
|
? 'linear-gradient(135deg, #1a3a30, #142824)'
|
||||||
border: isFree ? '1px solid rgba(62,219,176,0.2)' : '1px solid rgba(255,184,0,0.2)',
|
: 'linear-gradient(135deg, #3a3020, #282418)'
|
||||||
|
: isFree
|
||||||
|
? 'linear-gradient(135deg, rgba(62,219,176,0.15), rgba(62,219,176,0.08))'
|
||||||
|
: 'linear-gradient(135deg, rgba(255,184,0,0.15), rgba(255,184,0,0.08))',
|
||||||
|
border: isFree ? '1px solid rgba(62,219,176,0.25)' : '1px solid rgba(255,184,0,0.25)',
|
||||||
transition: 'all 0.5s ease',
|
transition: 'all 0.5s ease',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -229,12 +245,21 @@ export default function TrialOfferCard({
|
|||||||
<button
|
<button
|
||||||
onClick={() => !activateTrialMutation.isPending && activateTrialMutation.mutate()}
|
onClick={() => !activateTrialMutation.isPending && activateTrialMutation.mutate()}
|
||||||
disabled={activateTrialMutation.isPending}
|
disabled={activateTrialMutation.isPending}
|
||||||
className="w-full rounded-[14px] py-4 text-base font-bold tracking-tight text-white transition-all duration-300 disabled:opacity-50"
|
className="w-full rounded-[14px] py-4 text-base font-bold tracking-tight transition-all duration-300 disabled:opacity-50"
|
||||||
style={{
|
style={
|
||||||
background:
|
isDark
|
||||||
'linear-gradient(135deg, rgba(62,219,176,0.12) 0%, rgba(62,219,176,0.04) 100%)',
|
? {
|
||||||
border: '1px solid rgba(62,219,176,0.25)',
|
background:
|
||||||
}}
|
'linear-gradient(135deg, rgba(62,219,176,0.12) 0%, rgba(62,219,176,0.04) 100%)',
|
||||||
|
border: '1px solid rgba(62,219,176,0.25)',
|
||||||
|
color: '#fff',
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
background: 'linear-gradient(135deg, #3EDBB0, #2BC49A)',
|
||||||
|
color: '#0a2a1e',
|
||||||
|
boxShadow: '0 4px 20px rgba(62,219,176,0.25)',
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{activateTrialMutation.isPending ? t('common.loading') : t('subscription.trial.activate')}
|
{activateTrialMutation.isPending ? t('common.loading') : t('subscription.trial.activate')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -447,8 +447,12 @@ export default function Subscription() {
|
|||||||
background: g.cardBg,
|
background: g.cardBg,
|
||||||
border: subscription.is_trial
|
border: subscription.is_trial
|
||||||
? '1px solid rgba(62,219,176,0.15)'
|
? '1px solid rgba(62,219,176,0.15)'
|
||||||
: `1px solid ${g.cardBorder}`,
|
: isDark
|
||||||
boxShadow: g.shadow,
|
? `1px solid ${g.cardBorder}`
|
||||||
|
: `1px solid ${zone.mainHex}25`,
|
||||||
|
boxShadow: isDark
|
||||||
|
? g.shadow
|
||||||
|
: `0 2px 16px ${zone.mainHex}12, 0 0 0 1px ${zone.mainHex}08`,
|
||||||
padding: '28px 28px 24px',
|
padding: '28px 28px 24px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export function getGlassColors(isDark: boolean) {
|
|||||||
// Card container
|
// Card container
|
||||||
cardBg: isDark
|
cardBg: isDark
|
||||||
? 'linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)'
|
? 'linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%)'
|
||||||
: 'linear-gradient(145deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.6) 100%)',
|
: 'linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.88) 100%)',
|
||||||
cardBorder: isDark ? 'rgba(255,255,255,0.07)' : 'rgba(0,0,0,0.08)',
|
cardBorder: isDark ? 'rgba(255,255,255,0.07)' : 'rgba(0,0,0,0.1)',
|
||||||
|
|
||||||
// Inner sections (cards within cards)
|
// Inner sections (cards within cards)
|
||||||
innerBg: isDark ? 'rgba(255,255,255,0.03)' : 'rgba(0,0,0,0.03)',
|
innerBg: isDark ? 'rgba(255,255,255,0.03)' : 'rgba(0,0,0,0.03)',
|
||||||
@@ -38,6 +38,6 @@ export function getGlassColors(isDark: boolean) {
|
|||||||
glowAlpha: isDark ? '15' : '08',
|
glowAlpha: isDark ? '15' : '08',
|
||||||
|
|
||||||
// Shadows for light mode depth
|
// Shadows for light mode depth
|
||||||
shadow: isDark ? 'none' : '0 2px 12px rgba(0,0,0,0.06)',
|
shadow: isDark ? 'none' : '0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03)',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user