diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a6f1f..f53a88b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Fixed +- **Landing page dashboard preview.** The homepage now shows a realistic preview of the Pulse dashboard instead of an empty placeholder. +- **Logout redirect loop.** Signing out no longer bounces you straight to Ciphera Auth. You now land on the Pulse homepage where you can choose to sign back in. - **No more loading flicker.** Fast-loading pages no longer flash a loading state for a split second before showing content. - **Organization context switch.** Switching away from a deleted organization now stores the session correctly instead of using an insecure fallback. - **Dark mode uptime chart.** The response time chart on the uptime page now correctly follows your dark mode preference instead of always showing a white tooltip background. diff --git a/app/page.tsx b/app/page.tsx index ca20ae7..3d25fff 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -17,31 +17,146 @@ import { toast } from '@ciphera-net/ui' import { getAuthErrorMessage } from '@ciphera-net/ui' import { getSitesLimitForPlan } from '@/lib/plans' +const MOCK_STATS = [ + { label: 'UNIQUE VISITORS', value: '12,847', trend: '+14%', up: true }, + { label: 'TOTAL PAGEVIEWS', value: '48,293', trend: '+8%', up: true }, + { label: 'BOUNCE RATE', value: '42%', trend: '-3%', up: true }, + { label: 'VISIT DURATION', value: '2m 34s', trend: '+11%', up: true }, +] + +const MOCK_CHART_POINTS = [ + 20, 35, 28, 45, 38, 52, 48, 65, 58, 72, 68, 85, 78, 92, 88, 105, + 98, 110, 95, 115, 108, 125, 118, 130, 122, 138, 142, 155, 148, 160, +] + +const MOCK_PAGES = [ + { path: '/', views: '8,421' }, + { path: '/pricing', views: '3,287' }, + { path: '/features', views: '2,104' }, + { path: '/blog/getting-started', views: '1,856' }, + { path: '/docs/installation', views: '1,203' }, +] + +const MOCK_REFERRERS = [ + { name: 'google.com', views: '5,832' }, + { name: 'twitter.com', views: '2,417' }, + { name: 'github.com', views: '1,894' }, + { name: 'reddit.com', views: '1,105' }, + { name: 'Direct / None', views: '987' }, +] + function DashboardPreview() { + const chartMax = Math.max(...MOCK_CHART_POINTS) + const chartH = 180 + const points = MOCK_CHART_POINTS.map((v, i) => { + const x = (i / (MOCK_CHART_POINTS.length - 1)) * 100 + const y = chartH - (v / chartMax) * (chartH - 20) + return `${x},${y}` + }).join(' ') + const areaPoints = `0,${chartH} ${points} 100,${chartH}` + return ( -
- {/* * Glow behind the image */} +
- - {/* * Static Container */} -
- {/* * Header of the fake browser window */} -
-
-
-
+ {/* * Browser chrome */} +
+
+
+
+
- - {/* * Placeholder for actual dashboard screenshot - replace src with real image later */} -
-
- -

Dashboard Preview

-
+ +
+ {/* * Header row */} +
+
+
+
acme.com
+
Last 30 days
+
+
+ + + + + 24 online +
+
+
+ + {/* * Stat cards */} +
+ {MOCK_STATS.map((s, i) => ( +
+
{s.label}
+
+ {s.value} + + {s.trend} + +
+
+ ))} +
+ + {/* * Chart area */} +
+ + + + + + + + + + +
+ + {/* * Two-column widgets */} +
+ {/* * Top Pages */} +
+
+ Top Pages +
+
+ {MOCK_PAGES.map((p, i) => ( +
+ {p.path} + {p.views} +
+ ))} +
+
+ + {/* * Top Referrers */} +
+
+ Top Referrers +
+
+ {MOCK_REFERRERS.map((r, i) => ( +
+ {r.name} + {r.views} +
+ ))} +
+
+
-
+
) }