Переработать liquid glass в сайдбаре по best practice

Ключевые исправления:
- blur снижен до 14-16px (was 36px) — правильный диапазон для сайдбара
- Активный элемент: specular через ::after (inset 1px 1px 0 rgba(255,255,255,0.55))
  и градиент-тинт через ::before — классическая трёхслойная модель Apple
- Убраны иконочные чипы — лишнее нагромождение
- Убрана тяжёлая glass-карточка заголовка аккаунта
- folder-pane: единый умеренный blur вместо gradient + layered shadows

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
vodyanoysh 2026-03-31 23:51:27 +07:00
parent 57bb58fa57
commit 8537d8172d
3 changed files with 92 additions and 150 deletions

View file

@ -129,22 +129,14 @@ function stopResize(): void {
flex-shrink: 0;
position: relative;
z-index: 3;
background: linear-gradient(
165deg,
rgba(255, 255, 255, 0.055) 0%,
rgba(255, 255, 255, 0.032) 60%,
rgba(255, 255, 255, 0.022) 100%
);
backdrop-filter: blur(36px) saturate(2) brightness(1.04);
-webkit-backdrop-filter: blur(36px) saturate(2) brightness(1.04);
background: rgba(255, 255, 255, 0.035);
backdrop-filter: blur(16px) saturate(180%);
-webkit-backdrop-filter: blur(16px) saturate(180%);
overflow-y: auto;
min-width: 180px;
max-width: 400px;
border-right: 1px solid rgba(255, 255, 255, 0.09);
box-shadow:
4px 0 28px rgba(0, 0, 0, 0.45),
inset 0 1px 0 rgba(255, 255, 255, 0.12),
inset -1px 0 0 rgba(255, 255, 255, 0.04);
border-right: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
}
.message-pane {

View file

@ -34,29 +34,16 @@ const accountsStore = useAccountsStore()
<style scoped>
.folder-tree {
padding: 8px 0 4px;
padding: 4px 0;
}
.folder-header {
margin: 0 8px 8px;
padding: 7px 10px;
background: rgba(255, 255, 255, 0.045);
backdrop-filter: blur(20px) saturate(1.6);
-webkit-backdrop-filter: blur(20px) saturate(1.6);
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: var(--radius-sm);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.14),
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
0 2px 8px rgba(0, 0, 0, 0.2);
padding: 10px 14px 8px;
font-size: 11px;
font-weight: 500;
color: var(--text-secondary);
letter-spacing: 0.3px;
}
.folder-list {
position: relative;
font-weight: 600;
color: var(--text-muted);
letter-spacing: 0.4px;
text-transform: uppercase;
}
.loading,

View file

