mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
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:
@@ -246,6 +246,11 @@
|
|||||||
"locationsLabel": "Locations",
|
"locationsLabel": "Locations",
|
||||||
"locations_one": "{{count}} location",
|
"locations_one": "{{count}} location",
|
||||||
"locations_other": "{{count}} locations",
|
"locations_other": "{{count}} locations",
|
||||||
|
"trafficReset": {
|
||||||
|
"DAY": "Resets daily",
|
||||||
|
"WEEK": "Resets weekly",
|
||||||
|
"MONTH": "Resets monthly"
|
||||||
|
},
|
||||||
"traffic": "Traffic",
|
"traffic": "Traffic",
|
||||||
"unlimited": "Unlimited",
|
"unlimited": "Unlimited",
|
||||||
"used": "Used",
|
"used": "Used",
|
||||||
|
|||||||
@@ -241,6 +241,11 @@
|
|||||||
"servers_other": "{{count}} سرور",
|
"servers_other": "{{count}} سرور",
|
||||||
"locationsLabel": "مکانها",
|
"locationsLabel": "مکانها",
|
||||||
"locations_other": "{{count}} مکان",
|
"locations_other": "{{count}} مکان",
|
||||||
|
"trafficReset": {
|
||||||
|
"DAY": "بازنشانی روزانه",
|
||||||
|
"WEEK": "بازنشانی هفتگی",
|
||||||
|
"MONTH": "بازنشانی ماهانه"
|
||||||
|
},
|
||||||
"traffic": "ترافیک",
|
"traffic": "ترافیک",
|
||||||
"unlimited": "نامحدود",
|
"unlimited": "نامحدود",
|
||||||
"used": "استفاده شده",
|
"used": "استفاده شده",
|
||||||
|
|||||||
@@ -261,6 +261,11 @@
|
|||||||
"locations_one": "{{count}} локация",
|
"locations_one": "{{count}} локация",
|
||||||
"locations_few": "{{count}} локации",
|
"locations_few": "{{count}} локации",
|
||||||
"locations_many": "{{count}} локаций",
|
"locations_many": "{{count}} локаций",
|
||||||
|
"trafficReset": {
|
||||||
|
"DAY": "Сброс ежедневно",
|
||||||
|
"WEEK": "Сброс еженедельно",
|
||||||
|
"MONTH": "Сброс ежемесячно"
|
||||||
|
},
|
||||||
"traffic": "Трафик",
|
"traffic": "Трафик",
|
||||||
"unlimited": "Безлимит",
|
"unlimited": "Безлимит",
|
||||||
"used": "Использовано",
|
"used": "Использовано",
|
||||||
|
|||||||
@@ -241,6 +241,11 @@
|
|||||||
"servers_other": "{{count}} 个服务器",
|
"servers_other": "{{count}} 个服务器",
|
||||||
"locationsLabel": "位置",
|
"locationsLabel": "位置",
|
||||||
"locations_other": "{{count}} 个位置",
|
"locations_other": "{{count}} 个位置",
|
||||||
|
"trafficReset": {
|
||||||
|
"DAY": "每日重置",
|
||||||
|
"WEEK": "每周重置",
|
||||||
|
"MONTH": "每月重置"
|
||||||
|
},
|
||||||
"traffic": "流量",
|
"traffic": "流量",
|
||||||
"unlimited": "无限",
|
"unlimited": "无限",
|
||||||
"used": "已使用",
|
"used": "已使用",
|
||||||
|
|||||||
@@ -2380,6 +2380,28 @@ export default function Subscription() {
|
|||||||
{t('subscription.devices', { count: tariff.device_limit })}
|
{t('subscription.devices', { count: tariff.device_limit })}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
{/* Price info - daily or period-based */}
|
{/* Price info - daily or period-based */}
|
||||||
<div className="mt-3 border-t border-dark-700/50 pt-3 text-sm text-dark-400">
|
<div className="mt-3 border-t border-dark-700/50 pt-3 text-sm text-dark-400">
|
||||||
|
|||||||
@@ -316,6 +316,8 @@ export interface Tariff {
|
|||||||
daily_discount_percent?: number;
|
daily_discount_percent?: number;
|
||||||
original_price_per_day_kopeks?: number;
|
original_price_per_day_kopeks?: number;
|
||||||
custom_days_discount_percent?: number;
|
custom_days_discount_percent?: number;
|
||||||
|
// Traffic reset
|
||||||
|
traffic_reset_mode?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TariffsPurchaseOptions {
|
export interface TariffsPurchaseOptions {
|
||||||
|
|||||||
Reference in New Issue
Block a user