fix(ui): profile page bugs - billing button, cancel button, header subtitle
Some checks failed
Deploy to Homelab / Deploy Wordly to 192.168.1.151 (push) Has been cancelled
Deploy to Homelab / Deploy Monitoring (if configured) (push) Has been cancelled

- Remove billing portal button (not functional without Stripe configured)
- Show cancel subscription only when user has a real Stripe subscription ID
- Remove muted subtitle from dashboard header (was appearing as grayed out)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 12:33:37 +02:00
parent e6e1678b1d
commit 3c710c52a1
2 changed files with 2 additions and 10 deletions

View File

@@ -55,8 +55,6 @@ export function DashboardHeader() {
{/* Page title - desktop */}
<div className="hidden items-center gap-3 lg:flex">
<h1 className="text-sm font-semibold text-foreground">{t('dashboard.header.title')}</h1>
<Separator orientation="vertical" className="h-4" />
<span className="text-sm text-muted-foreground">{t('dashboard.header.subtitle')}</span>
</div>
{/* Right side */}

View File

@@ -306,12 +306,6 @@ export default function ProfilePage() {
<div className="flex flex-wrap gap-2">
<Button asChild size="sm"><Link href="/pricing"><TrendingUp className="w-3.5 h-3.5 me-1.5" />{isFreePlan ? t('profile.subscription.upgradePlan') : t('profile.subscription.changePlan')}</Link></Button>
{!isFreePlan && (
<Button variant="outline" size="sm" onClick={handleBillingPortal} disabled={loadingPortal}>
{loadingPortal ? <RefreshCw className="w-3.5 h-3.5 me-1.5 animate-spin" /> : <ExternalLink className="w-3.5 h-3.5 me-1.5" />}
{t('profile.subscription.manageBilling')}
</Button>
)}
</div>
</CardContent>
</Card>
@@ -378,8 +372,8 @@ export default function ProfilePage() {
</Card>
)}
{/* Danger zone */}
{!isFreePlan && !isCanceling && (
{/* Danger zone - only show if user has a real Stripe subscription */}
{!isFreePlan && !isCanceling && user?.stripe_subscription_id && (
<Card className="border-red-900/30">
<CardHeader className="pb-3">
<CardTitle className="text-base flex items-center gap-2 text-red-600 dark:text-red-400">