{/* Mobile Feed View */}
{isMobile ? (
-
v && setSortBy(v as FeedSortOption)}>
-
-
- Latest
-
-
-
- Top
-
-
+
+ v && setSortBy(v as FeedSortOption)}>
+
+
+ Latest
+
+
+
+ Top
+
+
+ {renderCategoryBreadcrumb()}
+
v && setViewMode(v as any)}>
@@ -54,25 +72,28 @@ const Index = () => {
{viewMode === 'list' ? (
-
+
) : (
-
window.location.href = `/post/${id}`} />
+ window.location.href = `/post/${id}`} />
)}
) : (
/* Desktop/Tablet Grid View */
-
v && setSortBy(v as FeedSortOption)}>
-
-
- Latest
-
-
-
- Top
-
-
+
+ v && setSortBy(v as FeedSortOption)}>
+
+
+ Latest
+
+
+
+ Top
+
+
+ {renderCategoryBreadcrumb()}
+
v && setViewMode(v as any)}>
@@ -88,11 +109,11 @@ const Index = () => {
{viewMode === 'grid' ? (
-
+
) : viewMode === 'large' ? (
-
+
) : (
-
+
)}
)}
diff --git a/packages/ui/src/pages/PlaygroundCanvas.tsx b/packages/ui/src/pages/PlaygroundCanvas.tsx
index d1813fb9..3d02b2d6 100644
--- a/packages/ui/src/pages/PlaygroundCanvas.tsx
+++ b/packages/ui/src/pages/PlaygroundCanvas.tsx
@@ -31,6 +31,9 @@ const PlaygroundCanvas = () => {
handleDumpJson,
handleLoadTemplate,
handleSaveTemplate,
+ handleDeleteTemplate,
+ handleToggleVisibility,
+ handleRenameLayout,
handlePasteJson,
handleLoadContext,
handleExportHtml,
@@ -141,6 +144,9 @@ const PlaygroundCanvas = () => {
onSendTestEmail={handleSendTestEmail}
templates={templates}
handleLoadTemplate={handleLoadTemplate}
+ handleDeleteTemplate={handleDeleteTemplate}
+ handleToggleVisibility={handleToggleVisibility}
+ handleRenameLayout={handleRenameLayout}
onSaveTemplateClick={() => setIsSaveDialogOpen(true)}
onPasteJsonClick={() => setIsPasteDialogOpen(true)}
handleDumpJson={handleDumpJson}
diff --git a/packages/ui/src/pages/Post.tsx b/packages/ui/src/pages/Post.tsx
index c44fde3e..86340e63 100644
--- a/packages/ui/src/pages/Post.tsx
+++ b/packages/ui/src/pages/Post.tsx
@@ -1,7 +1,7 @@
import { useState, useEffect, useRef, Suspense, lazy } from "react";
-import { useParams, useNavigate, useLocation, useSearchParams } from "react-router-dom";
+import { useParams, useNavigate, useSearchParams } from "react-router-dom";
import { useAuth } from "@/hooks/useAuth";
-import { Image as ImageIcon, Wand2, ArrowUp, ArrowDown, Plus, Save, X, Edit3, Heart, MessageCircle, Maximize, User, Download, Share2, ArrowLeft, Trash2, Map, MoreVertical, FileText, LayoutGrid, StretchHorizontal, Youtube, Music } from 'lucide-react';
+import { X } from 'lucide-react';
import { Button } from "@/components/ui/button";
import { toast } from "sonner";
import { usePostNavigation } from "@/hooks/usePostNavigation";
@@ -18,6 +18,8 @@ import { CompactRenderer } from "./Post/renderers/CompactRenderer";
import { usePostActions } from "./Post/usePostActions";
import { exportMarkdown, downloadMediaItem } from "./Post/PostActions";
import { DeleteDialog } from "./Post/components/DeleteDialogs";
+import { CategoryManager } from "@/components/widgets/CategoryManager";
+
import '@vidstack/react/player/styles/default/theme.css';
import '@vidstack/react/player/styles/default/layouts/video.css';
@@ -49,7 +51,7 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>
const navigate = useNavigate();
const { user } = useAuth();
- const { navigationData, setNavigationData, preloadImage } = usePostNavigation();
+ const { navigationData, setNavigationData } = usePostNavigation();
const { setWizardImage } = useWizardContext();
// ... state ...
@@ -347,6 +349,7 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>
);
};
+
const moveItem = (index: number, direction: 'up' | 'down') => {
const newItems = [...localMediaItems];
if (direction === 'up' && index > 0) {
@@ -409,15 +412,6 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>
}
};
- const fetchAuthorProfile = async () => {
- if (!mediaItem?.user_id) return;
- try {
- const profile = await db.fetchAuthorProfile(mediaItem.user_id);
- if (profile) setAuthorProfile(profile);
- } catch (error) {
- console.error('Error fetching author profile:', error);
- }
- };
useEffect(() => {
if (id) {
@@ -741,15 +735,6 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>
toast.success(translate("TikTok video added"));
};
- const checkIfLiked = async (targetId?: string) => {
- if (!user || !targetId) return;
- try {
- const liked = await db.checkLikeStatus(user.id, targetId);
- setIsLiked(liked);
- } catch (error) {
- console.error('Error checking like status:', error);
- }
- };
const handleLike = async () => {
if (!user || !mediaItem) {
@@ -920,6 +905,8 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>
onMediaSelect: setMediaItem,
onExpand: (item: MediaItem) => { setMediaItem(item); setShowLightbox(true); },
onDownload: handleDownload,
+ onCategoryManagerOpen: () => actions.setShowCategoryManager(true),
+
currentImageIndex,
videoPlaybackUrl,
@@ -1110,6 +1097,16 @@ const Post = ({ postId: propPostId, embedded = false, className }: PostProps) =>