From 61a8740d372598e80ec68d49b0a7751e8a651a07 Mon Sep 17 00:00:00 2001 From: kazachilo Date: Tue, 25 Mar 2025 18:08:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B5=D0=B1=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shared/ImageWithFallback.tsx | 3 +++ src/components/shared/NotificationModal.tsx | 6 +++--- src/screens/Gallery.module.css | 3 +++ src/screens/Gallery.tsx | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/shared/ImageWithFallback.tsx b/src/components/shared/ImageWithFallback.tsx index d841116..6ec746b 100644 --- a/src/components/shared/ImageWithFallback.tsx +++ b/src/components/shared/ImageWithFallback.tsx @@ -6,6 +6,7 @@ interface ImageWithFallbackProps { alt: string; className?: string; onClick?: () => void; + onContextMenu?: (e: React.MouseEvent) => void; maxRetries?: number; } @@ -14,6 +15,7 @@ const ImageWithFallback: React.FC = ({ alt, className = '', onClick, + onContextMenu, maxRetries = 2 // По умолчанию 2 попытки автоматической перезагрузки }) => { const [loading, setLoading] = useState(true); @@ -109,6 +111,7 @@ const ImageWithFallback: React.FC = ({
{/* Показываем индикатор загрузки, если изображение загружается */} {loading && ( diff --git a/src/components/shared/NotificationModal.tsx b/src/components/shared/NotificationModal.tsx index e9879fa..1923d1e 100644 --- a/src/components/shared/NotificationModal.tsx +++ b/src/components/shared/NotificationModal.tsx @@ -50,14 +50,14 @@ const NotificationModal: React.FC = ({
{showGalleryButton && ( )}