diff --git a/.ai_agency/memory/backlog.json b/.ai_agency/memory/backlog.json index 34549ed..9fbc70b 100644 --- a/.ai_agency/memory/backlog.json +++ b/.ai_agency/memory/backlog.json @@ -88,7 +88,7 @@ "title": "بهینه‌سازی کارایی تصاویر و تبدیل تمام تگ‌های img به next/image در SafeImage", "priority": "HIGH", "assigned_role": "05_dev_frontend", - "status": "pending", + "status": "completed", "max_file_count": 3, "estimated_minutes": 15, "dependency_task_ids": [], diff --git a/.ai_agency/memory/state.json b/.ai_agency/memory/state.json index c1346e0..5adb25b 100644 --- a/.ai_agency/memory/state.json +++ b/.ai_agency/memory/state.json @@ -5,8 +5,8 @@ "checkpoint": { "stage": "REFACTORING", "active_agent": "05_dev_frontend", - "current_ticket_id": "TASK-107", - "sub_step_index": 7, + "current_ticket_id": "TASK-108", + "sub_step_index": 8, "total_sub_steps": 10 }, "execution_guards": { @@ -16,11 +16,11 @@ "token_usage_total": 0 }, "git_state": { - "active_branch": "feature/TASK-106", + "active_branch": "feature/TASK-107", "last_healthy_commit": "HEAD" }, "context_buffer": { - "last_agent_summary": "TASK-106 (Vitest testing suite for stores & calculation logic) successfully completed with 100% passing test assertions." + "last_agent_summary": "TASK-107 (Next.js Image component optimization for SafeImage and media galleries) completed and verified." }, - "last_updated": "2026-07-26T14:52:00Z" + "last_updated": "2026-07-26T14:55:00Z" } diff --git a/frontend/application/components/SafeImage.tsx b/frontend/application/components/SafeImage.tsx index 16de38d..dc1cfb5 100644 --- a/frontend/application/components/SafeImage.tsx +++ b/frontend/application/components/SafeImage.tsx @@ -1,9 +1,10 @@ "use client"; import React from "react"; +import Image from "next/image"; import { ImageOff, Sparkles } from "lucide-react"; import { cn } from "../lib/utils"; -interface SafeImageProps extends React.ImgHTMLAttributes { +interface SafeImageProps extends Omit, 'src'> { src?: string; alt?: string; className?: string; @@ -13,7 +14,7 @@ interface SafeImageProps extends React.ImgHTMLAttributes { export default function SafeImage({ src, - alt, + alt = "تصویر مکمل کانینا", className, imgClassName, fallbackText = "در حال بروزرسانی تصویر...", @@ -56,9 +57,12 @@ export default function SafeImage({ )} - {alt} setLoading(false)} onError={() => setError(true)} - referrerPolicy="no-referrer" - {...props} /> ); diff --git a/frontend/application/components/VetGallery.tsx b/frontend/application/components/VetGallery.tsx index 7a33b89..8e49192 100644 --- a/frontend/application/components/VetGallery.tsx +++ b/frontend/application/components/VetGallery.tsx @@ -5,6 +5,7 @@ import { motion, AnimatePresence } from "motion/react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useSettingsStore } from "../lib/store/settingsStore"; +import SafeImage from "./SafeImage"; const VIDEOS = [ { @@ -77,10 +78,11 @@ export default function VetGallery({ testimonials = [] }: { testimonials?: any[] >
- {video.title
diff --git a/frontend/application/components/VideosPage.tsx b/frontend/application/components/VideosPage.tsx index b6579a0..9d9aecb 100644 --- a/frontend/application/components/VideosPage.tsx +++ b/frontend/application/components/VideosPage.tsx @@ -2,6 +2,7 @@ import React, { useState } from "react"; import { motion, AnimatePresence } from "motion/react"; import { ChevronRight, PlayCircle, Star, ShieldCheck, X, Search, Clock, User } from "lucide-react"; +import SafeImage from "./SafeImage"; const ALL_VIDEOS = [ @@ -110,11 +111,11 @@ export default function VideosPage() { onClick={() => setSelectedVideo(video)} >
- {video.title}
diff --git a/frontend/application/next.config.ts b/frontend/application/next.config.ts index 9d54cdd..9a48391 100644 --- a/frontend/application/next.config.ts +++ b/frontend/application/next.config.ts @@ -1,6 +1,19 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { + images: { + unoptimized: true, + remotePatterns: [ + { + protocol: 'https', + hostname: '**', + }, + { + protocol: 'http', + hostname: '**', + }, + ], + }, async rewrites() { return [ {