коммит заебал
This commit is contained in:
parent
b9c026a23c
commit
61a8740d37
@ -6,6 +6,7 @@ interface ImageWithFallbackProps {
|
||||
alt: string;
|
||||
className?: string;
|
||||
onClick?: () => void;
|
||||
onContextMenu?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
||||
maxRetries?: number;
|
||||
}
|
||||
|
||||
@ -14,6 +15,7 @@ const ImageWithFallback: React.FC<ImageWithFallbackProps> = ({
|
||||
alt,
|
||||
className = '',
|
||||
onClick,
|
||||
onContextMenu,
|
||||
maxRetries = 2 // По умолчанию 2 попытки автоматической перезагрузки
|
||||
}) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
@ -109,6 +111,7 @@ const ImageWithFallback: React.FC<ImageWithFallbackProps> = ({
|
||||
<div
|
||||
className={`${styles.container} ${className}`}
|
||||
onClick={handleClick}
|
||||
onContextMenu={onContextMenu}
|
||||
>
|
||||
{/* Показываем индикатор загрузки, если изображение загружается */}
|
||||
{loading && (
|
||||
|
||||
@ -50,14 +50,14 @@ const NotificationModal: React.FC<NotificationModalProps> = ({
|
||||
<div className={styles.buttons}>
|
||||
{showGalleryButton && (
|
||||
<button
|
||||
className={`${styles.button} ${styles.primaryButton}`}
|
||||
className={`${styles.button} ${styles.secondaryButton}`}
|
||||
onClick={onGalleryClick}
|
||||
>
|
||||
В галерею
|
||||
Отмена
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className={`${styles.button} ${!showGalleryButton ? styles.primaryButton : styles.secondaryButton}`}
|
||||
className={`${styles.button} ${styles.primaryButton}`}
|
||||
onClick={onContinueClick}
|
||||
>
|
||||
{continueButtonText}
|
||||
|
||||
@ -166,6 +166,9 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
|
||||
@ -310,6 +310,7 @@ const GalleryScreen: React.FC = () => {
|
||||
alt={`Стикер ${index + 1}`}
|
||||
className={styles.image}
|
||||
onClick={() => !isDeleteMode && image.url && setSelectedImage(image.url)}
|
||||
onContextMenu={(e: React.MouseEvent<HTMLDivElement>) => e.preventDefault()}
|
||||
maxRetries={3}
|
||||
/>
|
||||
{isDeleteMode && (
|
||||
@ -341,7 +342,7 @@ const GalleryScreen: React.FC = () => {
|
||||
title="Удаление стикера"
|
||||
message="Вы уверены, что хотите удалить этот стикер?"
|
||||
isLoading={isDeleting}
|
||||
showGalleryButton={false}
|
||||
showGalleryButton={true}
|
||||
continueButtonText="Удалить"
|
||||
onContinueClick={handleConfirmDelete}
|
||||
onGalleryClick={() => setSelectedForDelete(null)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user