fix: исправлены проблемы с UI

This commit is contained in:
kazachilo 2025-03-26 10:28:30 +03:00
parent 047665c07a
commit 68aae28529
4 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,7 @@
display: flex;
justify-content: center;
align-items: center;
touch-action: none;
touch-action: pan-y;
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
@ -19,7 +19,6 @@
object-fit: cover;
transition: opacity 0.3s ease;
pointer-events: none;
touch-action: none;
}
.hidden {

View File

@ -13,6 +13,7 @@ interface NotificationModalProps {
showButtons?: boolean; // Новый параметр для управления видимостью всех кнопок
continueButtonText?: string; // Новый параметр для изменения текста кнопки "Продолжить"
galleryButtonText?: string; // Новый параметр для изменения текста кнопки "В галерею"
isPrimaryGalleryButton?: boolean; // Новый параметр для управления стилем кнопки "В галерею"
}
const NotificationModal: React.FC<NotificationModalProps> = ({
@ -26,7 +27,8 @@ const NotificationModal: React.FC<NotificationModalProps> = ({
showGalleryButton = true, // По умолчанию кнопка "В галерею" видима
showButtons = true, // По умолчанию все кнопки видимы
continueButtonText = 'Продолжить', // По умолчанию текст кнопки "Продолжить"
galleryButtonText = 'В галерею' // По умолчанию текст кнопки "В галерею"
galleryButtonText = 'В галерею', // По умолчанию текст кнопки "В галерею"
isPrimaryGalleryButton = true // По умолчанию кнопка "В галерею" синяя
}) => {
if (!isVisible) return null;
@ -52,14 +54,14 @@ const NotificationModal: React.FC<NotificationModalProps> = ({
<div className={styles.buttons}>
{showGalleryButton && (
<button
className={`${styles.button} ${styles.secondaryButton}`}
className={`${styles.button} ${isPrimaryGalleryButton ? styles.primaryButton : styles.secondaryButton}`}
onClick={onGalleryClick}
>
{galleryButtonText}
</button>
)}
<button
className={`${styles.button} ${styles.primaryButton}`}
className={`${styles.button} ${isPrimaryGalleryButton ? styles.secondaryButton : styles.primaryButton}`}
onClick={onContinueClick}
>
{continueButtonText}

View File

@ -348,6 +348,7 @@ const GalleryScreen: React.FC = () => {
continueButtonText="Удалить"
onContinueClick={handleConfirmDelete}
onGalleryClick={() => setSelectedForDelete(null)}
isPrimaryGalleryButton={false}
/>
</div>
);

View File

@ -337,6 +337,7 @@ const Home: React.FC = () => {
showGalleryButton={showGalleryButton}
showButtons={showButtons}
continueButtonText={continueButtonText}
isPrimaryGalleryButton={true}
/>
{/* Компонент обработки обратной связи */}