Update files
This commit is contained in:
parent
fea68d4514
commit
5d9892d744
|
|
@ -50,7 +50,12 @@ export default function CommentsModal({ post, onClose, onUpdate }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="comments-modal-overlay" onClick={handleOverlayClick}>
|
<div
|
||||||
|
className="comments-modal-overlay"
|
||||||
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
|
onTouchStart={(e) => e.stopPropagation()}
|
||||||
|
onClick={handleOverlayClick}
|
||||||
|
>
|
||||||
<div className="comments-modal" onClick={(e) => e.stopPropagation()}>
|
<div className="comments-modal" onClick={(e) => e.stopPropagation()}>
|
||||||
{/* Хедер */}
|
{/* Хедер */}
|
||||||
<div className="modal-header">
|
<div className="modal-header">
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,12 @@ export default function FollowListModal({ users, title, onClose, currentUser })
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="follow-list-modal-overlay" onClick={handleOverlayClick}>
|
<div
|
||||||
|
className="follow-list-modal-overlay"
|
||||||
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
|
onTouchStart={(e) => e.stopPropagation()}
|
||||||
|
onClick={handleOverlayClick}
|
||||||
|
>
|
||||||
<div className="follow-list-modal" onClick={(e) => e.stopPropagation()}>
|
<div className="follow-list-modal" onClick={(e) => e.stopPropagation()}>
|
||||||
{/* Хедер */}
|
{/* Хедер */}
|
||||||
<div className="follow-list-header">
|
<div className="follow-list-header">
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,8 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
animation: fadeIn 0.2s ease-out;
|
animation: fadeIn 0.2s ease-out;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
pointer-events: auto;
|
||||||
|
touch-action: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-header {
|
.fullview-header {
|
||||||
|
|
@ -286,6 +288,7 @@
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-counter {
|
.fullview-counter {
|
||||||
|
|
@ -328,6 +331,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-content img {
|
.fullview-content img {
|
||||||
|
|
@ -338,6 +342,7 @@
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
display: block;
|
display: block;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-nav-btn {
|
.fullview-nav-btn {
|
||||||
|
|
@ -355,6 +360,7 @@
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
transition: background 0.2s, opacity 0.2s;
|
transition: background 0.2s, opacity 0.2s;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-nav-btn.prev {
|
.fullview-nav-btn.prev {
|
||||||
|
|
@ -383,6 +389,7 @@
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
z-index: 10001;
|
z-index: 10001;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-dot {
|
.fullview-dot {
|
||||||
|
|
@ -392,6 +399,7 @@
|
||||||
background: rgba(255, 255, 255, 0.4);
|
background: rgba(255, 255, 255, 0.4);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullview-dot.active {
|
.fullview-dot.active {
|
||||||
|
|
|
||||||
|
|
@ -263,8 +263,17 @@ export default function PostCard({ post, currentUser, onUpdate }) {
|
||||||
|
|
||||||
{/* Fullview модал */}
|
{/* Fullview модал */}
|
||||||
{showFullView && (
|
{showFullView && (
|
||||||
<div className="image-fullview" onClick={() => setShowFullView(false)}>
|
<div
|
||||||
<div className="fullview-header">
|
className="image-fullview"
|
||||||
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
|
onTouchStart={(e) => e.stopPropagation()}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
|
setShowFullView(false)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="fullview-header" onClick={(e) => e.stopPropagation()}>
|
||||||
<button className="fullview-btn" onClick={(e) => { e.stopPropagation(); setShowFullView(false); }}>
|
<button className="fullview-btn" onClick={(e) => { e.stopPropagation(); setShowFullView(false); }}>
|
||||||
<X size={24} />
|
<X size={24} />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -285,6 +294,7 @@ export default function PostCard({ post, currentUser, onUpdate }) {
|
||||||
src={images[currentImageIndex]}
|
src={images[currentImageIndex]}
|
||||||
alt={`Full view ${currentImageIndex + 1}`}
|
alt={`Full view ${currentImageIndex + 1}`}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{images.length > 1 && (
|
{images.length > 1 && (
|
||||||
|
|
@ -305,7 +315,7 @@ export default function PostCard({ post, currentUser, onUpdate }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{images.length > 1 && (
|
{images.length > 1 && (
|
||||||
<div className="fullview-dots">
|
<div className="fullview-dots" onClick={(e) => e.stopPropagation()}>
|
||||||
{images.map((_, index) => (
|
{images.map((_, index) => (
|
||||||
<span
|
<span
|
||||||
key={index}
|
key={index}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,12 @@ export default function PostMenu({ post, currentUser, onClose, onDelete }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="post-menu-overlay" onClick={handleOverlayClick}>
|
<div
|
||||||
|
className="post-menu-overlay"
|
||||||
|
onMouseDown={(e) => e.stopPropagation()}
|
||||||
|
onTouchStart={(e) => e.stopPropagation()}
|
||||||
|
onClick={handleOverlayClick}
|
||||||
|
>
|
||||||
<div className="menu-header" onClick={(e) => e.stopPropagation()}>
|
<div className="menu-header" onClick={(e) => e.stopPropagation()}>
|
||||||
<button className="menu-close-btn" onClick={onClose}>
|
<button className="menu-close-btn" onClick={onClose}>
|
||||||
<X size={24} />
|
<X size={24} />
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,16 @@ export const banUser = async (userId, banned, days) => {
|
||||||
|
|
||||||
// Bot API
|
// Bot API
|
||||||
export const sendPhotoToTelegram = async (photoUrl) => {
|
export const sendPhotoToTelegram = async (photoUrl) => {
|
||||||
const response = await api.post('/bot/send-photo', { photoUrl })
|
const telegramUser = window.Telegram?.WebApp?.initDataUnsafe?.user
|
||||||
|
if (!telegramUser || !telegramUser.id) {
|
||||||
|
throw new Error('Не удалось получить ID пользователя из Telegram')
|
||||||
|
}
|
||||||
|
|
||||||
|
const response = await api.post('/bot/send-photo', {
|
||||||
|
userId: telegramUser.id,
|
||||||
|
photoUrl,
|
||||||
|
caption: 'Из Nakama'
|
||||||
|
})
|
||||||
return response.data
|
return response.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue