feat: polish mobile hub design and navigation

This commit is contained in:
Michael committed 2026-02-13 10:56:35 +01:00
1 parent 08f82d4080
commit d89de20df2
2 files changed
+77 -49

No files matched your search

+72 -49
View File
@@ -1,6 +1,5 @@
import TopBar from "@/components/topbar"; import TopBar from "@/components/topbar";
import OngoingReels from "@/components/ongoing-reels"; import OngoingReels from "@/components/ongoing-reels";
import { useState } from "react";
import { Link, useLocation } from "wouter"; import { Link, useLocation } from "wouter";
import { import {
PlusCircle, PlusCircle,
@@ -12,81 +11,105 @@ import {
Clock, Clock,
Settings, Settings,
Users, Users,
Bot, ChevronRight,
Database, Sparkles
ChevronRight
} from "lucide-react"; } from "lucide-react";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
export default function DashboardMobile() { export default function DashboardMobile() {
const [, setLocation] = useLocation(); const [, setLocation] = useLocation();
const mainActions = [ const mainActions = [
{ icon: PlusCircle, label: "Nv. Post", href: "/new", color: "text-blue-500", bg: "bg-blue-500/10", border: "border-blue-500/20" }, { icon: PlusCircle, label: "Nv. Post", href: "/new", color: "text-blue-500", bg: "bg-blue-500/10", border: "border-blue-500/20", description: "Créer une publication" },
{ icon: Video, label: "Nv. Reel", href: "/reel", color: "text-purple-500", bg: "bg-purple-500/10", border: "border-purple-500/20" }, { icon: Video, label: "Nv. Reel", href: "/reel", color: "text-purple-500", bg: "bg-purple-500/10", border: "border-purple-500/20", description: "Générer une vidéo IA" },
{ icon: Calendar, label: "Calendrier", href: "/calendar", color: "text-amber-500", bg: "bg-amber-500/10", border: "border-amber-500/20" }, { icon: Calendar, label: "Calendrier", href: "/calendar", color: "text-amber-500", bg: "bg-amber-500/10", border: "border-amber-500/20", description: "Voir le planning" },
{ icon: BarChart3, label: "Analytics", href: "/analytics", color: "text-emerald-500", bg: "bg-emerald-500/10", border: "border-emerald-500/20" }, { icon: BarChart3, label: "Analytics", href: "/analytics", color: "text-emerald-500", bg: "bg-emerald-500/10", border: "border-emerald-500/20", description: "Statistiques" },
]; ];
const secondaryMenu = [ const secondaryMenu = [
{ icon: Images, label: "Médiathèque", href: "/media" }, { icon: Images, label: "Médiathèque", href: "/media" },
{ icon: Wand2, label: "Éditeur", href: "/image-editor" }, { icon: Wand2, label: "Éditeur d'images", href: "/image-editor" },
{ icon: Clock, label: "Historique", href: "/history" }, { icon: Clock, label: "Historique", href: "/history" },
{ icon: Users, label: "Pages", href: "/pages" }, { icon: Users, label: "Pages connectées", href: "/pages" },
{ icon: Settings, label: "Paramètres", href: "/settings" }, { icon: Settings, label: "Paramètres", href: "/settings" },
]; ];
// Admin items could be added here if needed, or integrated into secondaryMenu
return ( return (
<div className="flex h-screen overflow-hidden bg-background"> <div className="flex h-screen overflow-hidden bg-background">
<main className="flex-1 overflow-y-auto"> <main className="flex-1 overflow-y-auto">
<TopBar onMenuClick={() => { }} hideMenuButton={true} /> <TopBar onMenuClick={() => { }} hideMenuButton={true} />
<div className="p-4 space-y-6 pb-20"> <div className="p-4 space-y-6 pb-20">
{/* Header Section */}
<div className="flex items-center gap-3 mb-2">
<div className="w-12 h-12 rounded-xl bg-gradient-to-br from-primary to-secondary flex items-center justify-center shadow-lg">
<Sparkles className="w-6 h-6 text-white" />
</div>
<div>
<h1 className="text-2xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent">
Social Flow
</h1>
<p className="text-xs text-muted-foreground">Tableau de bord</p>
</div>
</div>
{/* 1. Status Section */} {/* 1. Status Section */}
<OngoingReels compact /> <OngoingReels compact />
{/* 2. Main Action Grid */} {/* 2. Main Action Grid */}
<div> <Card className="rounded-2xl border-border/50 shadow-lg overflow-hidden">
<h2 className="text-sm font-semibold text-muted-foreground mb-3 px-1">Actions Rapides</h2> <CardHeader className="p-4 pb-2">
<div className="grid grid-cols-2 gap-3"> <CardTitle className="text-base font-semibold">Actions Rapides</CardTitle>
{mainActions.map((item) => { </CardHeader>
const Icon = item.icon; <CardContent className="p-4">
return ( <div className="grid grid-cols-2 gap-3">
<Link key={item.href} href={item.href}> {mainActions.map((item) => {
<div className={` const Icon = item.icon;
flex flex-col items-center justify-center p-4 rounded-xl border cursor-pointer transition-all active:scale-95 return (
${item.bg} ${item.border} <Link key={item.href} href={item.href}>
`}> <div className={`
<Icon className={`w-8 h-8 mb-2 ${item.color}`} /> flex flex-col items-center justify-center p-4 rounded-xl border cursor-pointer transition-all active:scale-95 hover:opacity-80
<span className="font-medium text-sm">{item.label}</span> ${item.bg} ${item.border}
</div> `}>
</Link> <div className={`p-2 rounded-full bg-background/80 shadow-sm mb-2`}>
); <Icon className={`w-6 h-6 ${item.color}`} />
})} </div>
</div> <span className="font-semibold text-sm text-foreground">{item.label}</span>
</div> <span className="text-[10px] text-muted-foreground mt-1 text-center">{item.description}</span>
</div>
</Link>
);
})}
</div>
</CardContent>
</Card>
{/* 3. Secondary Menu List */} {/* 3. Secondary Menu List */}
<div> <Card className="rounded-2xl border-border/50 shadow-lg overflow-hidden">
<h2 className="text-sm font-semibold text-muted-foreground mb-3 px-1">Menu</h2> <CardHeader className="p-4 pb-2">
<div className="bg-card rounded-xl border border-border/50 shadow-sm divide-y divide-border/50"> <CardTitle className="text-base font-semibold">Menu</CardTitle>
{secondaryMenu.map((item) => { </CardHeader>
const Icon = item.icon; <CardContent className="p-0">
return ( <div className="divide-y divide-border/50">
<Link key={item.href} href={item.href}> {secondaryMenu.map((item) => {
<div className="flex items-center gap-3 p-4 hover:bg-muted/50 transition-colors cursor-pointer"> const Icon = item.icon;
<div className="p-2 rounded-lg bg-muted text-foreground"> return (
<Icon className="w-5 h-5" /> <Link key={item.href} href={item.href}>
<div className="flex items-center gap-4 p-4 hover:bg-muted/50 transition-colors cursor-pointer active:bg-muted">
<div className="p-2 rounded-lg bg-muted text-foreground">
<Icon className="w-5 h-5" />
</div>
<span className="flex-1 font-medium text-sm">{item.label}</span>
<ChevronRight className="w-4 h-4 text-muted-foreground" />
</div> </div>
<span className="flex-1 font-medium text-sm">{item.label}</span> </Link>
<ChevronRight className="w-4 h-4 text-muted-foreground" /> );
</div> })}
</Link> </div>
); </CardContent>
})} </Card>
</div>
</div>
</div> </div>
</main> </main>
</div> </div>
+5
View File
@@ -171,6 +171,11 @@ Ajout d'une fonctionnalité complète de création de Reels Facebook permettant
- [x] Create Secondary Menu List - [x] Create Secondary Menu List
- [x] Remove `StatsCards` and `RecentPublications` from main view - [x] Remove `StatsCards` and `RecentPublications` from main view
### Phase 18: Mobile Hub Polish ✨
- [x] **Entry Point**: Verify no forced redirects to `/new`.
- [x] **Hub Design**: Refactor `DashboardMobile` with `Card` components and consistent styling.
### Phase 13: Activation Agent BMad ✅ ### Phase 13: Activation Agent BMad ✅
- [x] Activer l'agent `bmad-master.md` - [x] Activer l'agent `bmad-master.md`