- ApiClient теперь обрабатывает 401 и 403 ошибки для обновления токена - Добавлен JWTRefreshMiddleware для проактивного обновления токенов за 5 минут до истечения - Добавлена настройка JWT_REFRESH_THRESHOLD_MINUTES (по умолчанию 5) - Исправлена проблема с периодическими 403 ошибками после истечения access token
302 lines
5.2 KiB
CSS
302 lines
5.2 KiB
CSS
/* Enhanced Chat Styles for new messenger features */
|
|
|
|
/* Reply Preview */
|
|
.reply-preview {
|
|
font-size: 0.85rem;
|
|
padding: 4px 8px;
|
|
background: rgba(0, 0, 0, 0.05);
|
|
border-left: 3px solid var(--bs-primary);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.reply-preview i {
|
|
color: var(--bs-primary);
|
|
}
|
|
|
|
/* Forward Info */
|
|
.forward-info {
|
|
font-size: 0.85rem;
|
|
color: var(--bs-secondary);
|
|
font-style: italic;
|
|
}
|
|
|
|
.forward-info i {
|
|
color: var(--bs-info);
|
|
}
|
|
|
|
/* Message Actions (shown on hover) */
|
|
.msg {
|
|
position: relative;
|
|
}
|
|
|
|
.message-actions {
|
|
position: absolute;
|
|
top: -12px;
|
|
right: 10px;
|
|
background: white;
|
|
border: 1px solid #dee2e6;
|
|
border-radius: 20px;
|
|
padding: 2px 4px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
opacity: 0;
|
|
transition: opacity 0.2s;
|
|
z-index: 10;
|
|
}
|
|
|
|
.msg:hover .message-actions {
|
|
opacity: 1;
|
|
}
|
|
|
|
.message-actions .btn {
|
|
padding: 2px 6px;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
/* Reactions */
|
|
.reactions {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.reaction-btn {
|
|
border: 1px solid #dee2e6;
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 2px 8px;
|
|
font-size: 0.9rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.reaction-btn:hover {
|
|
background: #f8f9fa;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.reaction-btn.active {
|
|
background: #e3f2fd;
|
|
border-color: var(--bs-primary);
|
|
}
|
|
|
|
.reaction-btn .count {
|
|
font-size: 0.75rem;
|
|
color: #666;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
/* Quick Reactions (on hover) */
|
|
.quick-reactions {
|
|
position: absolute;
|
|
bottom: -20px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: white;
|
|
border: 1px solid #dee2e6;
|
|
border-radius: 20px;
|
|
padding: 4px 8px;
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.15);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.2s;
|
|
z-index: 20;
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
|
|
.msg:hover .quick-reactions {
|
|
opacity: 1;
|
|
pointer-events: all;
|
|
}
|
|
|
|
.quick-reactions button {
|
|
border: none;
|
|
background: transparent;
|
|
font-size: 1.1rem;
|
|
padding: 4px 8px;
|
|
cursor: pointer;
|
|
border-radius: 8px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.quick-reactions button:hover {
|
|
background: #f0f0f0;
|
|
}
|
|
|
|
/* Attachments */
|
|
.attachments {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.attachment-image {
|
|
max-width: 200px;
|
|
max-height: 200px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.attachment-image:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.attachment-file {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 6px 12px;
|
|
background: rgba(0, 0, 0, 0.05);
|
|
border-radius: 8px;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.attachment-file:hover {
|
|
background: rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Edited Indicator */
|
|
.bubble .bi-pencil-fill {
|
|
font-size: 0.7rem;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Pinned Message Indicator */
|
|
.bubble .bi-pin-angle-fill {
|
|
color: var(--bs-warning);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
/* Typing Indicator */
|
|
#typing {
|
|
padding: 4px 12px;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Edit/Reply Indicators */
|
|
#editing-indicator,
|
|
#reply-indicator {
|
|
margin-bottom: 8px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
/* Pinned Chat Badge */
|
|
.chat-pinned-badge {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
background: var(--bs-warning);
|
|
color: white;
|
|
border-radius: 50%;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
/* Chat Avatar */
|
|
.chat-avatar {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
border: 2px solid #dee2e6;
|
|
}
|
|
|
|
.chat-list-item {
|
|
position: relative;
|
|
}
|
|
|
|
.chat-list-item.pinned {
|
|
background: #fffbeb;
|
|
border-left: 4px solid var(--bs-warning);
|
|
}
|
|
|
|
/* Unread Mentions Badge */
|
|
.mention-badge {
|
|
background: #ef4444;
|
|
color: white;
|
|
border-radius: 12px;
|
|
padding: 2px 8px;
|
|
font-size: 0.75rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Thread Indicator */
|
|
.thread-indicator {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 0.85rem;
|
|
color: var(--bs-primary);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.thread-indicator:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* System Messages */
|
|
.msg.system-message {
|
|
justify-content: center !important;
|
|
}
|
|
|
|
.msg.system-message .bubble {
|
|
background: #f8f9fa;
|
|
border: 1px dashed #dee2e6;
|
|
color: #6c757d;
|
|
text-align: center;
|
|
font-size: 0.9rem;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Deleted Messages */
|
|
.msg .bubble em.text-muted {
|
|
font-size: 0.9rem;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* Mobile Responsive */
|
|
@media (max-width: 768px) {
|
|
.message-actions {
|
|
position: static;
|
|
opacity: 1;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.quick-reactions {
|
|
position: static;
|
|
transform: none;
|
|
opacity: 1;
|
|
pointer-events: all;
|
|
margin-top: 8px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.attachment-image {
|
|
max-width: 150px;
|
|
max-height: 150px;
|
|
}
|
|
}
|
|
|
|
/* Animation for new messages */
|
|
@keyframes slideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.msg.new {
|
|
animation: slideIn 0.3s ease-out;
|
|
}
|