fix: исправлены проблемы с UI
This commit is contained in:
parent
047665c07a
commit
68aae28529
@ -7,7 +7,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
touch-action: none;
|
touch-action: pan-y;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -19,7 +19,6 @@
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
transition: opacity 0.3s ease;
|
transition: opacity 0.3s ease;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
touch-action: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
|
|||||||
@ -13,6 +13,7 @@ interface NotificationModalProps {
|
|||||||
showButtons?: boolean; // Новый параметр для управления видимостью всех кнопок
|
showButtons?: boolean; // Новый параметр для управления видимостью всех кнопок
|
||||||
continueButtonText?: string; // Новый параметр для изменения текста кнопки "Продолжить"
|
continueButtonText?: string; // Новый параметр для изменения текста кнопки "Продолжить"
|
||||||
galleryButtonText?: string; // Новый параметр для изменения текста кнопки "В галерею"
|
galleryButtonText?: string; // Новый параметр для изменения текста кнопки "В галерею"
|
||||||
|
isPrimaryGalleryButton?: boolean; // Новый параметр для управления стилем кнопки "В галерею"
|
||||||
}
|
}
|
||||||
|
|
||||||
const NotificationModal: React.FC<NotificationModalProps> = ({
|
const NotificationModal: React.FC<NotificationModalProps> = ({
|
||||||
@ -26,7 +27,8 @@ const NotificationModal: React.FC<NotificationModalProps> = ({
|
|||||||
showGalleryButton = true, // По умолчанию кнопка "В галерею" видима
|
showGalleryButton = true, // По умолчанию кнопка "В галерею" видима
|
||||||
showButtons = true, // По умолчанию все кнопки видимы
|
showButtons = true, // По умолчанию все кнопки видимы
|
||||||
continueButtonText = 'Продолжить', // По умолчанию текст кнопки "Продолжить"
|
continueButtonText = 'Продолжить', // По умолчанию текст кнопки "Продолжить"
|
||||||
galleryButtonText = 'В галерею' // По умолчанию текст кнопки "В галерею"
|
galleryButtonText = 'В галерею', // По умолчанию текст кнопки "В галерею"
|
||||||
|
isPrimaryGalleryButton = true // По умолчанию кнопка "В галерею" синяя
|
||||||
}) => {
|
}) => {
|
||||||
if (!isVisible) return null;
|
if (!isVisible) return null;
|
||||||
|
|
||||||
@ -52,14 +54,14 @@ const NotificationModal: React.FC<NotificationModalProps> = ({
|
|||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
{showGalleryButton && (
|
{showGalleryButton && (
|
||||||
<button
|
<button
|
||||||
className={`${styles.button} ${styles.secondaryButton}`}
|
className={`${styles.button} ${isPrimaryGalleryButton ? styles.primaryButton : styles.secondaryButton}`}
|
||||||
onClick={onGalleryClick}
|
onClick={onGalleryClick}
|
||||||
>
|
>
|
||||||
{galleryButtonText}
|
{galleryButtonText}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<button
|
<button
|
||||||
className={`${styles.button} ${styles.primaryButton}`}
|
className={`${styles.button} ${isPrimaryGalleryButton ? styles.secondaryButton : styles.primaryButton}`}
|
||||||
onClick={onContinueClick}
|
onClick={onContinueClick}
|
||||||
>
|
>
|
||||||
{continueButtonText}
|
{continueButtonText}
|
||||||
|
|||||||
@ -348,6 +348,7 @@ const GalleryScreen: React.FC = () => {
|
|||||||
continueButtonText="Удалить"
|
continueButtonText="Удалить"
|
||||||
onContinueClick={handleConfirmDelete}
|
onContinueClick={handleConfirmDelete}
|
||||||
onGalleryClick={() => setSelectedForDelete(null)}
|
onGalleryClick={() => setSelectedForDelete(null)}
|
||||||
|
isPrimaryGalleryButton={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -337,6 +337,7 @@ const Home: React.FC = () => {
|
|||||||
showGalleryButton={showGalleryButton}
|
showGalleryButton={showGalleryButton}
|
||||||
showButtons={showButtons}
|
showButtons={showButtons}
|
||||||
continueButtonText={continueButtonText}
|
continueButtonText={continueButtonText}
|
||||||
|
isPrimaryGalleryButton={true}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Компонент обработки обратной связи */}
|
{/* Компонент обработки обратной связи */}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user