feat: Add Pause system, User Profile Dashboard, and shift grid with neighbour fence

- Implement in-game pause with Space/KeyP hotkeys and pause banner overlay
- Split Auth modal into clean Profile Dashboard (stats, coins, cloud save status) and Guest Login
- Shift lawn startY to 108 to make top-row zombie HP bars 100% visible
- Render decorative wooden neighbour fence above top row
This commit is contained in:
Antigravity committed 2026-09-17 10:12:56 +00:00
1 parent 82654d8f64
commit 2cd343e8ef
4 files changed
+328 -42

No files matched your search

+56 -19
View File
@@ -39,6 +39,7 @@
<div class="nav-right">
<button id="btn-theme" class="nav-btn" title="Смена темы оформления (Классика, Киберпанк, Ретро, Зима)">🎨 Классика</button>
<button id="btn-speed" class="nav-btn" title="Ускорить игру">⚡ 1x</button>
<button id="btn-pause" class="nav-btn btn-pause" title="Пауза / Продолжить (Пробел)">⏸️ Пауза</button>
<button id="btn-music" class="nav-btn" title="Включить/выключить музыку">🎵 Музыка</button>
<button id="btn-mute" class="nav-btn" title="Включить/выключить звук">🔊 Звук</button>
<button id="btn-mobile-drawer" class="nav-btn btn-drawer-toggle" title="Открыть меню разделов">☰ Разделы</button>
@@ -330,27 +331,63 @@
<!-- Authentication & Profile Modal -->
<div id="auth-modal" class="overlay hidden">
<div class="banner-card auth-card">
<h1 style="color: #ffeb3b; font-size: 26px;">ПРОФИЛЬ ИГРОКА</h1>
<div id="auth-current-status" style="font-size: 14px; margin-bottom: 10px; color: #a5d6a7;">
Текущий режим: <strong>Гость</strong>
</div>
<p id="auth-modal-desc" style="font-size: 13px; margin-bottom: 14px; color: #d7ccc8;">
Войдите под логином и паролем для сохранения монет и прогресса, либо играйте как Гость (без сохранения).
</p>
<form id="auth-form" onsubmit="return false;" style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;">
<input type="text" id="auth-username" class="auth-input" placeholder="Имя пользователя (логин)" maxlength="20" autocomplete="username">
<input type="password" id="auth-password" class="auth-input" placeholder="Пароль" maxlength="30" autocomplete="current-password">
<div id="auth-error" class="auth-error hidden"></div>
<div style="display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px;">
<button type="button" id="btn-auth-submit" class="btn btn-auth-submit">Войти / Регистрация</button>
<button type="button" id="btn-auth-guest" class="btn btn-secondary">Играть как Гость</button>
<button type="button" id="btn-auth-logout" class="btn btn-danger hidden">🚪 Выйти из профиля</button>
<!-- 1. Logged-in User Profile Dashboard View -->
<div id="auth-logged-in-view" class="auth-view hidden">
<h1 style="color: #81c784; font-size: 24px; margin-bottom: 6px;">👤 ЛИЧНЫЙ ПРОФИЛЬ</h1>
<div class="profile-header-card">
<div class="profile-avatar-icon">🌻</div>
<div class="profile-info-text">
<div id="profile-user-title" class="profile-username">kopri</div>
<div class="profile-status-badge">🟢 Облачные сохранения активны</div>
</div>
</div>
</form>
<button id="btn-auth-close" class="btn btn-secondary" style="font-size: 14px; padding: 6px 22px;">Закрыть</button>
<!-- Profile Game Stats -->
<div class="profile-stats-grid">
<div class="profile-stat-box">
<span class="stat-label">💰 Монеты</span>
<span id="profile-stat-coins" class="stat-value">5,000</span>
</div>
<div class="profile-stat-box">
<span class="stat-label">🗺️ Кампания</span>
<span id="profile-stat-level" class="stat-value">Уровень 15</span>
</div>
<div class="profile-stat-box">
<span class="stat-label">🏆 Рекорд очков</span>
<span id="profile-stat-score" class="stat-value">12,500</span>
</div>
<div class="profile-stat-box">
<span class="stat-label">🧪 Материалы</span>
<span id="profile-stat-materials" class="stat-value">265 шт.</span>
</div>
</div>
<div style="display: flex; gap: 10px; justify-content: center; margin-top: 14px;">
<button type="button" id="btn-auth-logout" class="btn btn-danger">🚪 Выйти из аккаунта</button>
<button type="button" id="btn-auth-close-profile" class="btn btn-secondary">Закрыть</button>
</div>
</div>
<!-- 2. Guest Login / Registration View -->
<div id="auth-guest-view" class="auth-view">
<h1 style="color: #ffeb3b; font-size: 24px; margin-bottom: 4px;">ВХОД В ПРОФИЛЬ</h1>
<p style="font-size: 13px; margin-bottom: 12px; color: #d7ccc8;">
Войдите или зарегистрируйтесь, чтобы сохранять монеты, крафт и уровень кампании на сервере.
</p>
<form id="auth-form" onsubmit="return false;" style="display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;">
<input type="text" id="auth-username" class="auth-input" placeholder="Имя пользователя (логин)" maxlength="20" autocomplete="username">
<input type="password" id="auth-password" class="auth-input" placeholder="Пароль" maxlength="30" autocomplete="current-password">
<div id="auth-error" class="auth-error hidden"></div>
<div style="display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px;">
<button type="button" id="btn-auth-submit" class="btn btn-auth-submit">Войти / Регистрация</button>
<button type="button" id="btn-auth-guest" class="btn btn-secondary">Играть как Гость</button>
</div>
</form>
<button id="btn-auth-close" class="btn btn-secondary" style="font-size: 13px; padding: 6px 20px;">Закрыть</button>
</div>
</div>
</div>