With DataBaseREdis

This commit is contained in:
2026-01-28 00:49:37 +03:00
parent 4b01c2d4de
commit af62de5569
10 changed files with 1309 additions and 24 deletions

View File

@ -20,6 +20,55 @@
<div id="stars2"></div>
<div id="stars3"></div>
<!-- Auth Modal -->
<div id="auth-overlay" class="modal-overlay hidden">
<div class="modal auth-modal">
<div class="auth-tabs">
<button type="button" class="auth-tab active" data-auth-tab="login">Вход</button>
<button type="button" class="auth-tab" data-auth-tab="register">Регистрация</button>
</div>
<div id="auth-login-panel" class="auth-panel active">
<h2>Вход</h2>
<form id="login-form">
<label>Имя пользователя</label>
<input type="text" id="login-username" placeholder="Введите имя" required maxlength="20" />
<label style="margin-top: 1rem;">Пароль</label>
<input type="password" id="login-password" placeholder="Введите пароль" required />
<button type="submit" class="btn btn-primary" style="margin-top: 1.5rem; width: 100%;">Войти</button>
</form>
<p id="login-error" class="error hidden" style="margin-top: 1rem;"></p>
</div>
<div id="auth-register-panel" class="auth-panel hidden">
<h2>Регистрация</h2>
<form id="register-form">
<label>Имя пользователя</label>
<input type="text" id="register-username" placeholder="От 3 до 20 символов" required minlength="3" maxlength="20" />
<label style="margin-top: 1rem;">Пароль</label>
<input type="password" id="register-password" placeholder="Не менее 6 символов" required minlength="6" />
<label style="margin-top: 1rem;">Email (необязательно)</label>
<input type="email" id="register-email" placeholder="your@email.com" />
<button type="submit" class="btn btn-primary" style="margin-top: 1.5rem; width: 100%;">Зарегистрироваться</button>
</form>
<p id="register-error" class="error hidden" style="margin-top: 1rem;"></p>
</div>
<button type="button" id="auth-close" class="btn btn-ghost" style="margin-top: 1rem; width: 100%;">Продолжить без авторизации</button>
</div>
</div>
<!-- Leaderboard Modal -->
<div id="leaderboard-overlay" class="modal-overlay hidden">
<div class="modal leaderboard-modal">
<h2><i data-lucide="trophy" style="width: 24px; height: 24px; vertical-align: middle; margin-right: 0.5rem;"></i>Глобальный рейтинг</h2>
<div id="leaderboard-content" style="max-height: 500px; overflow-y: auto; margin-top: 1rem;">
<p class="hint" style="text-align: center; padding: 2rem;">Загрузка...</p>
</div>
<button type="button" id="leaderboard-close" class="btn btn-primary" style="margin-top: 1rem; width: 100%;">Закрыть</button>
</div>
</div>
<!-- Lobby -->
<section id="lobby" class="screen">
<div class="lobby-card">
@ -29,9 +78,16 @@
<span class="logo-hs">HEARTHSTONE</span>
</h1>
<p class="subtitle">PvP до 4 игроков · Игра с ИИ · Работает через Radmin VPN</p>
<button type="button" id="btn-instructions-lobby" class="btn-instructions-lobby" title="Как играть">?</button>
<button type="button" id="btn-cards-gallery" class="btn-instructions-lobby" title="Галерея карт" style="right: 3.5rem;"><i data-lucide="book-open"></i></button>
<button type="button" id="btn-settings-lobby" class="btn-settings-lobby" title="Настройки"><i data-lucide="settings"></i></button>
<div style="position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; align-items: center;">
<button type="button" id="btn-leaderboard" class="btn-instructions-lobby" title="Рейтинг"><i data-lucide="trophy"></i></button>
<button type="button" id="btn-instructions-lobby" class="btn-instructions-lobby" title="Как играть">?</button>
<button type="button" id="btn-cards-gallery" class="btn-instructions-lobby" title="Галерея карт"><i data-lucide="book-open"></i></button>
<button type="button" id="btn-settings-lobby" class="btn-settings-lobby" title="Настройки"><i data-lucide="settings"></i></button>
</div>
<div id="user-info" style="position: absolute; top: 1rem; left: 1rem; display: none; align-items: center; gap: 0.5rem;">
<span id="user-name" style="color: var(--cyan); font-weight: 600;"></span>
<button type="button" id="btn-logout" class="btn btn-ghost" style="padding: 0.3rem 0.6rem; font-size: 0.85rem;">Выйти</button>
</div>
<div class="lobby-tabs">
<button type="button" class="tab active" data-tab="host">Создать игру</button>