From cfe9f642d842fc0696e379ef59934b300c363a24 Mon Sep 17 00:00:00 2001 From: Fringg Date: Wed, 18 Feb 2026 09:36:39 +0300 Subject: [PATCH] feat: show traffic reset period on tariff cards Display daily/weekly/monthly reset badge next to traffic and devices. Hidden for NO_RESET tariffs. --- src/locales/en.json | 5 +++++ src/locales/fa.json | 5 +++++ src/locales/ru.json | 5 +++++ src/locales/zh.json | 5 +++++ src/pages/Subscription.tsx | 22 ++++++++++++++++++++++ src/types/index.ts | 2 ++ 6 files changed, 44 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index 1444ce4..ea37eb5 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -246,6 +246,11 @@ "locationsLabel": "Locations", "locations_one": "{{count}} location", "locations_other": "{{count}} locations", + "trafficReset": { + "DAY": "Resets daily", + "WEEK": "Resets weekly", + "MONTH": "Resets monthly" + }, "traffic": "Traffic", "unlimited": "Unlimited", "used": "Used", diff --git a/src/locales/fa.json b/src/locales/fa.json index 4b87ea9..20cc322 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -241,6 +241,11 @@ "servers_other": "{{count}} سرور", "locationsLabel": "مکان‌ها", "locations_other": "{{count}} مکان", + "trafficReset": { + "DAY": "بازنشانی روزانه", + "WEEK": "بازنشانی هفتگی", + "MONTH": "بازنشانی ماهانه" + }, "traffic": "ترافیک", "unlimited": "نامحدود", "used": "استفاده شده", diff --git a/src/locales/ru.json b/src/locales/ru.json index f031c5b..29147d4 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -261,6 +261,11 @@ "locations_one": "{{count}} локация", "locations_few": "{{count}} локации", "locations_many": "{{count}} локаций", + "trafficReset": { + "DAY": "Сброс ежедневно", + "WEEK": "Сброс еженедельно", + "MONTH": "Сброс ежемесячно" + }, "traffic": "Трафик", "unlimited": "Безлимит", "used": "Использовано", diff --git a/src/locales/zh.json b/src/locales/zh.json index 4655c8a..18dceb5 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -241,6 +241,11 @@ "servers_other": "{{count}} 个服务器", "locationsLabel": "位置", "locations_other": "{{count}} 个位置", + "trafficReset": { + "DAY": "每日重置", + "WEEK": "每周重置", + "MONTH": "每月重置" + }, "traffic": "流量", "unlimited": "无限", "used": "已使用", diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index a5451e2..7d708cc 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -2380,6 +2380,28 @@ export default function Subscription() { {t('subscription.devices', { count: tariff.device_limit })} + {/* Traffic Reset */} + {tariff.traffic_reset_mode && + tariff.traffic_reset_mode !== 'NO_RESET' && ( +
+ + + + + {t(`subscription.trafficReset.${tariff.traffic_reset_mode}`)} + +
+ )} {/* Price info - daily or period-based */}
diff --git a/src/types/index.ts b/src/types/index.ts index 8ec87b5..b521ea5 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -316,6 +316,8 @@ export interface Tariff { daily_discount_percent?: number; original_price_per_day_kopeks?: number; custom_days_discount_percent?: number; + // Traffic reset + traffic_reset_mode?: string; } export interface TariffsPurchaseOptions {