mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-24 07:08:38 +00:00
✨ refactor: unify layout, adopt Semi UI Forms, dynamic presets, and fix duplicate requests
- Unify TopUp into a single-page layout and remove tabs - Replace custom inputs with Semi UI Form components (Form.Input, Form.InputNumber, Form.Slot) - Move online recharge form into the stats Card content for tighter, consistent layout - Add account stats Card with blue theme (consistent with InvitationCard style) - Remove RightStatsCard and inline the stats UI directly in RechargeCard - Change preset amount UI to horizontal quick-action Buttons; swap order with payment methods - Replace payment method Cards with Semi UI Buttons - Use Button icon prop for Alipay/WeChat/Stripe with brand colors - Use built-in Button loading; remove custom “processing...” text - Replace custom spinners with Semi UI Spin and keep Skeleton for amount loading - Wrap Redeem Code in a Card; use Typography for “Looking for a code? Buy Redeem Code” link - Show info Banner when online recharge is disabled (instead of warning) TopUp data flow and logic - Generate preset amounts from min_topup using multipliers [1,5,10,30,50,100,300,500] - Deduplicate /api/user/aff using a ref guard; fetch only once on mount - Simplify user self fetch: update context only; remove unused local states and helpers - Normalize payment method keys to alipay/wxpay/stripe and assign default colors Cleanup - Delete web/src/components/topup/RightStatsCard.jsx - Remove unused helpers and local states in index.jsx (userQuota, userDataLoading, getUsername) Dev notes - No API changes; UI/UX refactor only - Lint clean (no new linter errors) Files - web/src/components/topup/RechargeCard.jsx - web/src/components/topup/index.jsx - web/src/components/topup/InvitationCard.jsx (visual parity reference) - web/src/components/topup/RightStatsCard.jsx (removed)
This commit is contained in:
@@ -85,9 +85,9 @@ const PaymentConfirmModal = ({
|
||||
if (payMethod) {
|
||||
return (
|
||||
<>
|
||||
{payMethod.type === 'zfb' ? (
|
||||
{payMethod.type === 'alipay' ? (
|
||||
<SiAlipay className='mr-2' size={16} color="#1677FF" />
|
||||
) : payMethod.type === 'wx' ? (
|
||||
) : payMethod.type === 'wxpay' ? (
|
||||
<SiWechat className='mr-2' size={16} color="#07C160" />
|
||||
) : payMethod.type === 'stripe' ? (
|
||||
<SiStripe className='mr-2' size={16} color="#635BFF" />
|
||||
@@ -99,7 +99,7 @@ const PaymentConfirmModal = ({
|
||||
);
|
||||
} else {
|
||||
// 默认充值方式
|
||||
if (payWay === 'zfb') {
|
||||
if (payWay === 'alipay') {
|
||||
return (
|
||||
<>
|
||||
<SiAlipay className='mr-2' size={16} color="#1677FF" />
|
||||
|
||||
Reference in New Issue
Block a user