From 45ee7105efb562027dcca530c16a9aba6696a9ca Mon Sep 17 00:00:00 2001 From: Mahdy Arief Date: Fri, 10 Apr 2026 06:23:59 +0700 Subject: [PATCH] feat(blur): implement video blur annotation support --- .../video-editor/AnnotationOverlay.tsx | 11 ++++++++++ .../video-editor/AnnotationSettingsPanel.tsx | 20 +++++++++++++++++-- .../video-editor/projectPersistence.ts | 2 +- src/components/video-editor/types.ts | 2 +- src/i18n/locales/en/editor.json | 1 + src/i18n/locales/es/editor.json | 1 + src/i18n/locales/zh-CN/editor.json | 1 + src/lib/exporter/annotationRenderer.ts | 10 ++++++++++ 8 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/components/video-editor/AnnotationOverlay.tsx b/src/components/video-editor/AnnotationOverlay.tsx index 3260a542..d413fa07 100644 --- a/src/components/video-editor/AnnotationOverlay.tsx +++ b/src/components/video-editor/AnnotationOverlay.tsx @@ -111,6 +111,17 @@ export function AnnotationOverlay({ ); + case "blur": + return ( +
+ ); default: return null; } diff --git a/src/components/video-editor/AnnotationSettingsPanel.tsx b/src/components/video-editor/AnnotationSettingsPanel.tsx index 2cddf970..50aabdb5 100644 --- a/src/components/video-editor/AnnotationSettingsPanel.tsx +++ b/src/components/video-editor/AnnotationSettingsPanel.tsx @@ -1,7 +1,7 @@ import { useRef, useState, useEffect, useMemo } from "react"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Button } from "@/components/ui/button"; -import { Trash2, Type, Image as ImageIcon, Upload, Bold, Italic, Underline, AlignLeft, AlignCenter, AlignRight, ChevronDown, Info } from "lucide-react"; +import { Trash2, Type, Image as ImageIcon, Upload, Bold, Italic, Underline, AlignLeft, AlignCenter, AlignRight, ChevronDown, Info, SquareDashed } from "lucide-react"; import { toast } from "sonner"; import Block from '@uiw/react-color-block'; import type { AnnotationRegion, AnnotationType, ArrowDirection, FigureData } from "./types"; @@ -128,7 +128,7 @@ export function AnnotationSettingsPanel({ {/* Type Selector */} onTypeChange(value as AnnotationType)} className="mb-6"> - + {t('annotations.text')} @@ -143,6 +143,10 @@ export function AnnotationSettingsPanel({ {t('annotations.arrow')} + + + {t('annotations.blur')} + {/* Text Content */} @@ -499,6 +503,18 @@ export function AnnotationSettingsPanel({
+ + +
+
+ +
+

{t('annotations.blur')}

+

+ Resize and reposition the box on the video to blur sensitive information. +

+
+