Update Subscription.tsx

This commit is contained in:
Egor
2026-01-26 23:23:38 +03:00
committed by GitHub
parent b82c07bfbd
commit c2c2399af1

View File

@@ -1657,7 +1657,14 @@ export default function Subscription() {
</div> </div>
<div> <div>
<span className="text-dark-500">{t('subscription.devices')}:</span> <span className="text-dark-500">{t('subscription.devices')}:</span>
<span className="ml-2 text-dark-200">{selectedTariff.device_limit}</span> <span className="ml-2 text-dark-200">
{selectedTariff.device_limit}
{selectedTariff.extra_devices_count > 0 && (
<span className="ml-1 text-accent-400 text-xs">
(+{selectedTariff.extra_devices_count})
</span>
)}
</span>
</div> </div>
<div> <div>
<span className="text-dark-500">{t('subscription.servers')}:</span> <span className="text-dark-500">{t('subscription.servers')}:</span>
@@ -1951,17 +1958,33 @@ export default function Subscription() {
</div> </div>
</div> </div>
) : selectedTariffPeriod && ( ) : selectedTariffPeriod && (
<div className="flex justify-between text-sm text-dark-300"> <>
<span>Период: {selectedTariffPeriod.label}</span> {/* Если есть доп. устройства - показываем разбивку */}
<div className="flex items-center gap-2"> {selectedTariffPeriod.extra_devices_count > 0 && selectedTariffPeriod.base_tariff_price_kopeks ? (
<span>{formatPrice(promoPeriod.price)}</span> <>
{(hasExistingPeriodDiscount || promoPeriod.original) && ( <div className="flex justify-between text-sm text-dark-300">
<span className="text-dark-500 text-xs line-through"> <span>{t('subscription.baseTariff')}: {selectedTariffPeriod.label}</span>
{formatPrice(hasExistingPeriodDiscount ? selectedTariffPeriod.original_price_kopeks! : promoPeriod.original!)} <span>{formatPrice(selectedTariffPeriod.base_tariff_price_kopeks)}</span>
</span> </div>
)} <div className="flex justify-between text-sm text-dark-300">
</div> <span>{t('subscription.extraDevices')} ({selectedTariffPeriod.extra_devices_count})</span>
</div> <span>+{formatPrice(selectedTariffPeriod.extra_devices_cost_kopeks)}</span>
</div>
</>
) : (
<div className="flex justify-between text-sm text-dark-300">
<span>Период: {selectedTariffPeriod.label}</span>
<div className="flex items-center gap-2">
<span>{formatPrice(promoPeriod.price)}</span>
{(hasExistingPeriodDiscount || promoPeriod.original) && (
<span className="text-dark-500 text-xs line-through">
{formatPrice(hasExistingPeriodDiscount ? selectedTariffPeriod.original_price_kopeks! : promoPeriod.original!)}
</span>
)}
</div>
</div>
)}
</>
)} )}
{useCustomTraffic && selectedTariff.custom_traffic_enabled && ( {useCustomTraffic && selectedTariff.custom_traffic_enabled && (
<div className="flex justify-between text-sm text-dark-300"> <div className="flex justify-between text-sm text-dark-300">