feat: Implement rich media messaging for images, files, and GIFs, and add message read/delivery status indicators.

This commit is contained in:
pradeepkumar
2026-02-21 22:11:42 +05:30
parent 3d2171e0bb
commit c5dc139633
12 changed files with 1237 additions and 118 deletions

View File

@@ -5,6 +5,7 @@ import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import { Footer } from '@/components/layout/Footer';
import { CommonHeader } from '@/components/layout/CommonHeader';
import { PresenceProvider } from '@/components/providers/presence-provider';
export default function AgentLayout({
children,
@@ -38,22 +39,24 @@ export default function AgentLayout({
}
return (
<div className="min-h-screen bg-white flex flex-col">
{/* Main Content Area */}
<main className="flex-1">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
{/* Header Bar */}
<CommonHeader />
<PresenceProvider>
<div className="min-h-screen bg-white flex flex-col">
{/* Main Content Area */}
<main className="flex-1">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
{/* Header Bar */}
<CommonHeader />
{/* Page Content */}
<div className="mt-6">
{children}
{/* Page Content */}
<div className="mt-6">
{children}
</div>
</div>
</div>
</main>
</main>
{/* Footer */}
<Footer />
</div>
{/* Footer */}
<Footer />
</div>
</PresenceProvider>
);
}

View File

@@ -5,6 +5,7 @@ import { useRouter, usePathname } from 'next/navigation';
import { useEffect } from 'react';
import { Footer } from '@/components/layout/Footer';
import { CommonHeader } from '@/components/layout/CommonHeader';
import { PresenceProvider } from '@/components/providers/presence-provider';
// Pages that don't require authentication
const publicPaths = [
@@ -77,38 +78,40 @@ export default function UserLayout({
}
return (
<div className="min-h-screen flex flex-col">
{isDashboard ? (
<>
{/* Main Content with Header Overlay for Dashboard */}
<main className="flex-1 relative">
{/* Header overlaying the content */}
<div className="absolute top-0 left-0 right-0 z-50 px-4 py-3">
<PresenceProvider>
<div className="min-h-screen flex flex-col">
{isDashboard ? (
<>
{/* Main Content with Header Overlay for Dashboard */}
<main className="flex-1 relative">
{/* Header overlaying the content */}
<div className="absolute top-0 left-0 right-0 z-50 px-4 py-3">
<div className="max-w-7xl mx-auto">
<CommonHeader />
</div>
</div>
{children}
</main>
</>
) : (
<>
{/* Regular Header for other pages */}
<div className="px-4 py-3 bg-white">
<div className="max-w-7xl mx-auto">
<CommonHeader />
</div>
</div>
{children}
</main>
</>
) : (
<>
{/* Regular Header for other pages */}
<div className="px-4 py-3 bg-white">
<div className="max-w-7xl mx-auto">
<CommonHeader />
</div>
</div>
{/* Main Content */}
<main className="flex-1">
{children}
</main>
</>
)}
{/* Main Content */}
<main className="flex-1">
{children}
</main>
</>
)}
{/* Footer */}
<Footer />
</div>
{/* Footer */}
<Footer />
</div>
</PresenceProvider>
);
}