feat: add ViewCounter enhancements and file upload progress tracking

- Improved `ViewCounter` with visibility-based view increment using `IntersectionObserver` and 50% video progress tracking.
- Added real-time file upload progress updates via Socket.io, including status and percentage feedback.
- Integrated `ViewCounter` dynamically into `ContentCard` and removed redundant instances from static pages.
- Updated backend upload logic to emit progress updates at different stages via the `EventsGateway`.
This commit is contained in:
Mathis HERRIOT
2026-01-29 14:57:44 +01:00
parent 9db3067721
commit 29b1db4aed
7 changed files with 159 additions and 22 deletions

View File

@@ -5,7 +5,6 @@ import { notFound } from "next/navigation";
import { CommentSection } from "@/components/comment-section";
import { ContentCard } from "@/components/content-card";
import { Button } from "@/components/ui/button";
import { ViewCounter } from "@/components/view-counter";
import { ContentService } from "@/services/content.service";
export const revalidate = 3600; // ISR: Revalider toutes les heures
@@ -42,7 +41,6 @@ export default async function MemePage({
return (
<div className="max-w-4xl mx-auto py-8 px-4">
<ViewCounter contentId={content.id} />
<Link
href="/"
className="inline-flex items-center text-sm mb-6 hover:text-primary transition-colors"