Files
dodep-simulator/templates/register.html
T
root 3fe8a47e04 Dildo items, admin fixes, UI refactor
- Add 85 custom Dildo items (knife/skin pattern names, various rarities)
- Create Dildo Case config (hidden, items obtained via contracts)
- Fix admin user_detail.html nested script tag (Notify fallback removed)
- Fix admin cases.html embedded script tag
- Add notifications.js to admin base.html
- Fix admin users.html: use counts instead of relationship lists
- Replace old money format with |money filter across all templates
- Standardize nav partial (_nav.html) with active_page highlighting
- Fix RARITY_COLORS rename in activity sidebar
- Fix toast animation (forwards) and remove duplicate CSS
- Replace showToast() with Notify.* in upgrade page
- Add cs2_simulator.db and *.log to .gitignore
- Create remote-deploy.sh with DB exclusion
2026-07-05 16:15:12 +00:00

69 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Регистрация - CS2 Simulator</title>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
{% include "_nav.html" %}
<main class="auth-container">
<div class="auth-card">
<h2>Регистрация</h2>
<form id="registerForm" class="auth-form">
<div class="form-group">
<label for="username">Имя пользователя</label>
<input type="text" id="username" name="username" required minlength="3">
<small>Минимум 3 символа</small>
</div>
<div class="form-group">
<label for="password">Пароль</label>
<input type="password" id="password" name="password" required minlength="4">
<small>Минимум 4 символа</small>
</div>
<div id="errorMessage" class="error-message" style="display: none;"></div>
<button type="submit" class="btn btn-primary btn-block">Зарегистрироваться</button>
</form>
<p class="auth-footer">
Уже есть аккаунт? <a href="/login">Войдите</a>
</p>
</div>
</main>
<script>
document.getElementById('registerForm').addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(e.target);
const errorDiv = document.getElementById('errorMessage');
try {
const response = await fetch('/web/api/auth/register', {
method: 'POST',
body: formData
});
const data = await response.json();
if (response.ok && data.success) {
window.location.href = data.redirect;
} else {
errorDiv.textContent = data.error || 'Ошибка регистрации';
errorDiv.style.display = 'block';
}
} catch (error) {
errorDiv.textContent = 'Ошибка соединения с сервером';
errorDiv.style.display = 'block';
}
});
</script>
<script src="/static/js/safemode.js"></script>
</body>
</html>