mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Update dashboard to show post history and allow direct photo uploads
Remove the calendar and analytics pages, and update the sidebar navigation. Add functionality for direct image uploads on the new post page. Update the favicon for the application. 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/G8GuKB7
This commit is contained in:
1 parent
d54d3a5e9c
commit
e69472d4b0
3 files changed
+1
-133
No files matched your search
@@ -12,7 +12,6 @@ import Calendar from "@/pages/calendar";
|
|||||||
import Media from "@/pages/media";
|
import Media from "@/pages/media";
|
||||||
import PagesManagement from "@/pages/pages";
|
import PagesManagement from "@/pages/pages";
|
||||||
import AI from "@/pages/ai";
|
import AI from "@/pages/ai";
|
||||||
import Analytics from "@/pages/analytics";
|
|
||||||
import History from "@/pages/history";
|
import History from "@/pages/history";
|
||||||
import Settings from "@/pages/settings";
|
import Settings from "@/pages/settings";
|
||||||
import SqlAdmin from "@/pages/sql";
|
import SqlAdmin from "@/pages/sql";
|
||||||
@@ -71,7 +70,6 @@ function Router() {
|
|||||||
<Route path="/media">{() => <ProtectedRoute component={Media} />}</Route>
|
<Route path="/media">{() => <ProtectedRoute component={Media} />}</Route>
|
||||||
<Route path="/pages">{() => <ProtectedRoute component={PagesManagement} />}</Route>
|
<Route path="/pages">{() => <ProtectedRoute component={PagesManagement} />}</Route>
|
||||||
<Route path="/ai">{() => <ProtectedRoute component={AI} />}</Route>
|
<Route path="/ai">{() => <ProtectedRoute component={AI} />}</Route>
|
||||||
<Route path="/analytics">{() => <ProtectedRoute component={Analytics} />}</Route>
|
|
||||||
<Route path="/history">{() => <ProtectedRoute component={History} />}</Route>
|
<Route path="/history">{() => <ProtectedRoute component={History} />}</Route>
|
||||||
<Route path="/settings">{() => <ProtectedRoute component={Settings} adminOnly />}</Route>
|
<Route path="/settings">{() => <ProtectedRoute component={Settings} adminOnly />}</Route>
|
||||||
<Route path="/sql">{() => <ProtectedRoute component={SqlAdmin} adminOnly />}</Route>
|
<Route path="/sql">{() => <ProtectedRoute component={SqlAdmin} adminOnly />}</Route>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Home, PlusCircle, Calendar, Images, Users, Bot, BarChart3, Clock, Settings, Database, UserCog, LogOut } from "lucide-react";
|
import { Home, PlusCircle, Calendar, Images, Users, Bot, Clock, Settings, Database, UserCog, LogOut } from "lucide-react";
|
||||||
import { Link, useLocation } from "wouter";
|
import { Link, useLocation } from "wouter";
|
||||||
import { useQuery, useMutation } from "@tanstack/react-query";
|
import { useQuery, useMutation } from "@tanstack/react-query";
|
||||||
import { apiRequest, queryClient } from "@/lib/queryClient";
|
import { apiRequest, queryClient } from "@/lib/queryClient";
|
||||||
@@ -42,7 +42,6 @@ export default function Sidebar() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const statsItems = [
|
const statsItems = [
|
||||||
{ icon: BarChart3, label: "Analyses", href: "/analytics" },
|
|
||||||
{ icon: Clock, label: "Historique", href: "/history" },
|
{ icon: Clock, label: "Historique", href: "/history" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,129 +0,0 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import { TrendingUp, Users, Eye, Heart, BarChart3 } from "lucide-react";
|
|
||||||
import Sidebar from "@/components/sidebar";
|
|
||||||
import TopBar from "@/components/topbar";
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
|
|
||||||
export default function Analytics() {
|
|
||||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
||||||
|
|
||||||
const { data: stats } = useQuery({
|
|
||||||
queryKey: ['/api/stats'],
|
|
||||||
});
|
|
||||||
|
|
||||||
const metrics = [
|
|
||||||
{
|
|
||||||
title: "Publications totales",
|
|
||||||
value: "0",
|
|
||||||
description: "Toutes plateformes",
|
|
||||||
icon: TrendingUp,
|
|
||||||
gradient: "from-primary to-primary/80",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Portée totale",
|
|
||||||
value: "0",
|
|
||||||
description: "Personnes atteintes",
|
|
||||||
icon: Users,
|
|
||||||
gradient: "from-secondary to-secondary/80",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Impressions",
|
|
||||||
value: "0",
|
|
||||||
description: "Vues totales",
|
|
||||||
icon: Eye,
|
|
||||||
gradient: "from-success to-success/80",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Engagement",
|
|
||||||
value: "0",
|
|
||||||
description: "Interactions totales",
|
|
||||||
icon: Heart,
|
|
||||||
gradient: "from-warning to-warning/80",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="flex h-screen overflow-hidden bg-background">
|
|
||||||
{sidebarOpen && (
|
|
||||||
<div
|
|
||||||
className="fixed inset-0 bg-black/50 z-40 lg:hidden"
|
|
||||||
onClick={() => setSidebarOpen(false)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className={`
|
|
||||||
fixed lg:static inset-y-0 left-0 z-50 transform transition-transform duration-300 ease-in-out
|
|
||||||
${sidebarOpen ? 'translate-x-0' : '-translate-x-full lg:translate-x-0'}
|
|
||||||
`}>
|
|
||||||
<Sidebar />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<main className="flex-1 overflow-y-auto">
|
|
||||||
<TopBar onMenuClick={() => setSidebarOpen(!sidebarOpen)} />
|
|
||||||
|
|
||||||
<div className="p-8 max-w-[1600px] mx-auto space-y-8">
|
|
||||||
<div>
|
|
||||||
<h1 className="text-3xl font-bold text-foreground">Analyses</h1>
|
|
||||||
<p className="text-muted-foreground mt-2">
|
|
||||||
Statistiques et performances de vos publications
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
||||||
{metrics.map((metric, index) => {
|
|
||||||
const Icon = metric.icon;
|
|
||||||
return (
|
|
||||||
<Card key={index} className="rounded-2xl border-border/50 shadow-lg overflow-hidden">
|
|
||||||
<CardHeader className="pb-4">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<CardTitle className="text-sm font-medium text-muted-foreground">
|
|
||||||
{metric.title}
|
|
||||||
</CardTitle>
|
|
||||||
<div className={`w-10 h-10 rounded-xl bg-gradient-to-br ${metric.gradient} flex items-center justify-center shadow-md`}>
|
|
||||||
<Icon className="w-5 h-5 text-white" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<div className="text-3xl font-bold" data-testid={`text-${metric.title.toLowerCase().replace(/\s+/g, '-')}`}>
|
|
||||||
{metric.value}
|
|
||||||
</div>
|
|
||||||
<p className="text-xs text-muted-foreground mt-2 font-medium">{metric.description}</p>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Card className="rounded-2xl border-border/50 shadow-lg">
|
|
||||||
<CardHeader className="border-b border-border/50 p-6 bg-gradient-to-r from-primary/5 to-secondary/5">
|
|
||||||
<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">
|
|
||||||
<BarChart3 className="text-white w-6 h-6" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<CardTitle className="text-lg">Fonctionnalité à venir</CardTitle>
|
|
||||||
<p className="text-sm text-muted-foreground mt-1">Graphiques et statistiques détaillées</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className="p-8">
|
|
||||||
<div className="text-center py-12">
|
|
||||||
<div className="w-20 h-20 rounded-2xl bg-muted/30 flex items-center justify-center mx-auto mb-6">
|
|
||||||
<BarChart3 className="w-10 h-10 text-muted-foreground opacity-50" />
|
|
||||||
</div>
|
|
||||||
<p className="text-muted-foreground text-lg mb-2">
|
|
||||||
Les analyses détaillées et les graphiques de performance seront disponibles prochainement.
|
|
||||||
</p>
|
|
||||||
<p className="text-sm text-muted-foreground">
|
|
||||||
Vous pourrez suivre l'évolution de vos statistiques au fil du temps
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user