feat(admin,branding): Add favicon support and video blur component
- Add favicon_url column to nodes table via database migration - Create favicon upload endpoint with media handling - Implement favicon upload UI in admin panel with preview - Add favicon removal functionality in admin settings - Create BlurredVideo component for improved video rendering - Update PostCard to use new BlurredVideo component - Update node schema to include favicon_url field - Add favicon upload state management and error handling - Enables customization of browser tab icon for node branding
This commit is contained in:
@@ -8,6 +8,7 @@ import { Post } from '@/lib/types';
|
||||
import { useAuth } from '@/lib/contexts/AuthContext';
|
||||
import { useToast } from '@/lib/contexts/ToastContext';
|
||||
import { VideoEmbed } from '@/components/VideoEmbed';
|
||||
import BlurredVideo from '@/components/BlurredVideo';
|
||||
import { formatFullHandle } from '@/lib/utils/handle';
|
||||
|
||||
// Component for link preview image that hides on error
|
||||
@@ -516,19 +517,13 @@ export function PostCard({ post, onLike, onRepost, onComment, onDelete, onHide,
|
||||
return (
|
||||
<div className="post-media-item" key={item.id}>
|
||||
{isVideo ? (
|
||||
<video
|
||||
<BlurredVideo
|
||||
src={item.url}
|
||||
autoPlay
|
||||
muted
|
||||
loop
|
||||
playsInline
|
||||
preload="metadata"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
const video = e.currentTarget;
|
||||
video.muted = !video.muted;
|
||||
}}
|
||||
title="Click to toggle sound"
|
||||
/>
|
||||
) : (
|
||||
<img src={item.url} alt={item.altText || 'Post media'} loading="lazy" />
|
||||
|
||||
Reference in New Issue
Block a user