@ -63,9 +63,7 @@ function toggleExpand(event: Event): void {
</button>
<span v-else class="expand-spacer" />
<span class="folder-icon-wrap">
<AppIcon :name="folderIcon" :size="13" class="folder-icon" />
</span>
<AppIcon :name="folderIcon" :size="14" class="folder-icon" />
<span class="folder-name truncate">{{ folder.name }}</span>
<span v-if="unreadCount > 0" class="unread-badge">
{{ unreadCount }}
@ -87,132 +85,74 @@ function toggleExpand(event: Event): void {
.folder-item {
display: flex;
align-items: center;
width: calc(100% - 10px);
padding: 5px 8px 5px 6px;
gap: 7px;
border-radius: var(--radius-sm);
margin: 2px 5px;
width: calc(100% - 12px);
padding: 6px 8px;
gap: 6px;
border-radius: 8px;
margin: 1px 6px;
border: 1px solid transparent;
position: relative;
text-align: left;
transition:
background var(--transition-fast),
border-color var(--transition-fast),
box-shadow var(--transition-fast);
text-align: left;
position: relative;
border-color var(--transition-fast);
}
/* Specular highlight layer — только для active */
.folder-item.active::before {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(
145deg,
rgba(255, 255, 255, 0.10) 0%,
rgba(255, 255, 255, 0.02) 60%,
transparent 100%
);
pointer-events: none;
}
.folder-item.active::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
box-shadow:
inset 1px 1px 0 rgba(255, 255, 255, 0.55),
inset -1px -1px 0 rgba(255, 255, 255, 0.04);
pointer-events: none;
}
.folder-item:hover {
background: rgba(255, 255, 255, 0.06);
border-color: rgba(255, 255, 255, 0.08);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.09),
0 2px 10px rgba(0, 0, 0, 0.15);
border-color: rgba(255, 255, 255, 0.07);
}
.folder-item.active {
background: rgba(255, 255, 255, 0.09);
backdrop-filter: blur(20px) saturate(1.8);
-webkit-backdrop-filter: blur(20px) saturate(1.8);
border-color: rgba(255, 255, 255, 0.13);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.18),
inset 0 -1px 0 rgba(0, 0, 0, 0.12),
0 4px 16px rgba(0, 0, 0, 0.25),
0 1px 3px rgba(0, 0, 0, 0.2);
}
.folder-item.active::before {
content: '';
position: absolute;
left: -5px;
top: 18%;
height: 64%;
width: 3px;
background: var(--accent);
border-radius: 0 3px 3px 0;
box-shadow:
0 0 8px color-mix(in srgb, var(--accent) 70%, transparent),
0 0 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.folder-item.active .folder-name {
color: rgba(255, 255, 255, 0.90);
font-weight: 500;
}
/* ── Expand toggle ───────────────────────────────────────── */
.expand-btn {
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
flex-shrink: 0;
transition: transform var(--transition-fast), color var(--transition-fast);
}
.expand-btn:hover {
color: var(--text-secondary);
}
.expand-btn.rotated {
transform: rotate(90deg);
}
.expand-spacer {
width: 16px;
flex-shrink: 0;
}
/* ── Icon chip ───────────────────────────────────────────── */
.folder-icon-wrap {
width: 22px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-xs);
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.07);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
flex-shrink: 0;
transition:
background var(--transition-fast),
border-color var(--transition-fast),
box-shadow var(--transition-fast);
}
.folder-item:hover .folder-icon-wrap {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.11);
}
.folder-item.active .folder-icon-wrap {
background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.07));
border-color: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.09));
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.14),
0 0 8px color-mix(in srgb, var(--accent) 20%, transparent);
background: rgba(255, 255, 255, 0.11);
backdrop-filter: blur(14px) saturate(200%) brightness(1.08);
-webkit-backdrop-filter: blur(14px) saturate(200%) brightness(1.08);
border-color: rgba(255, 255, 255, 0.18);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
/* ── Иконка папки ────────────────────────────────────────── */
.folder-icon {
flex-shrink: 0;
color: var(--text-muted);
opacity: 0.8;
transition: color var(--transition-fast), opacity var(--transition-fast);
transition: color var(--transition-fast);
}
.folder-item:hover .folder-icon {
opacity: 1;
color: var(--text-secondary);
}
.folder-item.active .folder-icon {
color: color-mix(in srgb, var(--accent) 60%, rgba(255, 255, 255, 0.8));
opacity: 1;
color: rgba(255, 255, 255, 0.75);
}
/* ── Folder name ─────────────────────────────────────────── */
/* ── Название папки ──────────────────────────────────────── */
.folder-name {
flex: 1;
font-size: 13px;
@ -225,7 +165,33 @@ function toggleExpand(event: Event): void {
color: var(--text-primary);
}
/* ── Unread badge ────────────────────────────────────────── */
.folder-item.active .folder-name {
color: rgba(255, 255, 255, 0.92);
font-weight: 500;
}
/* ── Кнопка разворачивания ───────────────────────────────── */
.expand-btn {
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
flex-shrink: 0;
transition: transform var(--transition-fast);
}
.expand-btn.rotated {
transform: rotate(90deg);
}
.expand-spacer {
width: 16px;
flex-shrink: 0;
}
/* ── Бейдж непрочитанных ─────────────────────────────────── */
.unread-badge {
font-size: 10px;
font-weight: 700;
@ -234,28 +200,25 @@ function toggleExpand(event: Event): void {
min-height: 18px;
line-height: 18px;
border-radius: var(--radius-full);
background: rgba(210, 45, 45, 0.55);
border: 1px solid rgba(255, 100, 100, 0.3);
background: rgba(200, 40, 40, 0.55);
border: 1px solid rgba(255, 100, 100, 0.25);
box-shadow:
inset 0 1px 0 rgba(255, 160, 160, 0.18),
0 1px 5px rgba(180, 30, 30, 0.3);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
inset 0 1px 0 rgba(255, 160, 160, 0.2),
0 2px 6px rgba(180, 30, 30, 0.3);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
flex-shrink: 0;
min-width: 18px;
text-align: center;
transition: background var(--transition-fast), box-shadow var(--transition-fast);
transition: background var(--transition-fast);
}
.folder-item:hover .unread-badge {
background: rgba(210, 45, 45, 0.70);
box-shadow:
inset 0 1px 0 rgba(255, 160, 160, 0.22),
0 2px 8px rgba(180, 30, 30, 0.4);
}
.folder-item.active .unread-badge {
background: rgba(200, 40, 40, 0.65);
border-color: rgba(255, 100, 100, 0.4);
border-color: rgba(255, 100, 100, 0.35);
}
</style>