Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
725473d3
authored
Feb 06, 2026
by
QuentinHsu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(topup): hide subscription plans card when no plans available
parent
2ada9354
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
web/src/components/topup/index.jsx
+26
-18
No files found.
web/src/components/topup/index.jsx
View file @
725473d3
...
...
@@ -734,26 +734,34 @@ const TopUp = () => {
{
/* 主布局区域 */
}
<
div
className=
'grid grid-cols-1 lg:grid-cols-12 gap-6'
>
{
/* 左侧 - 订阅套餐 */
}
<
div
className=
'lg:col-span-7'
>
<
SubscriptionPlansCard
t=
{
t
}
loading=
{
subscriptionLoading
}
plans=
{
subscriptionPlans
}
payMethods=
{
payMethods
}
enableOnlineTopUp=
{
enableOnlineTopUp
}
enableStripeTopUp=
{
enableStripeTopUp
}
enableCreemTopUp=
{
enableCreemTopUp
}
billingPreference=
{
billingPreference
}
onChangeBillingPreference=
{
updateBillingPreference
}
activeSubscriptions=
{
activeSubscriptions
}
allSubscriptions=
{
allSubscriptions
}
reloadSubscriptionSelf=
{
getSubscriptionSelf
}
/>
</
div
>
{
/* 左侧 - 订阅套餐(无套餐时隐藏整块卡片) */
}
{
(
subscriptionLoading
||
subscriptionPlans
.
length
>
0
)
&&
(
<
div
className=
'lg:col-span-7'
>
<
SubscriptionPlansCard
t=
{
t
}
loading=
{
subscriptionLoading
}
plans=
{
subscriptionPlans
}
payMethods=
{
payMethods
}
enableOnlineTopUp=
{
enableOnlineTopUp
}
enableStripeTopUp=
{
enableStripeTopUp
}
enableCreemTopUp=
{
enableCreemTopUp
}
billingPreference=
{
billingPreference
}
onChangeBillingPreference=
{
updateBillingPreference
}
activeSubscriptions=
{
activeSubscriptions
}
allSubscriptions=
{
allSubscriptions
}
reloadSubscriptionSelf=
{
getSubscriptionSelf
}
/>
</
div
>
)
}
{
/* 右侧 - 账户充值 + 邀请奖励 */
}
<
div
className=
'lg:col-span-5 flex flex-col gap-6'
>
<
div
className=
{
subscriptionLoading
||
subscriptionPlans
.
length
>
0
?
'lg:col-span-5 flex flex-col gap-6'
:
'lg:col-span-12 flex flex-col gap-6'
}
>
<
RechargeCard
t=
{
t
}
enableOnlineTopUp=
{
enableOnlineTopUp
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment