feat: show traffic reset period on tariff cards

Display daily/weekly/monthly reset badge next to traffic and devices.
Hidden for NO_RESET tariffs.
This commit is contained in:
Fringg
2026-02-18 09:36:39 +03:00
parent 19e62fccf1
commit cfe9f642d8
6 changed files with 44 additions and 0 deletions

View File

@@ -2380,6 +2380,28 @@ export default function Subscription() {
{t('subscription.devices', { count: tariff.device_limit })}
</span>
</div>
{/* Traffic Reset */}
{tariff.traffic_reset_mode &&
tariff.traffic_reset_mode !== 'NO_RESET' && (
<div className="flex items-center gap-1.5">
<svg
className="h-4 w-4 text-dark-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.5}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182M2.985 19.644l3.181-3.182"
/>
</svg>
<span className="text-dark-300">
{t(`subscription.trafficReset.${tariff.traffic_reset_mode}`)}
</span>
</div>
)}
</div>
{/* Price info - daily or period-based */}
<div className="mt-3 border-t border-dark-700/50 pt-3 text-sm text-dark-400">