mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: add subscription tab to desktop nav, fix device dots overflow, show available referral balance
- Add Subscription tab to desktop header navigation (was only in mobile) - Fix device dots overflow for large limits (>10) by using progress bar - Show available referral balance on dashboard instead of total earnings - Add available_balance and withdrawn fields to ReferralInfo type
This commit is contained in:
@@ -240,19 +240,38 @@ export default function SubscriptionCardActive({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Device dots */}
|
||||
<div className="flex flex-shrink-0 gap-1.5" aria-hidden="true">
|
||||
{Array.from({ length: subscription.device_limit }, (_, i) => (
|
||||
{/* Device indicator */}
|
||||
{subscription.device_limit <= 10 ? (
|
||||
<div className="flex flex-shrink-0 gap-1.5" aria-hidden="true">
|
||||
{Array.from({ length: subscription.device_limit }, (_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="h-[7px] w-[7px] rounded-full transition-all duration-300"
|
||||
style={{
|
||||
background: i < connectedDevices ? zone.mainHex : g.textGhost,
|
||||
boxShadow: i < connectedDevices ? `0 0 6px ${zone.mainHex}50` : 'none',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex w-16 flex-shrink-0 items-center" aria-hidden="true">
|
||||
<div
|
||||
key={i}
|
||||
className="h-[7px] w-[7px] rounded-full transition-all duration-300"
|
||||
style={{
|
||||
background: i < connectedDevices ? zone.mainHex : g.textGhost,
|
||||
boxShadow: i < connectedDevices ? `0 0 6px ${zone.mainHex}50` : 'none',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
className="h-[6px] w-full overflow-hidden rounded-full"
|
||||
style={{ background: g.textGhost }}
|
||||
>
|
||||
<div
|
||||
className="h-full rounded-full transition-all duration-500"
|
||||
style={{
|
||||
width: `${Math.round((connectedDevices / subscription.device_limit) * 100)}%`,
|
||||
background: zone.mainHex,
|
||||
boxShadow: `0 0 8px ${zone.mainHex}40`,
|
||||
minWidth: connectedDevices > 0 ? '4px' : '0px',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</HoverBorderGradient>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user