From 1f386c32a116843a8e6a5f1477244fbbe256d9e6 Mon Sep 17 00:00:00 2001 From: glpshchn <464976@niuitmo.ru> Date: Sun, 7 Dec 2025 05:36:30 +0300 Subject: [PATCH] Update files --- backend/bots/mainBot.js | 4 +- frontend/src/pages/MonthlyLadder.css | 95 ++++++++++++++++++++-------- frontend/src/pages/MonthlyLadder.jsx | 57 ++++++++++++++--- 3 files changed, 120 insertions(+), 36 deletions(-) diff --git a/backend/bots/mainBot.js b/backend/bots/mainBot.js index ddd73e4..2ab6685 100644 --- a/backend/bots/mainBot.js +++ b/backend/bots/mainBot.js @@ -59,9 +59,9 @@ const sendMessageToAllUsers = async (messageText) => { }; const getStartMessage = () => { - return `👋 Добро пожаловать в Nakama! + return `Добро пожаловать в Nakama! -📱 Nakama — социальная сеть для фурри и аниме сообщества. +📱 Nakama - социальная сеть для фурри и аниме сообщества. Основные возможности: • Создание постов с текстом и изображениями diff --git a/frontend/src/pages/MonthlyLadder.css b/frontend/src/pages/MonthlyLadder.css index dbf2f4d..8efe02c 100644 --- a/frontend/src/pages/MonthlyLadder.css +++ b/frontend/src/pages/MonthlyLadder.css @@ -210,14 +210,27 @@ .ladder-top-header { display: flex; justify-content: space-between; - align-items: center; + align-items: flex-start; margin-bottom: 16px; + gap: 12px; +} + +.ladder-top-title { + flex: 1; } .ladder-top-header h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); + margin-bottom: 4px; +} + +.ladder-prizes { + font-size: 12px; + color: var(--text-secondary); + margin: 0; + line-height: 1.4; } .info-btn { @@ -246,30 +259,38 @@ .top-users-list { display: flex; flex-direction: column; - gap: 12px; + padding: 8px 0; } .top-user-item { display: flex; align-items: center; gap: 12px; - padding: 12px; - background: var(--bg-primary); - border-radius: 12px; + padding: 8px 16px; + background: transparent; + border-bottom: 1px solid rgba(0, 0, 0, 0.03); transition: all 0.2s; + min-height: 54px; +} + +[data-theme="dark"] .top-user-item { + border-bottom-color: rgba(255, 255, 255, 0.03); +} + +.top-user-item:last-child { + border-bottom: none; } .top-user-item.current-user { - background: rgba(255, 215, 0, 0.1); - border: 1px solid rgba(255, 215, 0, 0.3); + background: rgba(255, 215, 0, 0.05); } .user-rank { display: flex; align-items: center; justify-content: center; - width: 40px; - height: 40px; + width: 32px; + height: 32px; flex-shrink: 0; } @@ -296,37 +317,53 @@ } .user-avatar { - width: 50px; - height: 50px; + width: 54px; + height: 54px; border-radius: 50%; object-fit: cover; - border: 2px solid var(--border-color); + border: none; flex-shrink: 0; } -.top-user-item.current-user .user-avatar { - border-color: #FFD700; -} - .user-info { flex: 1; min-width: 0; + display: flex; + align-items: center; } .user-name { - font-size: 16px; + font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; - margin-bottom: 4px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.user-stats { + display: flex; + align-items: center; + gap: 12px; + flex-shrink: 0; + margin-left: auto; } .user-tickets { font-size: 14px; - color: #FFD700; + color: var(--text-primary); font-weight: 500; + white-space: nowrap; +} + +.user-prize { + font-size: 14px; + color: var(--text-secondary); + font-weight: 500; + white-space: nowrap; } .current-badge { @@ -364,9 +401,14 @@ display: flex; align-items: center; gap: 12px; - padding: 12px; - background: var(--bg-primary); - border-radius: 12px; + padding: 8px 0; + background: transparent; + border-bottom: 1px solid rgba(0, 0, 0, 0.03); + min-height: 54px; +} + +[data-theme="dark"] .current-user-item { + border-bottom-color: rgba(255, 255, 255, 0.03); } /* Модальное окно с информацией */ @@ -380,7 +422,7 @@ display: flex; align-items: center; justify-content: center; - z-index: 1000; + z-index: 10000; padding: 20px; animation: fadeIn 0.3s; } @@ -393,6 +435,7 @@ border-radius: 16px; box-shadow: 0 4px 20px var(--shadow-lg); position: relative; + z-index: 10001; } .info-modal-header { @@ -404,7 +447,7 @@ position: sticky; top: 0; background: var(--bg-secondary); - z-index: 10; + z-index: 10002; } .info-modal-header h2 { @@ -430,6 +473,8 @@ .info-modal-content { padding: 16px; + position: relative; + z-index: 1; } .info-section { @@ -518,5 +563,5 @@ } [data-theme="dark"] .user-tickets { - color: #FFD700; + color: var(--text-primary); } diff --git a/frontend/src/pages/MonthlyLadder.jsx b/frontend/src/pages/MonthlyLadder.jsx index 7bed196..a10985c 100644 --- a/frontend/src/pages/MonthlyLadder.jsx +++ b/frontend/src/pages/MonthlyLadder.jsx @@ -80,6 +80,40 @@ export default function MonthlyLadder({ user }) { } } + const getPrize = (rank) => { + switch (rank) { + case 1: + return '$50' + case 2: + return '$30' + case 3: + return '$15' + case 4: + return '$5' + case 5: + return '$5' + default: + return null + } + } + + const getPrize = (rank) => { + switch (rank) { + case 1: + return '$50' + case 2: + return '$30' + case 3: + return '$15' + case 4: + return '$5' + case 5: + return '$5' + default: + return null + } + } + const formatTickets = (tickets) => { return tickets?.toLocaleString('ru-RU') || '0' } @@ -138,7 +172,10 @@ export default function MonthlyLadder({ user }) { {/* Топ 5 пользователей */}
-

Топ 5

+
+

Топ 5

+

Призы: 1 место - $50, 2 место - $30, 3 место - $15, 4-5 места - $5

+
) @@ -206,9 +245,9 @@ export default function MonthlyLadder({ user }) { {currentUser.firstName || currentUser.username}
-
- {formatTickets(currentUser.tickets)} билетов -
+ +
+ {formatTickets(currentUser.tickets)} билетов
@@ -217,7 +256,7 @@ export default function MonthlyLadder({ user }) { {/* Модальное окно с информацией */} {showInfo && (
setShowInfo(false)}> -
e.stopPropagation()}> +
e.stopPropagation()}>

За что начисляются баллы

@@ -261,7 +300,7 @@ export default function MonthlyLadder({ user }) {
-

🛡️ Антифрод

+

Немного правил

Лайки/комменты от аккаунтов младше 24 часов не считаем

Комменты <10 символов = 0 баллов

Ограничение на баллы по входящим реакциям, чтобы боты не устроили ферму