RPU v2, promo/bank система, админка, оптимизации
— RPU v2: бюджет удачи, потолок (ceiling), комбек после проигрышей, hot/cold анализ, интеграция с promo-фазами — Bank API: mock-банк для карты (депозит/вывод с балансом 1000₽) — Promo-сервис: автогенерация промокодов каждый час, типы (card_to_site, luck_boost, ceiling_boost, free_case, reset_streak) — Promo-фазы: LUCKY/NEUTRAL/UNLUCKY, переключение каждые 1-6ч — Admin: история транзакций (user_history), управление промокодами, управление promo-фазами, API фильтров/коллекций, RPU info — Database: WAL mode, новые поля RPU v2, TransactionLog, карточный баланс, статистики (streaks, ceiling, budget) — Frontend: /deposit, /promo/activate, /withdraw, /card-balance, /online-count, /rpu-info, lifespan вместо startup event — UI: user_history.html, улучшения профиля, кейсов, навигации — Cases: обновление cases.json (1892 строки новых данных) — Achievements: кэш коллекций, оптимизация is_custom проверок — Sounds: дополнительные звуковые эффекты — Upgrade: интеграция с RPU (множители, streaks) — .gitignore: исключены .db, .bak, __pycache__
This commit is contained in:
+152
-10
@@ -26,6 +26,8 @@
|
||||
flex-direction: column;
|
||||
position: sticky; top: 0; height: 100vh;
|
||||
flex-shrink: 0;
|
||||
z-index: 50;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.admin-sidebar .sb-brand {
|
||||
padding: 1.25rem 1.25rem 0.75rem;
|
||||
@@ -73,6 +75,28 @@
|
||||
}
|
||||
.admin-sidebar .sb-footer a:hover { color: #f59e0b; }
|
||||
|
||||
/* ─── Sidebar overlay for mobile ─── */
|
||||
.sidebar-overlay {
|
||||
display: none;
|
||||
position: fixed; inset: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 49;
|
||||
}
|
||||
.sidebar-overlay.open { display: block; }
|
||||
|
||||
/* ─── Hamburger ─── */
|
||||
.hamburger {
|
||||
display: none;
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgba(255,255,255,0.6);
|
||||
font-size: 1.3rem;
|
||||
cursor: pointer;
|
||||
padding: 0.25rem;
|
||||
line-height: 1;
|
||||
}
|
||||
.hamburger:hover { color: #fff; }
|
||||
|
||||
/* ─── Main area ─── */
|
||||
.admin-main {
|
||||
flex: 1;
|
||||
@@ -85,8 +109,10 @@
|
||||
padding: 0.85rem 1.5rem;
|
||||
background: rgba(17,18,22,0.8);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.04);
|
||||
position: sticky; top: 0; z-index: 10;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.admin-topbar .at-title {
|
||||
font-size: 1rem; font-weight: 600;
|
||||
@@ -96,7 +122,10 @@
|
||||
font-size: 0.75rem; color: rgba(255,255,255,0.35);
|
||||
font-weight: 400;
|
||||
}
|
||||
.admin-topbar .at-actions { display: flex; align-items: center; gap: 0.75rem; }
|
||||
.admin-topbar .at-actions {
|
||||
display: flex; align-items: center; gap: 0.75rem;
|
||||
margin-left: auto;
|
||||
}
|
||||
.admin-topbar .at-actions .at-back {
|
||||
color: rgba(255,255,255,0.5); text-decoration: none;
|
||||
font-size: 0.8rem; display: flex; align-items: center; gap: 0.3rem;
|
||||
@@ -152,6 +181,7 @@
|
||||
.a-stat .as-value {
|
||||
font-size: 1.8rem; font-weight: 700;
|
||||
line-height: 1.1;
|
||||
word-break: break-word;
|
||||
}
|
||||
.a-stat .as-bar {
|
||||
position: absolute; bottom: 0; left: 0; height: 2px;
|
||||
@@ -196,6 +226,11 @@
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* ─── Responsive tables: card view on mobile ─── */
|
||||
.a-table-card-view {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ─── Buttons ─── */
|
||||
.a-btn {
|
||||
display: inline-flex; align-items: center; gap: 0.35rem;
|
||||
@@ -255,6 +290,7 @@
|
||||
color: rgba(255,255,255,0.5);
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
select.a-input { cursor: pointer; }
|
||||
|
||||
/* ─── Badge ─── */
|
||||
.a-badge {
|
||||
@@ -272,6 +308,7 @@
|
||||
.a-overlay {
|
||||
position: fixed; inset: 0;
|
||||
background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
z-index: 100; display: none; align-items: center; justify-content: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
@@ -283,13 +320,16 @@
|
||||
padding: 1.5rem;
|
||||
max-width: 460px; width: 100%;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
|
||||
max-height: 90vh; overflow-y: auto;
|
||||
}
|
||||
.a-modal-wide { max-width: 700px; }
|
||||
.a-modal-title {
|
||||
font-size: 1rem; font-weight: 600; margin-bottom: 1rem;
|
||||
}
|
||||
.a-modal-actions {
|
||||
display: flex; gap: 0.5rem; margin-top: 1rem;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* ─── Grid helpers ─── */
|
||||
@@ -298,7 +338,14 @@
|
||||
.a-gap-sm { gap: 0.5rem; }
|
||||
.a-mt { margin-top: 1rem; }
|
||||
.a-mb { margin-bottom: 1rem; }
|
||||
.a-flex { display: flex; align-items: center; gap: 0.5rem; }
|
||||
.a-flex { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
|
||||
|
||||
/* ─── Search in top bar ─── */
|
||||
.search-form {
|
||||
display: flex; gap: 0.5rem; align-items: center;
|
||||
}
|
||||
.search-form .a-input { width: 200px; }
|
||||
.search-form .a-btn { flex-shrink: 0; }
|
||||
|
||||
/* ─── Empty state ─── */
|
||||
.a-empty {
|
||||
@@ -307,20 +354,86 @@
|
||||
}
|
||||
.a-empty .a-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
|
||||
|
||||
@media(max-width:768px){
|
||||
.admin-sidebar { width: 56px; }
|
||||
.admin-sidebar .sb-brand span,
|
||||
.admin-sidebar .sb-nav a span:not(.sb-icon),
|
||||
.admin-sidebar .sb-footer span { display: none; }
|
||||
.admin-sidebar .sb-nav a { justify-content: center; padding: 0.65rem; }
|
||||
.admin-sidebar .sb-footer a { justify-content: center; }
|
||||
/* ─── Responsive ─── */
|
||||
@media(max-width: 1024px){
|
||||
.admin-sidebar { width: 200px; }
|
||||
}
|
||||
|
||||
@media(max-width: 768px){
|
||||
.admin-sidebar {
|
||||
position: fixed; left: 0; top: 0;
|
||||
transform: translateX(-100%);
|
||||
width: 260px;
|
||||
box-shadow: 4px 0 30px rgba(0,0,0,0.4);
|
||||
}
|
||||
.admin-sidebar.open { transform: translateX(0); }
|
||||
.admin-content { padding: 1rem; }
|
||||
.admin-topbar { padding: 0.7rem 1rem; }
|
||||
.admin-topbar .at-title .at-sub { display: none; }
|
||||
|
||||
.hamburger { display: inline-flex; }
|
||||
|
||||
.a-stats {
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.a-stat { padding: 1rem; }
|
||||
.a-stat .as-value { font-size: 1.4rem; }
|
||||
|
||||
.search-form .a-input { width: 140px; }
|
||||
|
||||
.a-modal { margin: 0.5rem; padding: 1rem; border-radius: 12px; }
|
||||
|
||||
/* Card-style table on mobile */
|
||||
.a-table { display: none; }
|
||||
.a-table-card-view { display: flex; flex-direction: column; gap: 0.75rem; }
|
||||
.a-table-card {
|
||||
background: rgba(17,18,22,0.6);
|
||||
border: 1px solid rgba(255,255,255,0.05);
|
||||
border-radius: 10px;
|
||||
padding: 0.85rem;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
.a-table-card .tc-row {
|
||||
display: flex; justify-content: space-between;
|
||||
padding: 0.25rem 0;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.a-table-card .tc-row .tc-label {
|
||||
color: rgba(255,255,255,0.35);
|
||||
font-size: 0.72rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.a-table-card .tc-row .tc-value {
|
||||
text-align: right;
|
||||
word-break: break-word;
|
||||
}
|
||||
.a-table-card .tc-actions {
|
||||
margin-top: 0.5rem; padding-top: 0.5rem;
|
||||
border-top: 1px solid rgba(255,255,255,0.04);
|
||||
display: flex; gap: 0.35rem; flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width: 480px){
|
||||
html { font-size: 14px; }
|
||||
.admin-content { padding: 0.75rem; }
|
||||
.admin-topbar { padding: 0.6rem 0.75rem; }
|
||||
.a-stats { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
|
||||
.a-stat { padding: 0.75rem; }
|
||||
.a-stat .as-value { font-size: 1.2rem; }
|
||||
.a-card { padding: 0.85rem; }
|
||||
.search-form { width: 100%; }
|
||||
.search-form .a-input { width: 100%; }
|
||||
}
|
||||
{% block extra_styles %}{% endblock %}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="admin-sidebar">
|
||||
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
||||
|
||||
<div class="admin-sidebar" id="adminSidebar">
|
||||
<div class="sb-brand">
|
||||
<span style="font-size:1.2rem">⚡</span>
|
||||
<span>CS2 <span>Admin</span></span>
|
||||
@@ -344,6 +457,7 @@
|
||||
<div class="admin-main">
|
||||
<div class="admin-topbar">
|
||||
<div class="at-title">
|
||||
<button class="hamburger" id="hamburgerBtn" aria-label="Toggle menu">☰</button>
|
||||
{% block page_title %}Панель управления{% endblock %}
|
||||
</div>
|
||||
<div class="at-actions">
|
||||
@@ -357,6 +471,34 @@
|
||||
|
||||
{% block modals %}{% endblock %}
|
||||
<script src="/static/js/notifications.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
const sidebar = document.getElementById('adminSidebar');
|
||||
const overlay = document.getElementById('sidebarOverlay');
|
||||
const hamburger = document.getElementById('hamburgerBtn');
|
||||
|
||||
function toggleSidebar() {
|
||||
sidebar.classList.toggle('open');
|
||||
overlay.classList.toggle('open');
|
||||
}
|
||||
|
||||
if (hamburger) {
|
||||
hamburger.addEventListener('click', toggleSidebar);
|
||||
}
|
||||
if (overlay) {
|
||||
overlay.addEventListener('click', toggleSidebar);
|
||||
}
|
||||
|
||||
// Auto-close sidebar on nav click (mobile)
|
||||
sidebar.querySelectorAll('.sb-nav a').forEach(function(link) {
|
||||
link.addEventListener('click', function() {
|
||||
if (window.innerWidth <= 768) {
|
||||
toggleSidebar();
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user