From 04330f6c2de490e5f1d837de101affbd73b78ccc Mon Sep 17 00:00:00 2001 From: Professional Date: Mon, 26 May 2025 13:43:48 +0700 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=20=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/AdminConversationDetail.vue | 179 +++++++ src/views/admin/AdminConversations.vue | 432 +++++++++++++--- src/views/admin/AdminStatistics.vue | 500 +++++++++++++------ src/views/admin/AdminUsers.vue | 516 ++++++++++++++------ 4 files changed, 1259 insertions(+), 368 deletions(-) diff --git a/src/views/admin/AdminConversationDetail.vue b/src/views/admin/AdminConversationDetail.vue index e396908..cfff774 100644 --- a/src/views/admin/AdminConversationDetail.vue +++ b/src/views/admin/AdminConversationDetail.vue @@ -562,4 +562,183 @@ h3 { .pagination-info { color: #666; } + +/* Адаптивные стили для больших экранов (1200px+) */ +@media (min-width: 1200px) { + .admin-conversation-detail { + padding: 2rem; + } + + h2 { + font-size: 1.75rem; + } +} + +/* Адаптивные стили для средних экранов (992px - 1199px) */ +@media (min-width: 992px) and (max-width: 1199px) { + .admin-conversation-detail { + padding: 1.5rem; + } +} + +/* Адаптивные стили для планшетов (768px - 991px) */ +@media (min-width: 768px) and (max-width: 991px) { + .admin-conversation-detail { + padding: 1.25rem; + } + + .info-grid { + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + } + + .participants-list { + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + } +} + +/* Адаптивные стили для малых планшетов (576px - 767px) */ +@media (min-width: 576px) and (max-width: 767px) { + .admin-conversation-detail { + padding: 1rem; + /* Учитываем отступ внизу для нижней навигации на мобильных */ + padding-bottom: calc(1rem + 56px + env(safe-area-inset-bottom, 0px)); + } + + .message-item { + max-width: 85%; + } + + .participants-list { + grid-template-columns: 1fr; + } + + .pagination { + flex-wrap: wrap; + } +} + +/* Адаптивные стили для мобильных устройств (до 575px) */ +@media (max-width: 575px) { + .admin-conversation-detail { + padding: 0.75rem; + /* Учитываем отступ внизу для нижней навигации на мобильных */ + padding-bottom: calc(0.75rem + 56px + env(safe-area-inset-bottom, 0px)); + } + + h2 { + font-size: 1.3rem; + margin-bottom: 1rem; + } + + h3 { + font-size: 1.1rem; + margin-bottom: 0.75rem; + } + + .conversation-info, + .participants-section, + .messages-section { + padding: 1rem; + } + + .info-grid { + grid-template-columns: 1fr; + } + + .participants-list { + grid-template-columns: 1fr; + } + + .participant-card { + padding: 0.75rem; + } + + .participant-photo { + width: 50px; + height: 50px; + } + + .message-item { + max-width: 90%; + padding: 0.75rem; + } + + .pagination { + flex-direction: column; + gap: 0.5rem; + align-items: stretch; + } + + .pagination-btn { + width: 100%; + text-align: center; + } + + .pagination-info { + text-align: center; + } +} + +/* Специальные стили для очень маленьких экранов */ +@media (max-width: 360px) { + .admin-conversation-detail { + padding: 0.5rem; + padding-bottom: calc(0.5rem + 56px + env(safe-area-inset-bottom, 0px)); + } + + .conversation-info, + .participants-section, + .messages-section { + padding: 0.75rem; + } + + .message-time { + font-size: 0.7rem; + } + + .message-sender { + font-size: 0.8rem; + } + + .user-btn { + padding: 0.35rem 0.5rem; + font-size: 0.8rem; + } +} + +/* Ландшафтная ориентация на мобильных */ +@media (max-height: 450px) and (orientation: landscape) { + .admin-conversation-detail { + padding: 0.75rem; + padding-bottom: calc(0.75rem + 50px + env(safe-area-inset-bottom, 0px)); + } + + .conversation-container { + gap: 1rem; + } + + .header-controls { + margin-bottom: 0.75rem; + } + + h2 { + font-size: 1.2rem; + margin-bottom: 0.75rem; + } + + h3 { + font-size: 1rem; + margin-bottom: 0.5rem; + } + + .conversation-info, + .participants-section, + .messages-section { + padding: 0.75rem; + } + + .pagination { + margin-top: 0.75rem; + } +} \ No newline at end of file diff --git a/src/views/admin/AdminConversations.vue b/src/views/admin/AdminConversations.vue index 21df6c9..401358a 100644 --- a/src/views/admin/AdminConversations.vue +++ b/src/views/admin/AdminConversations.vue @@ -12,72 +12,113 @@
- Загрузка диалогов... +
+

Загрузка диалогов...

{{ error }}
-
- - - - - - - - - - - - - - - - - - - - - -
ID диалогаУчастникиПоследнее сообщениеДата созданияПоследняя активностьДействия
{{ shortenId(conversation._id) }} -
- {{ participant.name }} ({{ participant.email }}) + +
+
+ + + + + + + + + + + + + + + + + + + + + +
ID диалогаУчастникиПоследнее сообщениеДата созданияПоследняя активностьДействия
{{ shortenId(conversation._id) }} +
+ {{ participant.name }} ({{ participant.email }}) +
+
+ {{ conversation.lastMessage ? truncateText(conversation.lastMessage.text, 30) : 'Нет сообщений' }} + {{ formatDate(conversation.createdAt) }}{{ formatDate(conversation.updatedAt) }} + +
+
+
+ + +
+
+
+
ID: {{ shortenId(conversation._id) }}
+
{{ formatDate(conversation.updatedAt) }}
+
+
+
+
Участники:
+
+
+ {{ participant.name }}
-
- {{ conversation.lastMessage ? truncateText(conversation.lastMessage.text, 30) : 'Нет сообщений' }} - {{ formatDate(conversation.createdAt) }}{{ formatDate(conversation.updatedAt) }} - -
- -
- Диалоги не найдены +
+
+
+
Последнее сообщение:
+
+ {{ conversation.lastMessage ? truncateText(conversation.lastMessage.text, 50) : 'Нет сообщений' }} +
+
+ + + + +
+ +

Диалоги не найдены

+

Попробуйте изменить параметры поиска

+
+ + @@ -202,6 +243,7 @@ export default { \ No newline at end of file diff --git a/src/views/admin/AdminStatistics.vue b/src/views/admin/AdminStatistics.vue index de1f6e0..cf41057 100644 --- a/src/views/admin/AdminStatistics.vue +++ b/src/views/admin/AdminStatistics.vue @@ -3,10 +3,12 @@

Статистика приложения

- Загрузка статистики... +
+
Загрузка статистики...
+ {{ error }}
@@ -15,36 +17,34 @@

Пользователи

-
+
{{ statistics.users.total }}
Всего пользователей
-
+
{{ statistics.users.active }}
-
Активных пользователей
+
Активных
-
+
{{ statistics.users.inactive }}
Заблокированных
-
+
{{ statistics.users.newIn30Days }}
Новых за 30 дней
-

Распределение по полу

+

Распределение пользователей по полу

{{ statistics.users.genderDistribution.male }} @@ -52,9 +52,7 @@
{{ statistics.users.genderDistribution.female }} @@ -62,9 +60,7 @@
{{ statistics.users.genderDistribution.other }} @@ -93,31 +89,33 @@

Активность пользователей

-
+
{{ statistics.activity.totalMessages }}
Всего сообщений
-
+
{{ statistics.activity.totalConversations }}
Всего диалогов
-
+
{{ statistics.activity.totalProfileViews }}
Просмотров профилей
-

Средняя активность

-
-
-
Сообщений на пользователя:
-
{{ statistics.activity.averages.messagesPerUser }}
-
-
-
Диалогов на пользователя:
-
{{ statistics.activity.averages.conversationsPerUser }}
+
+

Средняя активность

+
+
+
Сообщений на пользователя:
+
{{ statistics.activity.averages.messagesPerUser }}
+
+
+
Диалогов на пользователя:
+
{{ statistics.activity.averages.conversationsPerUser }}
+
@@ -189,6 +187,7 @@ export default { \ No newline at end of file diff --git a/src/views/admin/AdminUsers.vue b/src/views/admin/AdminUsers.vue index dd477f4..7266510 100644 --- a/src/views/admin/AdminUsers.vue +++ b/src/views/admin/AdminUsers.vue @@ -26,80 +26,137 @@
- Загрузка пользователей... +
+ Загрузка пользователей...
+ {{ error }}
-
- - - - - - - - - - - - - - - - - - - - - -
IDИмяEmailДата регистрацииСтатусДействия
{{ shortenId(user._id) }}{{ user.name }}{{ formatDate(user.createdAt) }} - - {{ user.isActive ? 'Активен' : 'Заблокирован' }} - - - - -
- -
- Пользователи не найдены + +
+
+ + + + + + + + + + + + + + + + + + + + + +
IDИмяEmailДата регистрацииСтатусДействия
{{ shortenId(user._id) }}{{ user.name }}{{ formatDate(user.createdAt) }} + + {{ user.isActive ? 'Активен' : 'Заблокирован' }} + + + + +
- - + + +
+
+
+
{{ user.name }}
+ + {{ user.isActive ? 'Активен' : 'Заблокирован' }} + +
- - Страница {{ currentPage }} из {{ pagination.pages }} - +
+
+
ID:
+
{{ shortenId(user._id) }}
+
+ +
+
Email:
+
{{ user.email }}
+
+ +
+
Дата регистрации:
+
{{ formatDate(user.createdAt) }}
+
+
- +
+ + +
+ +
+ +

Пользователи не найдены

+

Попробуйте изменить параметры поиска или фильтрации

+
+ +
@@ -264,6 +321,7 @@ export default { \ No newline at end of file