From f0e60df96ee69e46999e4c7ece4c21a4e6a207e1 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Sun, 1 Feb 2026 02:28:50 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Update=20subscription=20pur?= =?UTF-8?q?chase=20modal=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show total quota as currency with tooltip for raw quota, hide reset cycle when never, and display upgrade group when configured to match card display rules. --- .../modals/SubscriptionPurchaseModal.jsx | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx b/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx index c914c7e77..a497b7247 100644 --- a/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx +++ b/web/src/components/topup/modals/SubscriptionPurchaseModal.jsx @@ -26,10 +26,12 @@ import { Button, Select, Divider, + Tooltip, } from '@douyinfe/semi-ui'; import { Crown, CalendarClock, Package } from 'lucide-react'; import { SiStripe } from 'react-icons/si'; import { IconCreditCard } from '@douyinfe/semi-icons'; +import { renderQuota } from '../../../helpers'; import { getCurrencyConfig } from '../../../helpers/render'; const { Text } = Typography; @@ -145,25 +147,45 @@ const SubscriptionPurchaseModal = ({ -
- - {t('重置周期')}: - - - {formatResetPeriod(plan, t)} - -
+ {formatResetPeriod(plan, t) !== t('不重置') && ( +
+ + {t('重置周期')}: + + + {formatResetPeriod(plan, t)} + +
+ )}
{t('总额度')}:
- - {totalAmount > 0 ? totalAmount : t('不限')} - + {totalAmount > 0 ? ( + + + {renderQuota(totalAmount)} + + + ) : ( + + {t('不限')} + + )}
+ {plan?.upgrade_group ? ( +
+ + {t('升级分组')}: + + + {plan.upgrade_group} + +
+ ) : null}