From 7defd9e596c9e2e6cf56611ef0709f10c9ce930b Mon Sep 17 00:00:00 2001 From: DeathKaioken Date: Wed, 14 Jan 2026 01:22:08 +0100 Subject: [PATCH] beautify: added waves bg --- src/app/admin/page.tsx | 282 ++++++++++++++++-------------- src/app/affiliate-links/page.tsx | 215 +++++++++++++---------- src/app/components/curvedLoop.tsx | 2 +- src/app/dashboard/page.tsx | 78 +++++++-- 4 files changed, 337 insertions(+), 240 deletions(-) diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 5a6727a..8227eb4 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -1,6 +1,7 @@ 'use client' import PageLayout from '../components/PageLayout' +import Waves from '../components/waves' import { UsersIcon, ExclamationTriangleIcon, @@ -84,74 +85,94 @@ export default function AdminDashboardPage() { return ( -
-
- {/* Header */} -
-
-

Admin Dashboard

-

- Manage all administrative features, user management, permissions, and global settings. -

-
-
+
+ - {/* Warning banner */} -
- -
-

- Warning: Settings and actions below this point can have consequences for the entire system! -

-

- Manage all administrative features, user management, permissions, and global settings. -

-
-
- - {/* Stats Card */} -
-
-
Total Users
-
{displayStats.totalUsers}
-
-
-
Admins
-
{displayStats.adminUsers}
-
-
-
Active
-
{displayStats.activeUsers}
-
-
-
Pending Verification
-
{displayStats.verificationPending}
-
-
-
Personal
-
{displayStats.personalUsers}
-
-
-
Company
-
{displayStats.companyUsers}
-
-
- - {/* Management Shortcuts Card */} -
-
-
-
- -
+
+
+
+ {/* Header */} +
-

Management Shortcuts

-

- Quick access to common admin modules. +

Admin Dashboard

+

+ Manage all administrative features, user management, permissions, and global settings. +

+
+
+ + {/* Warning banner */} +
+ +
+

+ Warning: Settings and actions below this point can have consequences for the entire system! +

+

+ Manage all administrative features, user management, permissions, and global settings.

-
+ + {/* Stats Card */} +
+
+
Total Users
+
{displayStats.totalUsers}
+
+
+
Admins
+
{displayStats.adminUsers}
+
+
+
Active
+
{displayStats.activeUsers}
+
+
+
Pending Verification
+
{displayStats.verificationPending}
+
+
+
Personal
+
{displayStats.personalUsers}
+
+
+
Company
+
{displayStats.companyUsers}
+
+
+ + {/* Management Shortcuts Card */} +
+
+
+
+ +
+
+

Management Shortcuts

+

+ Quick access to common admin modules. +

+
+
+
{/* Matrix Management */} -
-
-
- - {/* Server Status & Logs */} -
-
-
- -
-
-

- Server Status & Logs -

-

- System health, resource usage & recent error insights. -

-
-
- -
- {/* Metrics */} -
-
- -

- Server Status:{' '} - - {serverStats.status === 'Online' ? 'Server Online' : 'Offline'} - -

-
-
-

Uptime: {serverStats.uptime}

-

CPU Usage: {serverStats.cpu}

-

Memory Usage: {serverStats.memory} GB

-
-
- - Autoscaled environment (mock) +
- {/* Divider */} -
+ {/* Server Status & Logs */} +
+
+
+ +
+
+

+ Server Status & Logs +

+

+ System health, resource usage & recent error insights. +

+
+
- {/* Logs */} -
-

- Recent Error Logs -

- {serverStats.recentErrors.length === 0 && ( -

- No recent logs. -

- )} - {/* Placeholder for future logs list */} - {/* TODO: Replace with mapped log entries */} -
- +
+ {/* Metrics */} +
+
+ +

+ Server Status:{' '} + + {serverStats.status === 'Online' ? 'Server Online' : 'Offline'} + +

+
+
+

Uptime: {serverStats.uptime}

+

CPU Usage: {serverStats.cpu}

+

Memory Usage: {serverStats.memory} GB

+
+
+ + Autoscaled environment (mock) +
+
+ + {/* Divider */} +
+ + {/* Logs */} +
+

+ Recent Error Logs +

+ {serverStats.recentErrors.length === 0 && ( +

+ No recent logs. +

+ )} + {/* Placeholder for future logs list */} + {/* TODO: Replace with mapped log entries */} +
+ +
+
-
- -
+
+
) diff --git a/src/app/affiliate-links/page.tsx b/src/app/affiliate-links/page.tsx index 6887837..173aaf1 100644 --- a/src/app/affiliate-links/page.tsx +++ b/src/app/affiliate-links/page.tsx @@ -2,6 +2,7 @@ import { useEffect, useState, useMemo } from 'react' import PageLayout from '../components/PageLayout' +import Waves from '../components/waves' type Affiliate = { id: string @@ -89,105 +90,127 @@ export default function AffiliateLinksPage() { return ( -
-
- {/* Header (aligned with management pages) */} -
-
-

Affiliate Partners

-

- Discover our trusted partners and earn commissions through affiliate links. -

-
- {/* NEW: Category filter */} -
- - -
-
+
+ - {/* States */} - {loading && ( -
-
-

Loading affiliate partners...

-
- )} - - {error && !loading && ( -
- {error} -
- )} - - {!loading && !error && posts.length === 0 && ( -
- No affiliate partners available at the moment. -
- )} - - {/* Cards (aligned to white panels, border, shadow) */} - {!loading && !error && posts.length > 0 && ( -
- {posts.map((post) => { - // NEW: highlight when matches selected category (keep all visible) - const isHighlighted = selectedCategory !== 'all' && post.category.title === selectedCategory - return ( -
+
+
+ {/* Header (aligned with management pages) */} +
+
+

Affiliate Partners

+

+ Discover our trusted partners and earn commissions through affiliate links. +

+
+ {/* NEW: Category filter */} +
+ + +
+
+ + {/* States */} + {loading && ( +
+
+

Loading affiliate partners...

+
+ )} + + {error && !loading && ( +
+ {error} +
+ )} + + {!loading && !error && posts.length === 0 && ( +
+ No affiliate partners available at the moment. +
+ )} + + {/* Cards (aligned to white panels, border, shadow) */} + {!loading && !error && posts.length > 0 && ( +
+ {posts.map((post) => { + // NEW: highlight when matches selected category (keep all visible) + const isHighlighted = selectedCategory !== 'all' && post.category.title === selectedCategory + return ( + + ) + })} +
+ )}
- )} -
+
+
) diff --git a/src/app/components/curvedLoop.tsx b/src/app/components/curvedLoop.tsx index 07b22e4..ce2c37e 100644 --- a/src/app/components/curvedLoop.tsx +++ b/src/app/components/curvedLoop.tsx @@ -13,7 +13,7 @@ interface CurvedLoopProps { const CurvedLoop: FC = ({ marqueeText = '', - speed = 2, + speed = 1, className, curveAmount = -50, direction = 'left', diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 2961e6a..2e0404c 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -5,6 +5,7 @@ import { useRouter } from 'next/navigation' import useAuthStore from '../store/authStore' import Header from '../components/nav/Header' import Footer from '../components/Footer' +import Waves from '../components/waves' import { ShoppingBagIcon, UsersIcon, @@ -18,6 +19,7 @@ export default function DashboardPage() { const router = useRouter() const user = useAuthStore(state => state.user) const isAuthReady = useAuthStore(state => state.isAuthReady) + const isShopEnabled = process.env.NEXT_PUBLIC_SHOW_SHOP !== 'false' // Redirect if not logged in (only after auth is ready) useEffect(() => { @@ -55,7 +57,9 @@ export default function DashboardPage() { description: 'Explore sustainable products', icon: ShoppingBagIcon, href: '/shop', - color: 'bg-blue-500' + color: 'bg-blue-500', + disabled: !isShopEnabled, + disabledText: 'This is currently disabled.' }, { title: 'Browse Affiliate Links', @@ -112,11 +116,31 @@ export default function DashboardPage() { ] return ( -
-
- -
-
+
+ + +
+
+ +
+
+
{/* Welcome Section */}

@@ -172,20 +196,46 @@ export default function DashboardPage() { {quickActions.map((action, index) => ( @@ -248,11 +298,13 @@ export default function DashboardPage() { 2 weeks ago

+
-
- -
) } \ No newline at end of file