From 2690a0b91728bddfaa186e318177ac10a9f447c9 Mon Sep 17 00:00:00 2001
From: glpshchn <464976@niuitmo.ru>
Date: Tue, 4 Nov 2025 00:57:35 +0300
Subject: [PATCH] Update files
---
frontend/src/components/CommentsModal.css | 93 +++++++++++++----
frontend/src/components/CommentsModal.jsx | 35 ++++++-
frontend/src/components/PostMenu.css | 115 +++++++++++++++++++---
frontend/src/components/PostMenu.jsx | 59 ++++++-----
⚡_ПРОСТОЕ_РЕШЕНИЕ.txt | 46 +++++++++
✨_С_ПОСТОМ.txt | 54 ++++++++++
🔥_ИСПРАВЛЕНО_МЕНЮ.txt | 57 +++++++++++
7 files changed, 395 insertions(+), 64 deletions(-)
create mode 100644 ⚡_ПРОСТОЕ_РЕШЕНИЕ.txt
create mode 100644 ✨_С_ПОСТОМ.txt
create mode 100644 🔥_ИСПРАВЛЕНО_МЕНЮ.txt
diff --git a/frontend/src/components/CommentsModal.css b/frontend/src/components/CommentsModal.css
index 36415fd..ee3ec9d 100644
--- a/frontend/src/components/CommentsModal.css
+++ b/frontend/src/components/CommentsModal.css
@@ -1,26 +1,21 @@
-/* Максимально простое решение */
+/* Простое решение - модалка на весь экран */
.comments-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
- background: rgba(0, 0, 0, 0.5);
+ background: var(--bg-secondary);
z-index: 1000;
display: flex;
- align-items: flex-end;
- padding-bottom: 80px;
+ flex-direction: column;
}
.comments-modal {
width: 100%;
- max-width: 600px;
- max-height: 60vh;
- background: var(--bg-secondary);
- border-radius: 16px 16px 0 0;
+ height: 100%;
display: flex;
flex-direction: column;
- margin: 0 auto;
}
.comments-modal .modal-header {
@@ -30,6 +25,7 @@
align-items: center;
justify-content: space-between;
flex-shrink: 0;
+ background: var(--bg-secondary);
}
.comments-modal .modal-header h2 {
@@ -39,31 +35,85 @@
}
.comments-modal .close-btn {
- width: 32px;
- height: 32px;
+ width: 40px;
+ height: 40px;
border-radius: 50%;
- background: transparent;
+ background: var(--bg-primary);
color: var(--text-primary);
display: flex;
align-items: center;
justify-content: center;
+ border: none;
+ cursor: pointer;
}
.comments-modal .close-btn svg {
stroke: currentColor;
}
+/* Превью поста */
+.post-preview {
+ padding: 16px;
+ border-bottom: 1px solid var(--divider-color);
+ background: var(--bg-secondary);
+}
+
+.preview-author {
+ display: flex;
+ gap: 12px;
+ margin-bottom: 12px;
+}
+
+.preview-avatar {
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ object-fit: cover;
+}
+
+.preview-name {
+ font-size: 15px;
+ font-weight: 600;
+ color: var(--text-primary);
+}
+
+.preview-username {
+ font-size: 13px;
+ color: var(--text-secondary);
+}
+
+.preview-content {
+ font-size: 15px;
+ line-height: 1.5;
+ color: var(--text-primary);
+ margin-bottom: 12px;
+ white-space: pre-wrap;
+}
+
+.preview-image {
+ border-radius: 12px;
+ overflow: hidden;
+ max-height: 200px;
+}
+
+.preview-image img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
.comments-list {
flex: 1;
overflow-y: auto;
padding: 16px;
+ padding-bottom: 100px; /* Отступ для формы и меню */
display: flex;
flex-direction: column;
gap: 16px;
}
.empty-comments {
- padding: 40px 20px;
+ padding: 60px 20px;
text-align: center;
}
@@ -118,18 +168,22 @@
}
.comment-form {
+ position: fixed;
+ bottom: 80px; /* Над навигацией */
+ left: 0;
+ right: 0;
padding: 12px 16px;
- border-top: 1px solid var(--divider-color);
background: var(--bg-secondary);
+ border-top: 1px solid var(--divider-color);
display: flex;
gap: 8px;
- flex-shrink: 0;
+ z-index: 1001;
}
.comment-form input {
flex: 1;
- padding: 10px 16px;
- border-radius: 20px;
+ padding: 12px 16px;
+ border-radius: 24px;
background: var(--bg-primary);
color: var(--text-primary);
font-size: 15px;
@@ -137,8 +191,8 @@
}
.send-btn {
- width: 40px;
- height: 40px;
+ width: 44px;
+ height: 44px;
border-radius: 50%;
background: var(--button-accent);
color: white;
@@ -147,6 +201,7 @@
justify-content: center;
border: none;
cursor: pointer;
+ flex-shrink: 0;
}
.send-btn svg {
diff --git a/frontend/src/components/CommentsModal.jsx b/frontend/src/components/CommentsModal.jsx
index 0764fe9..8ac4fe4 100644
--- a/frontend/src/components/CommentsModal.jsx
+++ b/frontend/src/components/CommentsModal.jsx
@@ -42,15 +42,42 @@ export default function CommentsModal({ post, onClose, onUpdate }) {
}
return (
-
-
e.stopPropagation()}>
+
+
{/* Хедер */}
-
Комментарии ({comments.length})
-
+
Комментарии
+
+
+
+ {/* Пост */}
+
+
+

+
+
+ {post.author.firstName} {post.author.lastName}
+
+
@{post.author.username}
+
+
+
+ {post.content && (
+
{post.content}
+ )}
+
+ {post.imageUrl && (
+
+

+
+ )}
{/* Список комментариев */}
diff --git a/frontend/src/components/PostMenu.css b/frontend/src/components/PostMenu.css
index 6511543..ed3f4b9 100644
--- a/frontend/src/components/PostMenu.css
+++ b/frontend/src/components/PostMenu.css
@@ -1,17 +1,59 @@
-/* Максимально простое решение */
-.menu-modal {
- width: 100%;
- max-width: 600px;
+/* Меню на весь экран - простое решение */
+.post-menu-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
background: var(--bg-secondary);
- border-radius: 16px 16px 0 0;
- padding: 8px;
- margin: 0 auto;
+ z-index: 1000;
+ display: flex;
+ flex-direction: column;
+ padding: 16px;
+}
+
+.menu-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-bottom: 16px;
+ border-bottom: 1px solid var(--divider-color);
+}
+
+.menu-header h2 {
+ font-size: 18px;
+ font-weight: 600;
+ color: var(--text-primary);
+}
+
+.menu-close-btn {
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ background: var(--bg-primary);
+ color: var(--text-primary);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: none;
+ cursor: pointer;
+}
+
+.menu-close-btn svg {
+ stroke: currentColor;
+}
+
+.menu-items {
+ padding-top: 16px;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
}
.menu-item {
width: 100%;
padding: 16px;
- background: transparent;
+ background: var(--bg-primary);
border: none;
display: flex;
align-items: center;
@@ -25,23 +67,53 @@
.menu-item svg {
stroke: currentColor;
+ flex-shrink: 0;
}
.menu-item:active {
- background: var(--bg-primary);
+ opacity: 0.7;
+ transform: scale(0.98);
}
.menu-item.danger {
color: #FF3B30;
}
-.report-modal {
- max-width: 600px;
- margin: 0 auto;
+/* Модалка репорта */
+.report-modal-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: var(--bg-secondary);
+ z-index: 1001;
+ display: flex;
+ flex-direction: column;
}
-.report-modal textarea {
+.report-modal-header {
+ padding: 16px;
+ border-bottom: 1px solid var(--divider-color);
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.report-modal-header h2 {
+ font-size: 18px;
+ font-weight: 600;
+ color: var(--text-primary);
+}
+
+.report-modal-body {
+ flex: 1;
+ padding: 16px;
+}
+
+.report-modal-body textarea {
width: 100%;
+ height: 200px;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 12px;
@@ -49,5 +121,20 @@
color: var(--text-primary);
font-size: 15px;
line-height: 1.5;
- resize: vertical;
+ resize: none;
+}
+
+.submit-btn {
+ padding: 8px 16px;
+ border-radius: 20px;
+ background: var(--button-accent);
+ color: white;
+ font-size: 14px;
+ font-weight: 600;
+ border: none;
+ cursor: pointer;
+}
+
+.submit-btn:disabled {
+ opacity: 0.5;
}
diff --git a/frontend/src/components/PostMenu.jsx b/frontend/src/components/PostMenu.jsx
index 064a3ce..8e0541f 100644
--- a/frontend/src/components/PostMenu.jsx
+++ b/frontend/src/components/PostMenu.jsx
@@ -36,40 +36,45 @@ export default function PostMenu({ post, currentUser, onClose, onDelete }) {
if (showReportModal) {
return (
-
-
e.stopPropagation()}>
-
-
-
Пожаловаться
-
-
+
+
+
+
Пожаловаться
+
+
-
-
+
+
)
}
return (
-
-
e.stopPropagation()}>
+
+
+
+
{isOwnPost || isModerator ? (