diff --git a/src/renderer/src/components/messages/MessageList.vue b/src/renderer/src/components/messages/MessageList.vue
index 7c8af4c..e9c8cf9 100644
--- a/src/renderer/src/components/messages/MessageList.vue
+++ b/src/renderer/src/components/messages/MessageList.vue
@@ -294,7 +294,7 @@ async function handleSwipeAction(action: SwipeAction, messageId: string): Promis
@swipe-action="(action) => handleSwipeAction(action, thread.messages[0].id)"
/>
-
+
handleSwipeAction(action, msg.id)"
@@ -756,25 +756,62 @@ async function handleSwipeAction(action: SwipeAction, messageId: string): Promis
/* ── Группа треда ───────────────────────────────────────── */
.thread-group {
- position: relative;
+ /* collapsed: без стилей — ThreadListItem рендерит собственную карточку */
}
-/* Вертикальная accent-линия — появляется только когда тред открыт */
+/* Открытый тред — единая glass-панель */
+.thread-group--open {
+ position: relative;
+ margin: 2px 5px;
+ border-radius: 10px;
+ overflow: hidden;
+ background: linear-gradient(
+ 135deg,
+ color-mix(in srgb, var(--accent) 14%, transparent) 0%,
+ color-mix(in srgb, var(--accent) 5%, transparent) 50%,
+ transparent 100%
+ );
+ backdrop-filter: blur(40px) saturate(1.8);
+ -webkit-backdrop-filter: blur(40px) saturate(1.8);
+ border: 1px solid rgba(255, 255, 255, 0.13);
+ box-shadow:
+ inset 0 1px 0 rgba(255, 255, 255, 0.18),
+ 0 4px 24px rgba(0, 0, 0, 0.30);
+ z-index: 1;
+}
+
+/* Призматическая верхняя грань */
.thread-group--open::before {
content: '';
position: absolute;
- left: 13px;
- top: 46px; /* ниже заголовка треда */
- bottom: 8px;
- width: 2px;
- border-radius: 2px;
+ left: 0;
+ top: 0;
+ right: 0;
+ height: 1px;
background: linear-gradient(
- to bottom,
- var(--accent),
- color-mix(in srgb, var(--accent) 30%, transparent)
+ 90deg,
+ transparent 0%,
+ rgba(255, 120, 120, 0.55) 12%,
+ rgba(255, 200, 80, 0.55) 28%,
+ rgba(200, 255, 100, 0.55) 45%,
+ rgba( 80, 200, 255, 0.55) 62%,
+ rgba(160, 100, 255, 0.55) 78%,
+ rgba(255, 120, 200, 0.55) 92%,
+ transparent 100%
);
pointer-events: none;
- z-index: 1;
+ z-index: 3;
+}
+
+/* Заголовок треда внутри открытой панели: убираем собственную карточку */
+.thread-group--open :deep(.thread-card),
+.thread-group--open :deep(.thread-card.expanded) {
+ margin: 0;
+ border: none;
+ border-radius: 0;
+ background: transparent;
+ box-shadow: none;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
/* Контейнер дочерних писем */
@@ -782,18 +819,17 @@ async function handleSwipeAction(action: SwipeAction, messageId: string): Promis
overflow: hidden;
}
-/* Дочерние письма — отступ, чтобы освободить место для линии */
+/* Дочерние письма: убираем собственные карточки, они — ряды внутри панели */
:deep(.thread-child-item) {
- margin-left: 20px;
- margin-top: 0;
- border-radius: 0;
- border-top-color: transparent;
+ margin: 0 !important;
+ border-radius: 0 !important;
+ border: none !important;
+ box-shadow: none !important;
}
-:deep(.thread-child-item:last-child) {
- border-bottom-left-radius: 10px;
- border-bottom-right-radius: 10px;
- margin-bottom: 2px;
+/* Разделитель между соседними дочерними письмами */
+.thread-children :deep(.thread-child-item:not(:first-child) .message-item) {
+ border-top: 1px solid rgba(255, 255, 255, 0.04);
}
/* ── Анимация раскрытия ─────────────────────────────────── */
diff --git a/src/renderer/src/utils/date.ts b/src/renderer/src/utils/date.ts
index 45c0151..f93c8df 100644
--- a/src/renderer/src/utils/date.ts
+++ b/src/renderer/src/utils/date.ts
@@ -1,21 +1,26 @@
-import { formatDistanceToNow, format, isToday, isYesterday, isThisYear } from 'date-fns'
+import { format, isToday, isYesterday, startOfWeek } from 'date-fns'
+import { ru } from 'date-fns/locale'
export function formatMessageDate(dateStr: string): string {
const date = new Date(dateStr)
+ const now = new Date()
if (isToday(date)) {
return format(date, 'HH:mm')
}
if (isYesterday(date)) {
- return 'Yesterday'
+ return `Вчера ${format(date, 'HH:mm')}`
}
- if (isThisYear(date)) {
- return format(date, 'MMM d')
+ const weekStart = startOfWeek(now, { weekStartsOn: 1 })
+ if (date >= weekStart) {
+ // Первая буква заглавная: "Понедельник 14:30"
+ const str = format(date, 'EEEE HH:mm', { locale: ru })
+ return str.charAt(0).toUpperCase() + str.slice(1)
}
- return format(date, 'MMM d, yyyy')
+ return format(date, 'yyyy-MM-dd HH:mm')
}
export function formatFullDate(dateStr: string): string {