From faf4c450b0e995e68fdce6f236a0a1a2de5e85c7 Mon Sep 17 00:00:00 2001 From: Fringg Date: Fri, 24 Jul 2026 17:45:11 +0300 Subject: [PATCH] =?UTF-8?q?fix(sbp-recurring):=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=BD=D1=8B=D0=B9=20layout=20=D0=A1=D0=91?= =?UTF-8?q?=D0=9F-=D0=B1=D0=BB=D0=BE=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=B5=D1=81=D0=BA=D1=82=D0=BE=D0=BF=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Кнопки растягивались w-full на всю ширину карточки подписки (~1600px на десктопе) — гигантская плашка вместо контрола. Теперь заголовок и статус слева, компактное действие справа — зеркально соседнему тогглу «Автопродление»; на мобиле кнопка по-прежнему на всю ширину (w-full sm:w-auto). --- src/pages/Subscription.tsx | 183 +++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 88 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index c879276..30dac97 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -1177,100 +1177,107 @@ export default function Subscription() { border: `1px solid ${g.innerBorder}`, }} > -
- {t('subscription.sbpRecurring.title')} -
- - {sbpUiStateValue === 'off' && ( - <> -
- {t('subscription.sbpRecurring.autopayHint')} + {/* Заголовок и статус слева, компактное действие справа — + зеркально соседнему тогглу «Автопродление». На мобиле + кнопка падает вниз на всю ширину (w-full sm:w-auto). */} +
+
+
+ {t('subscription.sbpRecurring.title')}
- - - )} - {sbpUiStateValue === 'pending' && ( - <> -
- {t('subscription.sbpRecurring.statusPending')} -
- {sbpInfo?.redirect_url && ( - - )} - - - )} - - {sbpUiStateValue === 'active' && sbpInfo && ( - <> -
- {t('subscription.sbpRecurring.amountPerInterval', { - amount: formatAmount((sbpInfo.amount_kopeks ?? 0) / 100), - interval: t(sbpIntervalLabelKey(sbpInfo.interval)), - })} -
- {sbpInfo.next_charge_at && ( + {sbpUiStateValue === 'off' && (
- {t('subscription.sbpRecurring.nextCharge', { - date: new Date(sbpInfo.next_charge_at).toLocaleDateString(uiLocale(), { - day: '2-digit', - month: '2-digit', - year: 'numeric', - }), - })} + {t('subscription.sbpRecurring.autopayHint')}
)} - - - )} + {sbpUiStateValue === 'pending' && ( +
+ {t('subscription.sbpRecurring.statusPending')} +
+ )} + {sbpUiStateValue === 'active' && sbpInfo && ( + <> +
+ {t('subscription.sbpRecurring.amountPerInterval', { + amount: formatAmount((sbpInfo.amount_kopeks ?? 0) / 100), + interval: t(sbpIntervalLabelKey(sbpInfo.interval)), + })} +
+ {sbpInfo.next_charge_at && ( +
+ {t('subscription.sbpRecurring.nextCharge', { + date: new Date(sbpInfo.next_charge_at).toLocaleDateString( + uiLocale(), + { + day: '2-digit', + month: '2-digit', + year: 'numeric', + }, + ), + })} +
+ )} + + )} + {sbpUiStateValue === 'past_due' && ( +
+ {t('subscription.sbpRecurring.statusPastDue')} +
+ )} +
- {sbpUiStateValue === 'past_due' && ( - <> -
- {t('subscription.sbpRecurring.statusPastDue')} -
- - - )} +
+ {sbpUiStateValue === 'off' && ( + + )} + + {sbpUiStateValue === 'pending' && ( + <> + {sbpInfo?.redirect_url && ( + + )} + + + )} + + {(sbpUiStateValue === 'active' || sbpUiStateValue === 'past_due') && ( + + )} +
+
)}