feat: added option to hide stripe billing links from dashboard

This commit is contained in:
Gitea
2025-08-15 21:37:32 +05:30
parent 566aff01df
commit 573d32c9bd
2 changed files with 6 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ class Dashboard extends Component
public $usageLog;
public $subscription;
public $plans;
public $showStripeBilling = false;
public function paymentStatus(Request $request)
{
@@ -184,6 +185,7 @@ class Dashboard extends Component
foreach (config('app.plans') as $plan) {
if ($plan['pricing_id'] === $userPriceID) {
$planName = $plan['name'];
$this->showStripeBilling = $plan['accept_stripe'];
break;
}
}

View File

@@ -31,7 +31,10 @@
@if($subscription['ends_at'] ?? "") end at<span class="app-primary"> {{ \Carbon\Carbon::make($subscription['ends_at'])->toFormattedDayDateString() ?? "" }}.</span>
@else auto-renew as per the plan you chose.
@endif
To manage you subscription <a href="{{ route('billing') }}" target="_blank" class="text-blue-500">Click here</a></p>
@if($showStripeBilling)
To manage you subscription <a href="{{ route('billing') }}" target="_blank" class="text-blue-500">Click here</a>
@endif
</p>
</div>
</article>
@else