mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-22 22:48:09 +02:00
Add icons to distinguish between feed, story, and combined posts
Integrates new icons for 'feed', 'story', and 'both' post types across CalendarListView, CalendarView, RecentPublications, and History components. Adds a post preview modal and refactors history view to display scheduled posts. Enhances CalendarView with auto-refresh. 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/d2GBAIk
This commit is contained in:
1 parent
09b936fa14
commit
0578d15288
4 files changed
+229
-61
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Facebook, Instagram, Clock, CheckCircle2, XCircle, Eye } from "lucide-react";
|
||||
import { Facebook, Instagram, Clock, CheckCircle2, XCircle, Eye, Image as ImageIcon, Smartphone } from "lucide-react";
|
||||
import { format } from "date-fns";
|
||||
import { fr } from "date-fns/locale";
|
||||
import type { ScheduledPost, SocialPage, Post, Media } from "@shared/schema";
|
||||
@@ -60,6 +60,22 @@ export default function RecentPublications() {
|
||||
}
|
||||
};
|
||||
|
||||
const getPostTypeIcon = (postType: string) => {
|
||||
if (postType === 'feed') {
|
||||
return <ImageIcon className="w-3.5 h-3.5" />;
|
||||
} else if (postType === 'story') {
|
||||
return <Smartphone className="w-3.5 h-3.5" />;
|
||||
} else if (postType === 'both') {
|
||||
return (
|
||||
<div className="flex gap-0.5">
|
||||
<ImageIcon className="w-3 h-3" />
|
||||
<Smartphone className="w-3 h-3" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
return (
|
||||
<Card className="rounded-2xl border-border/50 shadow-lg" data-testid="card-recent-publications">
|
||||
<CardHeader>
|
||||
@@ -136,9 +152,10 @@ export default function RecentPublications() {
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4 mt-2 text-xs text-muted-foreground">
|
||||
<span className="capitalize">
|
||||
{scheduledPost.postType === 'feed' ? 'Publication' :
|
||||
scheduledPost.postType === 'story' ? 'Story' : scheduledPost.postType}
|
||||
<span className="flex items-center gap-1 capitalize">
|
||||
{getPostTypeIcon(scheduledPost.postType)}
|
||||
{scheduledPost.postType === 'feed' ? 'Feed' :
|
||||
scheduledPost.postType === 'story' ? 'Story' : 'Feed & Story'}
|
||||
</span>
|
||||
<span>•</span>
|
||||
<span>
|
||||
|
||||
Reference in new issue
Block a user