From 63863a048bf71793f08a560b26bb41cc3a24bdba Mon Sep 17 00:00:00 2001 From: c0mrade Date: Thu, 4 Jun 2026 23:03:42 +0300 Subject: [PATCH] fix(cabinet): stop long user data overflowing flex rows on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same flex-overflow class as the Connected-Accounts card — a long user-controlled string with no truncation pushes its sibling badge/button out of the card on narrow screens. Found via a scan of the high-risk screens; fixed with min-w-0 + truncate/break-words on the text column and shrink-0 on the fixed siblings: - Balance: promocode-target tariff name vs days-left badge - ReferralNetwork CampaignDetailPanel: start_parameter + top-referrer username - ServerManagementSheet: country/server name vs flag emoji - Contests / Polls: contest/poll title vs prize/reward badge --- .../sheets/ServerManagementSheet.tsx | 14 ++++++------- src/pages/Balance.tsx | 6 +++--- src/pages/Contests.tsx | 8 ++++---- src/pages/Polls.tsx | 8 ++++---- .../components/CampaignDetailPanel.tsx | 20 +++++++++++-------- 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/components/subscription/sheets/ServerManagementSheet.tsx b/src/components/subscription/sheets/ServerManagementSheet.tsx index 353a0c8..ab7d916 100644 --- a/src/components/subscription/sheets/ServerManagementSheet.tsx +++ b/src/components/subscription/sheets/ServerManagementSheet.tsx @@ -168,15 +168,15 @@ export function ServerManagementSheet({ : 'border-champagne-300/60 bg-champagne-200/40 hover:border-champagne-400' } ${!country.is_available && !isCurrentlyConnected ? 'cursor-not-allowed opacity-50' : ''}`} > -
- +
+ {willBeAdded ? '➕' : willBeRemoved ? '➖' : isSelected ? '✅' : '⚪'} -
-
- {country.name} +
+
+ {country.name} {country.has_discount && !isCurrentlyConnected && ( - + -{country.discount_percent}% )} @@ -217,7 +217,7 @@ export function ServerManagementSheet({
{country.country_code && ( - {getFlagEmoji(country.country_code)} + {getFlagEmoji(country.country_code)} )} ); diff --git a/src/pages/Balance.tsx b/src/pages/Balance.tsx index cb53eeb..7dfb2bd 100644 --- a/src/pages/Balance.tsx +++ b/src/pages/Balance.tsx @@ -275,10 +275,10 @@ export default function Balance() { key={sub.id} onClick={() => handlePromocodeActivate(sub.id)} disabled={promocodeLoading} - className="flex w-full items-center justify-between rounded-linear border border-dark-600 bg-dark-700 px-3 py-2 text-sm text-dark-200 transition-colors hover:border-accent-500/50 hover:bg-dark-600" + className="flex w-full min-w-0 items-center justify-between gap-3 rounded-linear border border-dark-600 bg-dark-700 px-3 py-2 text-sm text-dark-200 transition-colors hover:border-accent-500/50 hover:bg-dark-600" > - {sub.tariff_name} - + {sub.tariff_name} + {t('balance.promocode.daysLeft', '{{count}} дн.', { count: sub.days_left })} diff --git a/src/pages/Contests.tsx b/src/pages/Contests.tsx index c15196a..ddaed5c 100644 --- a/src/pages/Contests.tsx +++ b/src/pages/Contests.tsx @@ -198,14 +198,14 @@ export default function Contests() {
{contests.map((contest) => (
-
-
-

{contest.name}

+
+
+

{contest.name}

{contest.description && (

{contest.description}

)}
-
+
+{t('contests.days', { count: contest.prize_days })} diff --git a/src/pages/Polls.tsx b/src/pages/Polls.tsx index 2b46fba..4ed64ed 100644 --- a/src/pages/Polls.tsx +++ b/src/pages/Polls.tsx @@ -205,9 +205,9 @@ export default function Polls() {
{polls.map((poll) => (
-
-
-

{poll.title}

+
+
+

{poll.title}

{poll.description && (

{poll.description}

)} @@ -219,7 +219,7 @@ export default function Polls() {
{poll.reward_amount && ( -
+
+{poll.reward_amount}
diff --git a/src/pages/ReferralNetwork/components/CampaignDetailPanel.tsx b/src/pages/ReferralNetwork/components/CampaignDetailPanel.tsx index 2661911..90383e9 100644 --- a/src/pages/ReferralNetwork/components/CampaignDetailPanel.tsx +++ b/src/pages/ReferralNetwork/components/CampaignDetailPanel.tsx @@ -60,11 +60,13 @@ export function CampaignDetailPanel({ campaignId, className }: CampaignDetailPan
{/* Info */}
-
- +
+ {t('admin.referralNetwork.campaign.startParam')} - {campaign.start_parameter} + + {campaign.start_parameter} +
(
-
- +
+ {index + 1} - + {referrer.username ? `@${referrer.username}` : `#${referrer.user_id}`}
- {referrer.referral_count} + + {referrer.referral_count} +
))}