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:
@@ -356,6 +356,7 @@
|
||||
</div>
|
||||
|
||||
{% block modals %}{% endblock %}
|
||||
<script src="/static/js/notifications.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -252,8 +252,6 @@ async function searchCaseItems() {
|
||||
document.getElementById('caseItemSearchResults').innerHTML = html;
|
||||
}
|
||||
|
||||
<script>if(typeof Notify==="undefined"){window.Notify={toast:function(m){alert(m)},error:function(m){alert(m)},success:function(m){alert(m)},info:function(m){alert(m)},confirm:function(m,t,c){if(c&&confirm(m))c(!0)}}}</script>
|
||||
<script>
|
||||
async function saveCase() {
|
||||
const name = document.getElementById('caseNameInput').value.trim();
|
||||
if (!name) { Notify.error('Введите название кейса'); return; }
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="a-stat">
|
||||
<div class="as-label">Общий баланс</div>
|
||||
<div class="as-value">{{ "%.0f"|format(total_balance) }} ₽</div>
|
||||
<div class="as-value">{{ total_balance|money }} ₽</div>
|
||||
<div class="as-bar" style="width:40%;background:#34d399"></div>
|
||||
</div>
|
||||
<div class="a-stat">
|
||||
@@ -47,7 +47,7 @@
|
||||
<div><div class="as-value" style="font-size:1.2rem" style="color:#22c55e">{{ lucky_count }}</div><div class="as-label" style="font-size:0.7rem">🍀 Везучих</div></div>
|
||||
<div><div class="as-value" style="font-size:1.2rem" style="color:#f59e0b">{{ normal_count }}</div><div class="as-label" style="font-size:0.7rem">📊 Обычных</div></div>
|
||||
<div><div class="as-value" style="font-size:1.2rem" style="color:#ef4444">{{ unlucky_count }}</div><div class="as-label" style="font-size:0.7rem">🌧️ Невезучих</div></div>
|
||||
<div><div class="as-value" style="font-size:1.2rem">{{ "%.0f"|format(total_spent) }} ₽</div><div class="as-label" style="font-size:0.7rem">Потрачено всего</div></div>
|
||||
<div><div class="as-value" style="font-size:1.2rem">{{ total_spent|money }} ₽</div><div class="as-label" style="font-size:0.7rem">Потрачено всего</div></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="a-empty"><div class="a-empty-icon">📭</div>Нет данных RPU</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="a-stats" style="grid-template-columns:repeat(4,1fr)">
|
||||
<div class="a-stat">
|
||||
<div class="as-label">Баланс</div>
|
||||
<div class="as-value">{{ "%.0f"|format(target_user.balance) }} ₽</div>
|
||||
<div class="as-value">{{ target_user.balance|money }} ₽</div>
|
||||
</div>
|
||||
<div class="a-stat">
|
||||
<div class="as-label">Предметов</div>
|
||||
@@ -94,7 +94,7 @@
|
||||
<div class="a-modal">
|
||||
<div class="a-modal-title">💰 Изменить баланс</div>
|
||||
<p style="font-size:0.85rem;color:rgba(255,255,255,0.5);margin-bottom:1rem">
|
||||
Текущий: <strong style="color:#f59e0b">{{ "%.2f"|format(target_user.balance) }} ₽</strong>
|
||||
Текущий: <strong style="color:#f59e0b">{{ target_user.balance|money }} ₽</strong>
|
||||
</p>
|
||||
<div class="a-mb">
|
||||
<label class="a-label">Сумма</label>
|
||||
@@ -172,7 +172,6 @@ let currentRPU = null;
|
||||
function closeModal(id) { document.getElementById(id).classList.remove('open'); }
|
||||
function openModal(id) { document.getElementById(id).classList.add('open'); }
|
||||
|
||||
<script>if(typeof Notify==="undefined"){window.Notify={toast:function(m){alert(m)},error:function(m){alert(m)},success:function(m){alert(m)},info:function(m){alert(m)},confirm:function(m,t,c){if(c&&confirm(m))c(!0)}}}</script>
|
||||
// ====== BALANCE ======
|
||||
function openBalanceModal() { openModal('balanceModal'); }
|
||||
async function updateBalance() {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<th>Статус</th>
|
||||
<th>Кейсов</th>
|
||||
<th>Контрактов</th>
|
||||
<th>Достижений</th>
|
||||
<th>Предметов</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -34,15 +34,15 @@
|
||||
{{ u.username }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ "%.0f"|format(u.balance) }} ₽</td>
|
||||
<td>{{ u.balance|money }} ₽</td>
|
||||
<td>
|
||||
{% if u.is_admin %}<span class="a-badge a-badge-admin">Админ</span>{% endif %}
|
||||
{% if u.is_banned %}<span class="a-badge a-badge-banned">Забанен</span>{% endif %}
|
||||
{% if not u.is_admin and not u.is_banned %}<span class="a-badge a-badge-user">Игрок</span>{% endif %}
|
||||
</td>
|
||||
<td>{{ u.case_openings|default(0) }}</td>
|
||||
<td>{{ u.contracts|default(0) }}</td>
|
||||
<td>{{ u.achievements|default(0) }}</td>
|
||||
<td>{{ u.case_openings }}</td>
|
||||
<td>{{ u.contracts }}</td>
|
||||
<td>{{ u.inventory_count }}</td>
|
||||
<td class="td-actions">
|
||||
<a href="/admin/user/{{ u.id }}" class="a-btn a-btn-sm">✏️</a>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user