Update application UI with a modern and streamlined design

Revamp the entire UI with a new theme, enhancing readability and modern aesthetics across all components, including AI chat, calendar, media uploads, and user management sections.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/nriKMjY
This commit is contained in:
michaelschal committed 2025-10-04 10:13:34 +00:00
1 parent c208939745
commit 63ae963cd3
18 files changed
+566 -473

No files matched your search

+58 -35
View File
@@ -1,6 +1,7 @@
import { Button } from "@/components/ui/button";
import { useQuery } from "@tanstack/react-query";
import { Plus } from "lucide-react";
import { Plus, Users } from "lucide-react";
import { SiFacebook, SiInstagram } from "react-icons/si";
export default function ManagedPages() {
const { data: pages, isLoading } = useQuery({
@@ -9,11 +10,11 @@ export default function ManagedPages() {
if (isLoading) {
return (
<div className="bg-card rounded-lg border border-border p-6">
<div className="skeleton h-8 w-48 mb-4" />
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
{[1, 2, 3, 4].map((i) => (
<div key={i} className="skeleton h-32 rounded-lg" />
<div className="bg-card rounded-2xl border border-border/50 p-8 shadow-lg">
<div className="skeleton h-8 w-48 mb-6 rounded-lg" />
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{[1, 2, 3].map((i) => (
<div key={i} className="skeleton h-40 rounded-xl" />
))}
</div>
</div>
@@ -21,56 +22,78 @@ export default function ManagedPages() {
}
return (
<div className="bg-card rounded-lg border border-border overflow-hidden">
<div className="border-b border-border p-4 flex items-center justify-between">
<div>
<h3 className="font-semibold text-foreground">Pages gérées</h3>
<p className="text-sm text-muted-foreground mt-1">
Gérez vos pages Facebook et Instagram connectées
</p>
<div className="bg-card rounded-2xl border border-border/50 overflow-hidden shadow-lg">
<div className="border-b border-border/50 p-6 bg-gradient-to-r from-primary/5 to-secondary/5">
<div className="flex items-center justify-between">
<div className="flex items-center gap-4">
<div className="w-12 h-12 rounded-xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center shadow-lg">
<Users className="text-white w-6 h-6" />
</div>
<div>
<h3 className="text-lg font-semibold text-foreground">Pages gérées</h3>
<p className="text-sm text-muted-foreground">
{(pages as any[])?.length || 0} page(s) connectée(s)
</p>
</div>
</div>
<Button
className="bg-gradient-to-r from-primary to-secondary hover:opacity-90 rounded-xl"
data-testid="button-connect-page"
>
<Plus className="w-4 h-4 mr-2" />
Connecter une page
</Button>
</div>
<Button data-testid="button-connect-page">
<Plus className="w-4 h-4 mr-2" />
Connecter une page
</Button>
</div>
<div className="p-6">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<div className="p-8">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{pages && (pages as any[]).length > 0 ? (
(pages as any[]).map((page: any) => (
<div
key={page.id}
className="border border-border rounded-lg p-4 hover:shadow-lg transition-all cursor-pointer"
className="border border-border/50 rounded-2xl p-6 hover:shadow-xl hover:border-primary/30 transition-all cursor-pointer bg-card"
data-testid={`page-card-${page.id}`}
>
<div className="flex items-start justify-between mb-3">
<div className="flex items-start justify-between mb-5">
<div className={`
w-12 h-12 rounded-lg flex items-center justify-center
${page.platform === "facebook" ? "bg-chart-1/10" : "bg-chart-5/10"}
w-14 h-14 rounded-xl flex items-center justify-center shadow-md
${page.platform === "facebook" ? "bg-[#1877F2]/10" : "bg-[#E4405F]/10"}
`}>
<i className={`
fab text-2xl
${page.platform === "facebook" ? "fa-facebook text-chart-1" : "fa-instagram text-chart-5"}
`}></i>
{page.platform === "facebook" ? (
<SiFacebook className="text-[#1877F2] text-2xl" />
) : (
<SiInstagram className="text-[#E4405F] text-2xl" />
)}
</div>
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-chart-2 text-white">
<span className={`
inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold
${page.isActive === "true" ? "bg-success/20 text-success" : "bg-muted text-muted-foreground"}
`}>
{page.isActive === "true" ? "Actif" : "Inactif"}
</span>
</div>
<h4 className="font-semibold text-foreground mb-1">{page.pageName}</h4>
<p className="text-xs text-muted-foreground mb-3">
<h4 className="font-semibold text-foreground text-lg mb-2">{page.pageName}</h4>
<p className="text-sm text-muted-foreground mb-4 font-medium">
{page.platform === "facebook" ? "Facebook Page" : "Instagram Business"}
</p>
<div className="flex items-center justify-between text-xs text-muted-foreground">
<span>{page.followersCount?.toLocaleString() || 0} abonnés</span>
<div className="flex items-center justify-between pt-4 border-t border-border/50">
<div className="flex items-center gap-2">
<Users className="w-4 h-4 text-muted-foreground" />
<span className="text-sm text-muted-foreground font-medium">
{page.followersCount?.toLocaleString() || 0} abonnés
</span>
</div>
</div>
</div>
))
) : (
<div className="col-span-full text-center py-12">
<p className="text-muted-foreground mb-4">Aucune page connectée</p>
<Button>
<div className="col-span-full text-center py-16">
<div className="w-20 h-20 rounded-2xl bg-muted/30 flex items-center justify-center mx-auto mb-6">
<Users className="w-10 h-10 text-muted-foreground opacity-50" />
</div>
<p className="text-muted-foreground mb-6 text-lg">Aucune page connectée</p>
<Button className="bg-gradient-to-r from-primary to-secondary hover:opacity-90 rounded-xl">
<Plus className="w-4 h-4 mr-2" />
Connecter votre première page
</Button>