mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-23 23:18:12 +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 { format, isSameDay, parseISO } from "date-fns";
|
||||
import { fr } from "date-fns/locale";
|
||||
import { Edit, Trash2, ChevronDown, ChevronUp, Eye } from "lucide-react";
|
||||
import { Edit, Trash2, ChevronDown, ChevronUp, Eye, Image, Smartphone } from "lucide-react";
|
||||
import { SiFacebook, SiInstagram } from "react-icons/si";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useState } from "react";
|
||||
@@ -15,6 +15,22 @@ interface CalendarListViewProps {
|
||||
export default function CalendarListView({ scheduledPosts, onEditPost, onDeletePost, onPreviewPost }: CalendarListViewProps) {
|
||||
const [expandedDates, setExpandedDates] = useState<Set<string>>(new Set());
|
||||
|
||||
const getPostTypeIcon = (postType: string) => {
|
||||
if (postType === 'feed') {
|
||||
return <Image className="w-4 h-4" />;
|
||||
} else if (postType === 'story') {
|
||||
return <Smartphone className="w-4 h-4" />;
|
||||
} else if (postType === 'both') {
|
||||
return (
|
||||
<div className="flex gap-0.5">
|
||||
<Image className="w-3 h-3" />
|
||||
<Smartphone className="w-3 h-3" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
// Group posts by date
|
||||
const groupedPosts = scheduledPosts.reduce((acc: { [key: string]: any[] }, post) => {
|
||||
if (!post.scheduledAt) return acc;
|
||||
@@ -115,6 +131,7 @@ export default function CalendarListView({ scheduledPosts, onEditPost, onDeleteP
|
||||
<div className="flex items-start justify-between gap-3">
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2 mb-1">
|
||||
{getPostTypeIcon(post.postType)}
|
||||
<span className="font-semibold text-lg text-foreground">{time}</span>
|
||||
<span className={`text-xs px-2 py-0.5 rounded-full font-medium ${
|
||||
isPending
|
||||
|
||||
Reference in new issue
Block a user