From 475ce7d13f23049444c6aa7194df2725db96ad21 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 28 Jan 2026 20:33:54 +0300 Subject: [PATCH 1/5] Update Subscription.tsx --- src/pages/Subscription.tsx | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index aeab231..eba7467 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -1014,12 +1014,15 @@ export default function Subscription() { - {devicePriceData?.available === false ? ( + {/* Check if completely unavailable (no subscription, price not set, etc.) */} + {devicePriceData?.available === false && + !devicePriceData?.max_device_limit ? (
{devicePriceData.reason || t('subscription.additionalOptions.devicesUnavailable')}
) : (
+ {/* Device selector - show even at max limit */}
- {devicePriceData && ( + {/* Show limit info when at or near max */} + {devicePriceData?.max_device_limit && ( +
+ {t('subscription.additionalOptions.currentDeviceLimit', { + count: devicePriceData.current_device_limit || subscription.device_limit, + })}{' '} + / {t('subscription.additionalOptions.maxDevices', { + count: devicePriceData.max_device_limit, + })} +
+ )} + + {/* Show reason if can't add requested amount */} + {devicePriceData?.available === false && devicePriceData?.reason && ( +
+ {devicePriceData.reason} +
+ )} + + {/* Price info - only when available */} + {devicePriceData?.available && devicePriceData.price_per_device_label && (
{devicePriceData.price_per_device_label}/ @@ -1055,7 +1084,7 @@ export default function Subscription() {
)} - {devicePriceData && + {devicePriceData?.available && purchaseOptions && devicePriceData.total_price_kopeks && devicePriceData.total_price_kopeks > purchaseOptions.balance_kopeks && ( @@ -1071,6 +1100,7 @@ export default function Subscription() { onClick={() => devicePurchaseMutation.mutate()} disabled={ devicePurchaseMutation.isPending || + !devicePriceData?.available || !!( devicePriceData?.total_price_kopeks && purchaseOptions && From 2ab978edcc0bcd7dc0202995b2d0a13bb9f997d1 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 28 Jan 2026 20:34:20 +0300 Subject: [PATCH 2/5] Add files via upload --- src/locales/en.json | 1 + src/locales/fa.json | 1 + src/locales/ru.json | 1 + src/locales/zh.json | 1 + 4 files changed, 4 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index b9353d8..11ea283 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -320,6 +320,7 @@ "title": "Additional options", "buyDevices": "Buy more devices", "currentDeviceLimit": "Current limit: {{count}} devices", + "maxDevices": "max {{count}}", "devicesUnavailable": "Device purchase is not available", "devicesUnit": "devices", "buy": "Buy", diff --git a/src/locales/fa.json b/src/locales/fa.json index 4df6626..b9b9399 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -229,6 +229,7 @@ "title": "گزینه‌های اضافی", "buyDevices": "خرید دستگاه بیشتر", "currentDeviceLimit": "محدودیت فعلی: {{count}} دستگاه", + "maxDevices": "حداکثر {{count}}", "devicesUnavailable": "خرید دستگاه در دسترس نیست", "devicesUnit": "دستگاه", "buy": "خرید", diff --git a/src/locales/ru.json b/src/locales/ru.json index 709ec6b..e608789 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -342,6 +342,7 @@ "title": "Дополнительные опции", "buyDevices": "Докупить устройства", "currentDeviceLimit": "Текущий лимит: {{count}} устройств", + "maxDevices": "максимум {{count}}", "devicesUnavailable": "Докупка устройств недоступна", "devicesUnit": "устройств", "buy": "Купить", diff --git a/src/locales/zh.json b/src/locales/zh.json index 96e3a95..b479f18 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -229,6 +229,7 @@ "title": "附加选项", "buyDevices": "购买更多设备", "currentDeviceLimit": "当前限制:{{count}} 台设备", + "maxDevices": "最多 {{count}} 台", "devicesUnavailable": "设备购买不可用", "devicesUnit": "台设备", "buy": "购买", From 2722fca22e4140f679c34626135e5b7395493688 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 28 Jan 2026 20:34:46 +0300 Subject: [PATCH 3/5] Update subscription.ts --- src/api/subscription.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/subscription.ts b/src/api/subscription.ts index ceab2b0..8db6fa2 100644 --- a/src/api/subscription.ts +++ b/src/api/subscription.ts @@ -86,6 +86,8 @@ export const subscriptionApi = { total_price_kopeks?: number; total_price_label?: string; current_device_limit?: number; + max_device_limit?: number; + can_add?: number; days_left?: number; base_device_price_kopeks?: number; }> => { From 4622c4fb2c9d2a1fba060c18d0781c5e757e378d Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 28 Jan 2026 20:37:16 +0300 Subject: [PATCH 4/5] Add files via upload --- src/locales/en.json | 2 +- src/locales/fa.json | 2 +- src/locales/ru.json | 2 +- src/locales/zh.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 11ea283..5fd1701 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -485,7 +485,7 @@ "copyLink": "Copy Link", "copied": "Copied!", "shareButton": "Share", - "shareMessage": "Join me on and earn up to {{percent}}% cashback!", + "shareMessage": "Join me on {{botName}} and earn up to {{percent}}% cashback!", "shareHint": "Share this link with friends. When they sign up and make a purchase, you'll earn {{percent}}% commission!", "stats": { "totalReferrals": "Total Referrals", diff --git a/src/locales/fa.json b/src/locales/fa.json index b9b9399..2b3e356 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -411,7 +411,7 @@ "copyLink": "کپی لینک", "copied": "کپی شد!", "shareButton": "اشتراک‌گذاری", - "shareMessage": "از طریق لینک من به Cabinet بپیوند و تا {{percent}}٪ پاداش بگیر!", + "shareMessage": "از طریق لینک من به {{botName}} بپیوند و تا {{percent}}٪ پاداش بگیر!", "shareHint": "این لینک را با دوستان به اشتراک بگذارید. وقتی ثبت نام کنند و خرید کنند، {{percent}}% کمیسیون دریافت می‌کنید!", "stats": { "totalReferrals": "کل معرفی‌ها", diff --git a/src/locales/ru.json b/src/locales/ru.json index e608789..f25d954 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -507,7 +507,7 @@ "copyLink": "Копировать ссылку", "copied": "Скопировано!", "shareButton": "Поделиться", - "shareMessage": "Заходи в Cabinet по моей ссылке и получай до {{percent}}% кешбэка!", + "shareMessage": "Заходи в {{botName}} по моей ссылке и получай до {{percent}}% кешбэка!", "shareHint": "Поделитесь ссылкой с друзьями. Когда они зарегистрируются и оплатят, вы получите {{percent}}% комиссии!", "stats": { "totalReferrals": "Всего рефералов", diff --git a/src/locales/zh.json b/src/locales/zh.json index b479f18..7ca75f4 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -411,7 +411,7 @@ "copyLink": "复制链接", "copied": "已复制!", "shareButton": "分享", - "shareMessage": "通过我的链接加入 Cabinet,获取高达 {{percent}}% 返现!", + "shareMessage": "通过我的链接加入 {{botName}},获取高达 {{percent}}% 返现!", "shareHint": "分享链接给朋友。当他们注册并付款后,您将获得 {{percent}}% 佣金!", "stats": { "totalReferrals": "总推荐数", From 7b7021a6030fd42437a1c69c433e912ff0430e28 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 28 Jan 2026 20:39:19 +0300 Subject: [PATCH 5/5] Update Subscription.tsx --- src/pages/Subscription.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index eba7467..25c1e4b 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -1015,8 +1015,7 @@ export default function Subscription() {
{/* Check if completely unavailable (no subscription, price not set, etc.) */} - {devicePriceData?.available === false && - !devicePriceData?.max_device_limit ? ( + {devicePriceData?.available === false && !devicePriceData?.max_device_limit ? (
{devicePriceData.reason || t('subscription.additionalOptions.devicesUnavailable')}
@@ -1057,7 +1056,8 @@ export default function Subscription() { {t('subscription.additionalOptions.currentDeviceLimit', { count: devicePriceData.current_device_limit || subscription.device_limit, })}{' '} - / {t('subscription.additionalOptions.maxDevices', { + /{' '} + {t('subscription.additionalOptions.maxDevices', { count: devicePriceData.max_device_limit, })}