Переписал уведомления: toast/confirm вместо alert; объединил профиль+инвентарь; починил ленту активности

This commit is contained in:
root
2026-07-05 15:05:04 +00:00
parent fe6bf5cf29
commit 50535ec777
15 changed files with 1523 additions and 1111 deletions
+214
View File
@@ -4486,4 +4486,218 @@ a:not(.btn):not(.nav-link):not(.logo) {
}
a:not(.btn):not(.nav-link):not(.logo):hover {
border-bottom-color: var(--primary-color);
}
/* =============================================
🍞 Уведомления (Toast + Confirm)
============================================= */
.toast-container {
position: fixed;
top: 72px;
right: 16px;
z-index: 9999;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
max-width: 380px;
width: 100%;
}
.toast {
background: var(--bg-elevated);
border: 1px solid var(--border-light);
border-radius: 10px;
padding: 12px 16px;
display: flex;
align-items: flex-start;
gap: 10px;
pointer-events: auto;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
transform-origin: top right;
position: relative;
overflow: hidden;
}
.toast::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
border-radius: 3px 0 0 3px;
}
.toast-success::before { background: var(--success); }
.toast-error::before { background: var(--danger); }
.toast-info::before { background: var(--primary); }
.toast-warning::before { background: var(--warning); }
.toast-icon {
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border-radius: 6px;
font-size: 0.85rem;
}
.toast-success .toast-icon { background: rgba(16,185,129,0.15); }
.toast-error .toast-icon { background: rgba(239,68,68,0.15); }
.toast-info .toast-icon { background: rgba(245,158,11,0.15); }
.toast-warning .toast-icon { background: rgba(245,158,11,0.15); }
.toast-content {
flex: 1;
min-width: 0;
}
.toast-title {
font-size: 0.82rem;
font-weight: 600;
color: var(--text);
line-height: 1.3;
}
.toast-message {
font-size: 0.75rem;
color: var(--text-dim);
margin-top: 2px;
line-height: 1.3;
}
.toast-close {
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 0.75rem;
flex-shrink: 0;
border-radius: 4px;
transition: all 0.15s;
}
.toast-close:hover {
background: rgba(255,255,255,0.06);
color: var(--text);
}
.toast-removing {
animation: toastSlideOut 0.25s cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes toastSlideIn {
from { opacity: 0; transform: translateX(100%) scale(0.9); }
to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastSlideOut {
from { opacity: 1; transform: translateX(0) scale(1); }
to { opacity: 0; transform: translateX(100%) scale(0.9); }
}
/* =============================================
⚠️ Confirm диалог
============================================= */
.confirm-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
animation: confirmFadeIn 0.2s ease;
}
.confirm-dialog {
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: 14px;
padding: 24px;
max-width: 400px;
width: 90%;
animation: confirmScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.confirm-dialog-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
}
.confirm-dialog-icon {
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 10px;
font-size: 1.1rem;
flex-shrink: 0;
}
.confirm-dialog-icon-warning { background: rgba(239,68,68,0.15); }
.confirm-dialog-icon-info { background: rgba(245,158,11,0.15); }
.confirm-dialog-title {
font-size: 1rem;
font-weight: 600;
color: var(--text);
}
.confirm-dialog-message {
font-size: 0.88rem;
color: var(--text-dim);
line-height: 1.5;
margin-bottom: 20px;
padding-left: 46px;
}
.confirm-dialog-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
}
.confirm-dialog-actions .btn {
min-width: 90px;
padding: 0.55rem 1.2rem;
font-size: 0.8rem;
}
.confirm-dialog .btn-danger {
background: var(--danger);
color: white;
border: none;
}
.confirm-dialog .btn-danger:hover {
background: #dc2626;
box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}
@keyframes confirmFadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes confirmScaleIn {
from { opacity: 0; transform: scale(0.9) translateY(10px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}