улучшение: письма как 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 {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 2px 0 8px;
|
||||
/* Fade-маска: плавный переход к пустой области снизу */
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
black 0%,
|
||||
black calc(100% - 48px),
|
||||
black calc(100% - 56px),
|
||||
transparent 100%
|
||||
);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to bottom,
|
||||
black 0%,
|
||||
black calc(100% - 48px),
|
||||
black calc(100% - 56px),
|
||||
transparent 100%
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,8 +311,33 @@ onUnmounted(() => {
|
|||
.swipe-wrapper {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
|
||||
margin: 2px 5px;
|
||||
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 {
|
||||
|
|
@ -335,66 +360,81 @@ onUnmounted(() => {
|
|||
.action-icon.confirmed { transform: scale(1.3); }
|
||||
|
||||
.message-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
padding: 10px 10px 10px 4px;
|
||||
gap: 6px;
|
||||
/* Тёмная + стеклянная поверхность: opacity фиксирована для читаемости при свайпе */
|
||||
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;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
|
||||
cursor: pointer;
|
||||
will-change: transform;
|
||||
touch-action: pan-y;
|
||||
user-select: none;
|
||||
transition:
|
||||
background var(--transition-fast),
|
||||
box-shadow var(--transition-fast);
|
||||
transition: background 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 {
|
||||
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;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
/* Выбранное письмо: акцентный тинт + полоска слева через ::before */
|
||||
.message-item.selected {
|
||||
background:
|
||||
linear-gradient(180deg,
|
||||
color-mix(in srgb, var(--accent) 14%, transparent) 0%,
|
||||
color-mix(in srgb, var(--accent) 7%, transparent) 100%
|
||||
color-mix(in srgb, var(--accent) 13%, transparent) 0%,
|
||||
color-mix(in srgb, var(--accent) 6%, transparent) 100%
|
||||
),
|
||||
#0c0c14;
|
||||
border-left: 2px solid var(--accent);
|
||||
padding-left: 2px;
|
||||
#0d0d18;
|
||||
padding-left: 4px;
|
||||
box-shadow:
|
||||
inset 0 1px 0 color-mix(in srgb, var(--accent) 20%, transparent),
|
||||
inset 4px 0 16px color-mix(in srgb, var(--accent) 10%, transparent),
|
||||
inset 0 -1px 0 color-mix(in srgb, var(--accent) 6%, transparent);
|
||||
inset 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent),
|
||||
inset 0 -1px 0 color-mix(in srgb, var(--accent) 8%, 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 {
|
||||
background:
|
||||
linear-gradient(180deg,
|
||||
color-mix(in srgb, var(--accent) 18%, transparent) 0%,
|
||||
color-mix(in srgb, var(--accent) 9%, transparent) 100%
|
||||
color-mix(in srgb, var(--accent) 17%, transparent) 0%,
|
||||
color-mix(in srgb, var(--accent) 8%, transparent) 100%
|
||||
),
|
||||
#0c0c14;
|
||||
#0d0d18;
|
||||
}
|
||||
|
||||
.message-item.checked {
|
||||
background:
|
||||
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 {
|
||||
background:
|
||||
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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue