From 5d9892d744c48eace330a0c312685875e3fab239 Mon Sep 17 00:00:00 2001 From: glpshchn <464976@niuitmo.ru> Date: Thu, 4 Dec 2025 23:11:28 +0300 Subject: [PATCH] Update files --- frontend/src/components/CommentsModal.jsx | 7 ++++++- frontend/src/components/FollowListModal.jsx | 7 ++++++- frontend/src/components/PostCard.css | 8 ++++++++ frontend/src/components/PostCard.jsx | 16 +++++++++++++--- frontend/src/components/PostMenu.jsx | 7 ++++++- frontend/src/utils/api.js | 11 ++++++++++- 6 files changed, 49 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/CommentsModal.jsx b/frontend/src/components/CommentsModal.jsx index d01be52..80ee082 100644 --- a/frontend/src/components/CommentsModal.jsx +++ b/frontend/src/components/CommentsModal.jsx @@ -50,7 +50,12 @@ export default function CommentsModal({ post, onClose, onUpdate }) { } return ( -
+
e.stopPropagation()} + onTouchStart={(e) => e.stopPropagation()} + onClick={handleOverlayClick} + >
e.stopPropagation()}> {/* Хедер */}
diff --git a/frontend/src/components/FollowListModal.jsx b/frontend/src/components/FollowListModal.jsx index 824b691..a2a2e1d 100644 --- a/frontend/src/components/FollowListModal.jsx +++ b/frontend/src/components/FollowListModal.jsx @@ -57,7 +57,12 @@ export default function FollowListModal({ users, title, onClose, currentUser }) } return ( -
+
e.stopPropagation()} + onTouchStart={(e) => e.stopPropagation()} + onClick={handleOverlayClick} + >
e.stopPropagation()}> {/* Хедер */}
diff --git a/frontend/src/components/PostCard.css b/frontend/src/components/PostCard.css index 196fc05..6aea3f5 100644 --- a/frontend/src/components/PostCard.css +++ b/frontend/src/components/PostCard.css @@ -269,6 +269,8 @@ flex-direction: column; animation: fadeIn 0.2s ease-out; overflow: hidden; + pointer-events: auto; + touch-action: none; } .fullview-header { @@ -286,6 +288,7 @@ will-change: transform; transform: translateZ(0); flex-shrink: 0; + pointer-events: auto; } .fullview-counter { @@ -328,6 +331,7 @@ align-items: center; justify-content: center; overflow: hidden; + pointer-events: none; } .fullview-content img { @@ -338,6 +342,7 @@ object-fit: contain; user-select: none; display: block; + pointer-events: none; } .fullview-nav-btn { @@ -355,6 +360,7 @@ backdrop-filter: blur(10px); transition: background 0.2s, opacity 0.2s; z-index: 10; + pointer-events: auto; } .fullview-nav-btn.prev { @@ -383,6 +389,7 @@ backdrop-filter: blur(10px); z-index: 10001; flex-shrink: 0; + pointer-events: auto; } .fullview-dot { @@ -392,6 +399,7 @@ background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: all 0.2s; + pointer-events: auto; } .fullview-dot.active { diff --git a/frontend/src/components/PostCard.jsx b/frontend/src/components/PostCard.jsx index 5f42b2f..a1c384c 100644 --- a/frontend/src/components/PostCard.jsx +++ b/frontend/src/components/PostCard.jsx @@ -263,8 +263,17 @@ export default function PostCard({ post, currentUser, onUpdate }) { {/* Fullview модал */} {showFullView && ( -
setShowFullView(false)}> -
+
e.stopPropagation()} + onTouchStart={(e) => e.stopPropagation()} + onClick={(e) => { + e.stopPropagation() + e.preventDefault() + setShowFullView(false) + }} + > +
e.stopPropagation()}> @@ -285,6 +294,7 @@ export default function PostCard({ post, currentUser, onUpdate }) { src={images[currentImageIndex]} alt={`Full view ${currentImageIndex + 1}`} draggable={false} + onClick={(e) => e.stopPropagation()} /> {images.length > 1 && ( @@ -305,7 +315,7 @@ export default function PostCard({ post, currentUser, onUpdate }) {
{images.length > 1 && ( -
+
e.stopPropagation()}> {images.map((_, index) => ( +
e.stopPropagation()} + onTouchStart={(e) => e.stopPropagation()} + onClick={handleOverlayClick} + >
e.stopPropagation()}>