From 966c2bf03ac4129a0d1ce2f6b3d0a7fcd5e8fcf8 Mon Sep 17 00:00:00 2001 From: c0mrade Date: Wed, 3 Jun 2026 14:50:28 +0300 Subject: [PATCH] style(admin-landings): rebuild stats summary on the StatCard pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The landing stats page used plain, icon-less centered boxes that looked inconsistent with the Sales/Remnawave stats. Rebuild the summary on the shared StatCard (tinted icon chip + tone + value), consolidating the two scattered stat rows into a clean 2×4 grid (created/paid/revenue/conversion + purchases/regular/gifts/avg) with barrel Phosphor icons. Chart and list containers now use the same bento-card surface as the rest of the admin stats. --- src/pages/AdminLandingStats.tsx | 125 ++++++++++++++++---------------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/src/pages/AdminLandingStats.tsx b/src/pages/AdminLandingStats.tsx index 34e3025..0c725af 100644 --- a/src/pages/AdminLandingStats.tsx +++ b/src/pages/AdminLandingStats.tsx @@ -26,12 +26,20 @@ import { useCurrency } from '../hooks/useCurrency'; import { useChartColors } from '../hooks/useChartColors'; import { CHART_COMMON } from '../constants/charts'; import { AdminBackButton } from '../components/admin'; +import { StatCard } from '../components/stats'; import { ChartIcon, EmailIcon, TelegramSmallIcon, ArrowRightIcon, GiftIcon, + EyeIcon, + CheckCircleIcon, + BanknotesIcon, + PercentIcon, + TicketIcon, + CardIcon, + WalletIcon, ChevronLeftIcon as ChevronLeftSmall, ChevronRightIcon as ChevronRightSmall, } from '@/components/icons'; @@ -339,39 +347,62 @@ export default function AdminLandingStats() {
{/* Summary Cards */}
-
-
- {stats.total_created} - / - {stats.total_successful} -
-
- {t('admin.landings.stats.created', 'Created')} /{' '} - {t('admin.landings.stats.paid', 'paid')} -
-
-
-
- {formatWithCurrency(stats.total_revenue_kopeks / CHART_COMMON.KOPEKS_DIVISOR)} -
-
{t('admin.landings.stats.revenue')}
-
-
-
{stats.total_gifts}
-
{t('admin.landings.stats.giftPurchases')}
-
-
-
- {stats.conversion_rate}% -
-
{t('admin.landings.stats.conversionRate')}
-
+ } + tone="warning" + /> + } + tone="success" + /> + } + tone="success" + /> + } + tone="accent" + /> +
+ + {/* Breakdown Cards */} +
+ } + tone="accent" + /> + } + /> + } + tone="accent" + /> + } + />
{/* Charts */}
{/* Daily Purchases & Revenue */} -
+

{t('admin.landings.stats.dailyChart')}

@@ -501,7 +532,7 @@ export default function AdminLandingStats() {
{/* Daily Purchases Bar Chart */} -
+

{t('admin.landings.stats.dailyPurchases', 'Daily purchases')}

@@ -557,7 +588,7 @@ export default function AdminLandingStats() {
{/* Tariff Distribution -- full width */} -
+

{t('admin.landings.stats.tariffChart')}

@@ -614,39 +645,9 @@ export default function AdminLandingStats() { )}
- {/* Additional Stats Row */} -
-
-
- {t('admin.landings.stats.avgPurchase')} -
-
- {formatWithCurrency(stats.avg_purchase_kopeks / CHART_COMMON.KOPEKS_DIVISOR)} -
-
-
-
- {t('admin.landings.stats.regularPurchases')} -
-
{stats.total_regular}
-
-
-
{t('admin.landings.stats.funnel')}
-
- {stats.total_created}{' '} - {t('admin.landings.stats.created')} - {' / '} - {stats.total_successful}{' '} - - {t('admin.landings.stats.paid', 'paid')} - -
-
-
- {/* Gift vs Regular Donut */} {stats.total_purchases > 0 && ( -
+

{t('admin.landings.stats.giftBreakdown')}

@@ -706,7 +707,7 @@ export default function AdminLandingStats() { )} {/* Purchases List */} -
+
{/* Header row: title + status filter */}

{t('admin.landings.purchases.title')}