diff --git a/web/src/components/AppLayout.tsx b/web/src/components/AppLayout.tsx index 32f65399..e4cd18dc 100644 --- a/web/src/components/AppLayout.tsx +++ b/web/src/components/AppLayout.tsx @@ -8,6 +8,11 @@ import { fetchUserTikis, getPrimaryRole, getTikiDisplayName, getTikiEmoji, getCi import { getAllScores, type UserScores } from '@pezkuwi/lib/scores'; import { getKycStatus } from '@pezkuwi/lib/kyc'; import LandingPageDesktop from './landing/LandingPageDesktop'; +import HeroSection from './HeroSection'; +import { NetworkStats } from './NetworkStats'; +import TrustScoreCalculator from './TrustScoreCalculator'; +import ChainSpecs from './ChainSpecs'; +import RewardDistribution from './RewardDistribution'; import { LanguageSwitcher } from './LanguageSwitcher'; import NotificationBell from './notifications/NotificationBell'; import ProposalWizard from './proposals/ProposalWizard'; @@ -56,11 +61,18 @@ interface AppItem { title: string; icon: string; imgIcon?: string; route: string; href?: string; comingSoon?: boolean; requiresAuth?: boolean; } -interface AppSection { titleKey: string; emoji: string; borderColor: string; apps: AppItem[]; } +interface AppSection { + titleKey: string; emoji: string; + headerBg: string; cardBg: string; iconBg: string; + apps: AppItem[]; +} const APP_SECTIONS: AppSection[] = [ { - titleKey: 'mobile.section.finance', emoji: '💰', borderColor: 'border-l-green-500', + titleKey: 'mobile.section.finance', emoji: '💰', + headerBg: 'bg-gradient-to-r from-green-900/80 to-green-800/60', + cardBg: 'bg-green-950/40 border border-green-700/30', + iconBg: 'hover:bg-green-900/40', apps: [ { title: 'mobile.app.wallet', icon: '👛', route: '/wallet' }, { title: 'mobile.app.bank', icon: '🏦', route: '/finance/bank' }, @@ -73,7 +85,10 @@ const APP_SECTIONS: AppSection[] = [ ], }, { - titleKey: 'mobile.section.governance', emoji: '🏛️', borderColor: 'border-l-red-500', + titleKey: 'mobile.section.governance', emoji: '🏛️', + headerBg: 'bg-gradient-to-r from-red-900/80 to-red-800/60', + cardBg: 'bg-red-950/40 border border-red-700/30', + iconBg: 'hover:bg-red-900/40', apps: [ { title: 'mobile.app.president', icon: '👑', route: '/elections', requiresAuth: true }, { title: 'mobile.app.assembly', icon: '🏛️', route: '/governance/assembly' }, @@ -86,7 +101,10 @@ const APP_SECTIONS: AppSection[] = [ ], }, { - titleKey: 'mobile.section.social', emoji: '💬', borderColor: 'border-l-blue-500', + titleKey: 'mobile.section.social', emoji: '💬', + headerBg: 'bg-gradient-to-r from-blue-900/80 to-blue-800/60', + cardBg: 'bg-blue-950/40 border border-blue-700/30', + iconBg: 'hover:bg-blue-900/40', apps: [ { title: 'mobile.app.whatsKurd', icon: '💬', route: '/social/whatskurd' }, { title: 'mobile.app.forum', icon: '📰', route: '/forum' }, @@ -99,7 +117,10 @@ const APP_SECTIONS: AppSection[] = [ ], }, { - titleKey: 'mobile.section.education', emoji: '📚', borderColor: 'border-l-yellow-500', + titleKey: 'mobile.section.education', emoji: '📚', + headerBg: 'bg-gradient-to-r from-amber-900/80 to-amber-800/60', + cardBg: 'bg-amber-950/40 border border-amber-700/30', + iconBg: 'hover:bg-amber-900/40', apps: [ { title: 'mobile.app.university', icon: '🎓', route: '/education/university' }, { title: 'mobile.app.perwerde', icon: '📖', route: '/education', requiresAuth: true }, @@ -477,7 +498,8 @@ const AppLayout: React.FC = () => {
) : ( /* ── LOGGED-IN DESKTOP HOME ── */ -
+ <> +
{/* Greeting row */} @@ -534,12 +556,17 @@ const AppLayout: React.FC = () => { {/* Section cards — 2-column grid */}
{APP_SECTIONS.map((section, sectionIdx) => ( -
-
-

- {t(section.titleKey)} {section.emoji} +
+ {/* Colored header */} +
+

+ {section.emoji} {t(section.titleKey)}

+ + {section.apps.length + (sectionIdx === 1 ? govExtras.length : 0)} apps +
+ {/* App icon grid */}
{section.apps.map((app) => { const needsLogin = app.requiresAuth && !user; @@ -548,7 +575,7 @@ const AppLayout: React.FC = () => { key={app.title} onClick={getAppClickHandler(app)} className={`flex flex-col items-center gap-1.5 py-3 px-2 rounded-xl transition-all active:scale-95 - ${app.comingSoon ? 'opacity-50' : 'hover:bg-gray-800/60'}`} + ${app.comingSoon ? 'opacity-40 cursor-default' : section.iconBg}`} >
{app.imgIcon ? ( @@ -559,7 +586,7 @@ const AppLayout: React.FC = () => { {app.comingSoon && 🔒} {needsLogin && !app.comingSoon && 🔑}
- + {t(app.title)} @@ -570,10 +597,10 @@ const AppLayout: React.FC = () => { @@ -584,6 +611,12 @@ const AppLayout: React.FC = () => {

+ + +
+
+
+ )} {/* Back-to-home button */} @@ -599,9 +632,9 @@ const AppLayout: React.FC = () => { )} - {/* ── BOTTOM TAB BAR (mirrors MobileHomeLayout) ── */} + {/* ── BOTTOM TAB BAR ── */}
-
+
navigate('/')} /> navigate('/be-citizen')} accent /> navigate('/dashboard')} /> @@ -685,7 +718,7 @@ function DesktopScoreCard({ icon, label, value, sub, color, onClick, actionLabel }) { return (
diff --git a/web/src/components/landing/LandingPageDesktop.tsx b/web/src/components/landing/LandingPageDesktop.tsx index a08de664..cd41adfd 100644 --- a/web/src/components/landing/LandingPageDesktop.tsx +++ b/web/src/components/landing/LandingPageDesktop.tsx @@ -315,7 +315,7 @@ const PalletItem: React.FC<{ // ─── Main component ─────────────────────────────────────────────────────────── -const LandingPageDesktop: React.FC = () => { +const LandingPageDesktop: React.FC<{ bodyOnly?: boolean }> = ({ bodyOnly = false }) => { const navigate = useNavigate(); const { t } = useTranslation(); const { api, assetHubApi, peopleApi, isApiReady, isAssetHubReady, isPeopleReady, selectedAccount, disconnectWallet, connectWallet } = usePezkuwi();