From dc1183b03420cb04866e283146a31e4546eb569c Mon Sep 17 00:00:00 2001 From: vodyanoysh Date: Tue, 31 Mar 2026 21:17:24 +0700 Subject: [PATCH] feat: liquid glass depth, fix artifacts, accent color picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AccountSwitcher: remove active-indicator bar (was causing stripe artifacts); active state now shown only via avatar glow ring - AppShell: panels get z-index layering (4→1) with depth shadows (box-shadow cast right) and backdrop-filter + saturate(1.4-1.8) for authentic glass vibrance; each panel has distinct glass weight - settings.store: add ACCENT_PRESETS (7 colors) with full palette tokens; accentId persisted to localStorage; applyAccent() sets CSS custom properties on documentElement on init and on change - SettingsView: new "Акцентный цвет" section with circular color swatches; active swatch has white ring + outer glow; imports ACCENT_PRESETS - FolderTreeItem: active indicator glow uses color-mix for dynamic accent Co-Authored-By: Claude Sonnet 4.6 --- .../src/components/layout/AppShell.vue | 31 ++++++--- .../components/sidebar/AccountSwitcher.vue | 11 ---- .../src/components/sidebar/FolderTreeItem.vue | 6 +- src/renderer/src/stores/settings.store.ts | 63 ++++++++++++++++--- src/renderer/src/views/SettingsView.vue | 58 ++++++++++++++++- 5 files changed, 136 insertions(+), 33 deletions(-) diff --git a/src/renderer/src/components/layout/AppShell.vue b/src/renderer/src/components/layout/AppShell.vue index d128109..bf11f95 100644 --- a/src/renderer/src/components/layout/AppShell.vue +++ b/src/renderer/src/components/layout/AppShell.vue @@ -113,39 +113,50 @@ function stopResize(): void { .account-bar { width: var(--sidebar-width); flex-shrink: 0; - background: rgba(255, 255, 255, 0.025); - backdrop-filter: var(--blur-md); - -webkit-backdrop-filter: var(--blur-md); + position: relative; + z-index: 4; + background: rgba(255, 255, 255, 0.04); + backdrop-filter: blur(32px) saturate(1.8); + -webkit-backdrop-filter: blur(32px) saturate(1.8); border-right: 1px solid var(--glass-border); + box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.08); } .folder-pane { flex-shrink: 0; - background: rgba(255, 255, 255, 0.03); - backdrop-filter: var(--blur-md); - -webkit-backdrop-filter: var(--blur-md); + position: relative; + z-index: 3; + background: rgba(255, 255, 255, 0.035); + backdrop-filter: blur(28px) saturate(1.6); + -webkit-backdrop-filter: blur(28px) saturate(1.6); overflow-y: auto; min-width: 180px; max-width: 400px; border-right: 1px solid var(--glass-border); + box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.06); } .message-pane { flex-shrink: 0; + position: relative; + z-index: 2; background: rgba(255, 255, 255, 0.025); - backdrop-filter: var(--blur-sm); - -webkit-backdrop-filter: var(--blur-sm); + backdrop-filter: blur(20px) saturate(1.4); + -webkit-backdrop-filter: blur(20px) saturate(1.4); overflow: hidden; min-width: 240px; max-width: 600px; border-right: 1px solid var(--glass-border); + box-shadow: 4px 0 16px rgba(0, 0, 0, 0.25); } .preview-pane { flex: 1; + position: relative; + z-index: 1; background: rgba(255, 255, 255, 0.015); - backdrop-filter: var(--blur-sm); - -webkit-backdrop-filter: var(--blur-sm); + backdrop-filter: blur(16px) saturate(1.2); + -webkit-backdrop-filter: blur(16px) saturate(1.2); overflow: hidden; min-width: 0; } diff --git a/src/renderer/src/components/sidebar/AccountSwitcher.vue b/src/renderer/src/components/sidebar/AccountSwitcher.vue index 9ec5734..7b5c72c 100644 --- a/src/renderer/src/components/sidebar/AccountSwitcher.vue +++ b/src/renderer/src/components/sidebar/AccountSwitcher.vue @@ -35,7 +35,6 @@ function getAccountColor(index: number): string { > {{ getInitial(account.email) }} -
@@ -104,16 +103,6 @@ function getAccountColor(index: number): string { filter: brightness(1.1); } -.active-indicator { - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 3px; - height: 18px; - background: var(--accent); - border-radius: 0 3px 3px 0; -} .add-icon { font-size: 20px; diff --git a/src/renderer/src/components/sidebar/FolderTreeItem.vue b/src/renderer/src/components/sidebar/FolderTreeItem.vue index 07ba0e1..0111eb9 100644 --- a/src/renderer/src/components/sidebar/FolderTreeItem.vue +++ b/src/renderer/src/components/sidebar/FolderTreeItem.vue @@ -101,12 +101,12 @@ function toggleExpand(event: Event): void { content: ''; position: absolute; left: -4px; - top: 20%; - height: 60%; + top: 15%; + height: 70%; width: 3px; background: var(--accent); border-radius: 0 3px 3px 0; - box-shadow: 0 0 8px rgba(168, 230, 0, 0.5); + box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); } .folder-item.active .folder-name { diff --git a/src/renderer/src/stores/settings.store.ts b/src/renderer/src/stores/settings.store.ts index e57cbcf..7dd8646 100644 --- a/src/renderer/src/stores/settings.store.ts +++ b/src/renderer/src/stores/settings.store.ts @@ -17,9 +17,42 @@ export const SWIPE_ACTION_INFO: Record { const saved = load() - const swipeLeftAction = ref(saved.swipeLeftAction ?? 'delete') + const swipeLeftAction = ref(saved.swipeLeftAction ?? 'delete') const swipeRightAction = ref(saved.swipeRightAction ?? 'toggleRead') + const accentId = ref(saved.accentId ?? 'lime') - watch([swipeLeftAction, swipeRightAction], () => { - localStorage.setItem(STORAGE_KEY, JSON.stringify({ - swipeLeftAction: swipeLeftAction.value, - swipeRightAction: swipeRightAction.value - })) + // Apply saved accent immediately on store init + const initPreset = ACCENT_PRESETS.find(p => p.id === accentId.value) ?? ACCENT_PRESETS[0] + applyAccent(initPreset) + + watch(accentId, (id) => { + const preset = ACCENT_PRESETS.find(p => p.id === id) ?? ACCENT_PRESETS[0] + applyAccent(preset) + persist() }) - return { swipeLeftAction, swipeRightAction } + watch([swipeLeftAction, swipeRightAction], persist) + + function persist(): void { + localStorage.setItem(STORAGE_KEY, JSON.stringify({ + swipeLeftAction: swipeLeftAction.value, + swipeRightAction: swipeRightAction.value, + accentId: accentId.value, + })) + } + + return { swipeLeftAction, swipeRightAction, accentId } }) diff --git a/src/renderer/src/views/SettingsView.vue b/src/renderer/src/views/SettingsView.vue index 4e7702a..18ac7ba 100644 --- a/src/renderer/src/views/SettingsView.vue +++ b/src/renderer/src/views/SettingsView.vue @@ -1,7 +1,7 @@