улучшение: письма как floating glass cards, выбранное всплывает
Карточки: - .swipe-wrapper: margin + border-radius + glass border + inset-highlight - hover: поднимает карточку (border ярче, тень глубже) - :has(.selected): карточка всплывает — outward shadow 6px/24px + акцентная рамка + z-index:1 (через CSS :has()) Состояния: - .unread: чуть ярче и насыщеннее base-поверхность - .selected: акцентный градиент + ::before полоска с glow (работает с border-radius wrapper'а в отличие от border-left) - убрана border-left — заменена на ::before Список: - padding сверху/снизу для отступа карточек от краёв - fade-маска: удлинена до 56px Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8f6c5ade7c
commit
123fa2ceaa
2 changed files with 66 additions and 25 deletions
|
|
@ -478,17 +478,18 @@ async function handleSwipeAction(action: SwipeAction, messageId: string): Promis
|
||||||
.message-list {
|
.message-list {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
padding: 2px 0 8px;
|
||||||
/* Fade-маска: плавный переход к пустой области снизу */
|
/* Fade-маска: плавный переход к пустой области снизу */
|
||||||
mask-image: linear-gradient(
|
mask-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
black 0%,
|
black 0%,
|
||||||
black calc(100% - 48px),
|
black calc(100% - 56px),
|
||||||
transparent 100%
|
transparent 100%
|
||||||
);
|
);
|
||||||
-webkit-mask-image: linear-gradient(
|
-webkit-mask-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
black 0%,
|
black 0%,
|
||||||
black calc(100% - 48px),
|
black calc(100% - 56px),
|
||||||
transparent 100%
|
transparent 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -311,8 +311,33 @@ onUnmounted(() => {
|
||||||
.swipe-wrapper {
|
.swipe-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
margin: 2px 5px;
|
||||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
|
border-radius: 10px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.05),
|
||||||
|
0 1px 3px rgba(0, 0, 0, 0.15);
|
||||||
|
transition:
|
||||||
|
box-shadow var(--transition-fast),
|
||||||
|
border-color var(--transition-fast);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swipe-wrapper:hover {
|
||||||
|
border-color: rgba(255, 255, 255, 0.1);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.08),
|
||||||
|
0 3px 10px rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Карточка «всплывает» когда письмо выбрано — через :has() */
|
||||||
|
.swipe-wrapper:has(.message-item.selected) {
|
||||||
|
border-color: color-mix(in srgb, var(--accent) 35%, transparent);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 color-mix(in srgb, var(--accent) 20%, transparent),
|
||||||
|
0 6px 24px rgba(0, 0, 0, 0.5),
|
||||||
|
0 2px 6px rgba(0, 0, 0, 0.3),
|
||||||
|
0 0 0 0.5px color-mix(in srgb, var(--accent) 22%, transparent);
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-bg {
|
.action-bg {
|
||||||
|
|
@ -335,66 +360,81 @@ onUnmounted(() => {
|
||||||
.action-icon.confirmed { transform: scale(1.3); }
|
.action-icon.confirmed { transform: scale(1.3); }
|
||||||
|
|
||||||
.message-item {
|
.message-item {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px 10px 10px 4px;
|
padding: 10px 10px 10px 4px;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
/* Тёмная + стеклянная поверхность: opacity фиксирована для читаемости при свайпе */
|
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.01) 100%),
|
linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%),
|
||||||
#0c0c14;
|
#0c0c14;
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
will-change: transform;
|
will-change: transform;
|
||||||
touch-action: pan-y;
|
touch-action: pan-y;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
transition:
|
transition: background var(--transition-fast);
|
||||||
background var(--transition-fast),
|
}
|
||||||
box-shadow var(--transition-fast);
|
|
||||||
|
/* Непрочитанные — чуть ярче, больше присутствия */
|
||||||
|
.message-item.unread {
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%),
|
||||||
|
#0d0d17;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-item:hover {
|
.message-item:hover {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%),
|
linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.035) 100%),
|
||||||
#0c0c14;
|
#0c0c14;
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Выбранное письмо: акцентный тинт + полоска слева через ::before */
|
||||||
.message-item.selected {
|
.message-item.selected {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg,
|
linear-gradient(180deg,
|
||||||
color-mix(in srgb, var(--accent) 14%, transparent) 0%,
|
color-mix(in srgb, var(--accent) 13%, transparent) 0%,
|
||||||
color-mix(in srgb, var(--accent) 7%, transparent) 100%
|
color-mix(in srgb, var(--accent) 6%, transparent) 100%
|
||||||
),
|
),
|
||||||
#0c0c14;
|
#0d0d18;
|
||||||
border-left: 2px solid var(--accent);
|
padding-left: 4px;
|
||||||
padding-left: 2px;
|
|
||||||
box-shadow:
|
box-shadow:
|
||||||
inset 0 1px 0 color-mix(in srgb, var(--accent) 20%, transparent),
|
inset 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent),
|
||||||
inset 4px 0 16px color-mix(in srgb, var(--accent) 10%, transparent),
|
inset 0 -1px 0 color-mix(in srgb, var(--accent) 8%, transparent);
|
||||||
inset 0 -1px 0 color-mix(in srgb, var(--accent) 6%, transparent);
|
}
|
||||||
|
|
||||||
|
/* Акцентная полоска — через ::before, работает с border-radius wrapper'а */
|
||||||
|
.message-item.selected::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 18%;
|
||||||
|
height: 64%;
|
||||||
|
width: 2.5px;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
background: var(--accent);
|
||||||
|
box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 65%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-item.selected:hover {
|
.message-item.selected:hover {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg,
|
linear-gradient(180deg,
|
||||||
color-mix(in srgb, var(--accent) 18%, transparent) 0%,
|
color-mix(in srgb, var(--accent) 17%, transparent) 0%,
|
||||||
color-mix(in srgb, var(--accent) 9%, transparent) 100%
|
color-mix(in srgb, var(--accent) 8%, transparent) 100%
|
||||||
),
|
),
|
||||||
#0c0c14;
|
#0d0d18;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-item.checked {
|
.message-item.checked {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%),
|
linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%),
|
||||||
color-mix(in srgb, var(--accent) 7%, #0c0c14);
|
color-mix(in srgb, var(--accent) 6%, #0c0c14);
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-item.checked:hover {
|
.message-item.checked:hover {
|
||||||
background:
|
background:
|
||||||
linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%),
|
linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.03) 100%),
|
||||||
color-mix(in srgb, var(--accent) 10%, #0c0c14);
|
color-mix(in srgb, var(--accent) 9%, #0c0c14);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Left column: holds either circle-check or unread-dot */
|
/* Left column: holds either circle-check or unread-dot */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue