From 158a47e1e122dd7d35f611587e09199816a50cff Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 4 Feb 2026 00:50:50 +0300 Subject: [PATCH 1/4] Update Subscription.tsx --- src/pages/Subscription.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index e5b1891..7405d0a 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -2001,10 +2001,10 @@ export default function Subscription() {
- {t('subscription.expired.title')} + {t('subscription.expiredBanner.title')}
- {t('subscription.expired.selectTariff')} + {t('subscription.expiredBanner.selectTariff')}
From 9e590247e058687ee5f86c1b2c556fc94718f193 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 4 Feb 2026 00:51:07 +0300 Subject: [PATCH 2/4] Add files via upload --- src/locales/en.json | 2 +- src/locales/ru.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index e85fa57..970a201 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -320,7 +320,7 @@ "title": "Choose a plan to continue", "description": "Your trial period is ending soon. Select a plan to continue using VPN without restrictions." }, - "expired": { + "expiredBanner": { "title": "Subscription expired", "selectTariff": "Your subscription has expired. Choose a plan below to restore access to VPN." }, diff --git a/src/locales/ru.json b/src/locales/ru.json index 2ca16af..dfb82df 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -342,7 +342,7 @@ "title": "Выберите тариф для продолжения", "description": "Ваш пробный период скоро закончится. Выберите подходящий тариф, чтобы продолжить пользоваться VPN без ограничений." }, - "expired": { + "expiredBanner": { "title": "Подписка истекла", "selectTariff": "Ваша подписка истекла. Выберите тариф ниже, чтобы возобновить доступ к VPN." }, From 9804e3a874057e8bd5a64cce84e77a3739608f15 Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 4 Feb 2026 01:00:49 +0300 Subject: [PATCH 3/4] Update Subscription.tsx --- src/pages/Subscription.tsx | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index 7405d0a..a846636 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -181,7 +181,10 @@ export default function Subscription() { if (selectedPeriod?.traffic.selectable && (selectedPeriod.traffic.options?.length ?? 0) > 0) { result.push('traffic'); } - if (selectedPeriod && (selectedPeriod.servers.options?.length ?? 0) > 0) { + if ( + selectedPeriod && + (selectedPeriod.servers.options?.filter((s) => s.is_available).length ?? 0) > 0 + ) { result.push('servers'); } if (selectedPeriod && selectedPeriod.devices.max > selectedPeriod.devices.min) { @@ -203,7 +206,12 @@ export default function Subscription() { classicOptions.periods[0]; setSelectedPeriod(defaultPeriod); setSelectedTraffic(classicOptions.selection.traffic_value); - setSelectedServers(classicOptions.selection.servers); + const availableServerUuids = new Set( + defaultPeriod.servers.options?.filter((s) => s.is_available).map((s) => s.uuid) ?? [], + ); + setSelectedServers( + classicOptions.selection.servers.filter((uuid) => availableServerUuids.has(uuid)), + ); setSelectedDevices(classicOptions.selection.devices); } }, [classicOptions, selectedPeriod]); @@ -1636,7 +1644,9 @@ export default function Subscription() { )}
- {countriesData.countries.map((country) => { + {countriesData.countries + .filter((country) => country.is_available || country.is_connected) + .map((country) => { const isCurrentlyConnected = country.is_connected; const isSelected = selectedServersToUpdate.includes(country.uuid); const willBeAdded = !isCurrentlyConnected && isSelected; @@ -3108,7 +3118,14 @@ export default function Subscription() { setSelectedTraffic(period.traffic.current); } if (period.servers.selected) { - setSelectedServers(period.servers.selected); + const availUuids = new Set( + period.servers.options + ?.filter((s) => s.is_available) + .map((s) => s.uuid) ?? [], + ); + setSelectedServers( + period.servers.selected.filter((uuid) => availUuids.has(uuid)), + ); } if (period.devices.current) { setSelectedDevices(period.devices.current); @@ -3193,8 +3210,9 @@ export default function Subscription() { {currentStep === 'servers' && selectedPeriod?.servers.options && (
{selectedPeriod.servers.options - // Hide Trial server for users who already have trial subscription + // Hide unavailable (disabled) servers and trial servers for existing trial users .filter((server) => { + if (!server.is_available) return false; if (subscription?.is_trial && server.name.toLowerCase().includes('trial')) { return false; } From 026cb476944efffa4b555a8fa3c0a7f52e07a15e Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 4 Feb 2026 01:08:05 +0300 Subject: [PATCH 4/4] Update Subscription.tsx --- src/pages/Subscription.tsx | 178 ++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index a846636..00d39a7 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -1645,100 +1645,100 @@ export default function Subscription() {
{countriesData.countries - .filter((country) => country.is_available || country.is_connected) - .map((country) => { - const isCurrentlyConnected = country.is_connected; - const isSelected = selectedServersToUpdate.includes(country.uuid); - const willBeAdded = !isCurrentlyConnected && isSelected; - const willBeRemoved = isCurrentlyConnected && !isSelected; + .filter((country) => country.is_available || country.is_connected) + .map((country) => { + const isCurrentlyConnected = country.is_connected; + const isSelected = selectedServersToUpdate.includes(country.uuid); + const willBeAdded = !isCurrentlyConnected && isSelected; + const willBeRemoved = isCurrentlyConnected && !isSelected; - return ( - - ); - })} + {country.country_code && ( + + {getFlagEmoji(country.country_code)} + + )} + + ); + })}
{(() => {