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
This commit is contained in:
root
2026-07-05 16:15:12 +00:00
parent 50535ec777
commit 3fe8a47e04
25 changed files with 2669 additions and 390 deletions
+3 -45
View File
@@ -7,35 +7,7 @@
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body class="upgrade-page">
<nav class="navbar">
<div class="container">
<a href="/" class="logo">🎮 CS2 Simulator</a>
<div class="nav-links">
{% if user %}
<a href="/cases" class="nav-link">Кейсы</a>
<a href="/contracts" class="nav-link">Контракты</a>
<a href="/upgrade" class="nav-link active">🆙 Апгрейд</a>
<a href="/crash" class="nav-link">💥 Crash</a>
<a href="/profile" class="nav-link">Профиль</a>
<a href="/activity" class="nav-link">📰 Лента</a>
<a href="/achievements" class="nav-link">🏆 Достижения</a>
<a href="/profile" class="nav-link">Профиль</a>
<span class="user-balance">{{ "%.0f"|format(user.balance) }} ₽</span>
<button onclick="toggleSound()" class="btn btn-outline" id="soundToggle" title="Звук">🔊</button>
<button onclick="toggleSafeMode()" class="btn btn-outline" id="safeModeToggle" title="Режим записи">🎙️</button>
<button onclick="logout()" class="btn btn-outline">Выйти</button>
{% else %}
<a href="/cases" class="nav-link">Кейсы</a>
<a href="/contracts" class="nav-link">Контракты</a>
<a href="/upgrade" class="nav-link active">🆙 Апгрейд</a>
<a href="/activity" class="nav-link">📰 Лента</a>
<button onclick="toggleSafeMode()" class="btn btn-outline" id="safeModeToggle" title="Режим записи">🎙️</button>
<a href="/login" class="btn btn-outline">Войти</a>
<a href="/register" class="btn btn-primary">Регистрация</a>
{% endif %}
</div>
</div>
</nav>
{% include "_nav.html" %}
<main class="upgrade-container">
<div class="container">
@@ -109,7 +81,6 @@
{% endif %}
</div>
<div id="toastContainer" class="toast-container"></div>
</div>
<!-- Target -->
@@ -596,19 +567,6 @@
`).join('');
}
function showToast(message, type) {
const container = document.getElementById('toastContainer');
const toast = document.createElement('div');
toast.className = `toast ${type}`;
toast.textContent = message;
container.appendChild(toast);
requestAnimationFrame(() => toast.classList.add('show'));
setTimeout(() => {
toast.classList.remove('show');
setTimeout(() => toast.remove(), 300);
}, 3000);
}
async function executeUpgrade() {
if (!selectedInput || !selectedTarget || isSpinning) return;
@@ -709,12 +667,12 @@
document.getElementById('displayTargetPrice').textContent = `${Math.floor(data.received_item.price).toLocaleString()}`;
document.getElementById('selectedTargetDisplay').style.borderColor = '#10b981';
document.getElementById('selectedTargetDisplay').style.boxShadow = '0 0 20px rgba(16,185,129,0.3)';
showToast(`${getRandomPhrase('win')} ${data.received_item.name}`, 'success');
Notify.success(`${getRandomPhrase('win')} ${data.received_item.name}`);
SoundManager.wheelWin();
} else {
document.getElementById('selectedInputDisplay').style.borderColor = '#ef4444';
document.getElementById('selectedInputDisplay').style.boxShadow = '0 0 20px rgba(239,68,68,0.3)';
showToast(getRandomPhrase('lose'), 'fail');
Notify.error(getRandomPhrase('lose'));
SoundManager.wheelLose();
}