diff --git a/app/(dashboard)/assets/page.tsx b/app/(dashboard)/assets/page.tsx index 526f39b..680e0f1 100644 --- a/app/(dashboard)/assets/page.tsx +++ b/app/(dashboard)/assets/page.tsx @@ -35,7 +35,7 @@ export default function GlobalAssetsPage() { )} - + Asset Library Guide @@ -43,14 +43,6 @@ export default function GlobalAssetsPage() {
-
-

Review & Approve

-

- Every asset starts as a draft. Use Approve or Reject to - triage. Select multiple assets with checkboxes for bulk actions. -

-
-

Repurpose

diff --git a/components/asset-card.tsx b/components/asset-card.tsx index 39af786..261f5f6 100644 --- a/components/asset-card.tsx +++ b/components/asset-card.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { Check, X, Play, Copy, Sparkles } from "lucide-react"; +import { Play, Copy, Sparkles, Send } from "lucide-react"; import { RepurposeModal } from "./repurpose-modal"; import { VariationModal } from "./variation-modal"; @@ -24,16 +24,16 @@ interface Asset { interface AssetCardProps { asset: Asset; - onStatusChange: (id: string, status: string) => void; selected?: boolean; onSelect?: (id: string) => void; + onPushToPostiz?: (assetIds: string[]) => void; } export function AssetCard({ asset, - onStatusChange, selected, onSelect, + onPushToPostiz, }: AssetCardProps) { const [repurposeOpen, setRepurposeOpen] = useState(false); const [variationOpen, setVariationOpen] = useState(false); @@ -144,18 +144,6 @@ export function AssetCard({ {asset.dimensions} )} - - {asset.status} -

{metadata.caption && ( @@ -184,33 +172,22 @@ export function AssetCard({ )} - {/* Actions — only for images and videos */} - {(isImage || isVideo) ? ( -
-
+ {/* Actions */} + {(isImage || isVideo) && ( +
+ {onPushToPostiz && ( - -
+ )} {isImage && ( -
+ <> -
+ )}
- ) : ( -

Auto-accepted

)}
diff --git a/components/asset-gallery.tsx b/components/asset-gallery.tsx index 9220824..88750a6 100644 --- a/components/asset-gallery.tsx +++ b/components/asset-gallery.tsx @@ -31,7 +31,6 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) const [filters, setFilters] = useState({ platform: "all", type: "all", - status: "all", }); const [search, setSearch] = useState(""); const [sort, setSort] = useState("newest"); @@ -41,7 +40,6 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) if (campaignId) params.set("campaignId", campaignId); if (filters.platform !== "all") params.set("platform", filters.platform); if (filters.type !== "all") params.set("type", filters.type); - if (filters.status !== "all") params.set("status", filters.status); if (search) params.set("search", search); fetch(`/api/assets?${params}`) @@ -54,17 +52,6 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) fetchAssets(); }, [fetchAssets]); - async function handleStatusChange(id: string, status: string) { - await fetch(`/api/assets/${id}`, { - method: "PATCH", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ status }), - }); - setAssets((prev) => - prev.map((a) => (a.id === id ? { ...a, status } : a)) - ); - } - function toggleSelect(id: string) { setSelectedIds((prev) => { const next = new Set(prev); @@ -74,22 +61,6 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) }); } - async function bulkUpdateStatus(status: string) { - await Promise.all( - Array.from(selectedIds).map((id) => - fetch(`/api/assets/${id}`, { - method: "PATCH", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ status }), - }) - ) - ); - setAssets((prev) => - prev.map((a) => (selectedIds.has(a.id) ? { ...a, status } : a)) - ); - setSelectedIds(new Set()); - } - const sortedAssets = [...assets].sort((a, b) => { switch (sort) { case "oldest": @@ -139,20 +110,6 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) - - @@ -173,30 +130,14 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) className="h-9 w-48" /> - {selectedIds.size > 0 && ( -
+ {selectedIds.size > 0 && onPushToPostiz && ( +
- - {onPushToPostiz && ( - - )}
)}
@@ -212,9 +153,9 @@ export function AssetGallery({ campaignId, onPushToPostiz }: AssetGalleryProps) ))}