From 6eb304ef940a12439f0de3a91bf72c31c68a7f4a Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 4 May 2026 19:22:18 +0800 Subject: [PATCH] fix(ui): apply missing flex wrapping and fix sidebar active indicator --- src/pages/SettingsPage.scss | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/pages/SettingsPage.scss b/src/pages/SettingsPage.scss index f18308d..6cf1c34 100644 --- a/src/pages/SettingsPage.scss +++ b/src/pages/SettingsPage.scss @@ -111,6 +111,7 @@ border-right: 1px solid var(--border-color); .tab-btn { + position: relative; display: flex; align-items: center; gap: 10px; @@ -123,29 +124,35 @@ color: var(--text-secondary); background: transparent; cursor: pointer; - transition: all 0.15s ease; + transition: background 0.15s ease, color 0.15s ease; text-align: left; + // Left accent bar for active state + &::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%) scaleY(0); + width: 3px; + height: 16px; + border-radius: 0 2px 2px 0; + background: var(--primary); + transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + } + &:hover { background: var(--bg-hover); color: var(--text-primary); } &.active { - position: relative; background: var(--bg-hover); color: var(--text-primary); - font-weight: 500; + font-weight: 600; &::before { - content: ''; - position: absolute; - left: -8px; - top: 20%; - bottom: 20%; - width: 3px; - background: var(--primary); - border-radius: 0 4px 4px 0; + transform: translateY(-50%) scaleY(1); } } } @@ -2911,6 +2918,7 @@ padding: 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--border-color) 88%, transparent); + flex-wrap: wrap; background: linear-gradient( 180deg, color-mix(in srgb, var(--bg-secondary) 94%, var(--primary) 6%) 0%, @@ -2941,9 +2949,9 @@ .anti-revoke-metrics { flex: 1; display: grid; - grid-template-columns: repeat(4, minmax(112px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; - min-width: 460px; + min-width: 0; } .anti-revoke-metric {