From b07200faec63df88954fd9f9f0163d8a848d1ee8 Mon Sep 17 00:00:00 2001 From: kyx236 Date: Sat, 7 Feb 2026 19:46:30 +0800 Subject: [PATCH] feat(s2a): Improve group display layout with grid-based cards - Replace badge-style group display with grid-based card layout for better readability - Add group name and ID display in selected groups section with truncation handling - Reorganize profile card group summary to use dedicated grid section below parameters - Remove inline group information from parameter summary badge - Improve visual hierarchy and spacing in group display components - Enhance dark mode styling for group cards with better contrast and borders --- frontend/src/pages/S2AConfig.tsx | 48 ++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/frontend/src/pages/S2AConfig.tsx b/frontend/src/pages/S2AConfig.tsx index 56e5489..c3dc130 100644 --- a/frontend/src/pages/S2AConfig.tsx +++ b/frontend/src/pages/S2AConfig.tsx @@ -420,9 +420,8 @@ export default function S2AConfig() { setFormPriority(Number(e.target.value))} hint="数值越大优先级越高" />
- {/* 标题 + 获取按钮 */} -
- + {/* 获取按钮 */} +
- - ))} - {formGroupIds.length === 0 && 未选择分组} + {/* 已选分组 */} +
+ {formGroupIds.map(id => { + const group = availableGroups.find(g => g.id === id) + return ( +
+
+ {group ? group.name : `#${id}`} + {group && #{id}} +
+ +
+ ) + })} + {formGroupIds.length === 0 && 未选择分组}
{/* 可选分组列表 */} @@ -621,18 +626,13 @@ function ProfileCard({ profile, isActive, isActivating, groupNameCache, onActiva
{/* 参数摘要 */} -
+
并发 {profile.concurrency} 优先级 {profile.priority} - {parsedGroups.length > 0 && ( - - 分组 {parsedGroups.map(id => groupNameCache[id] ? `${groupNameCache[id]} #${id}` : `#${id}`).join(', ')} - - )} {profile.proxy_enabled && ( 代理 @@ -640,6 +640,18 @@ function ProfileCard({ profile, isActive, isActivating, groupNameCache, onActiva )}
+ {/* 分组列表 */} + {parsedGroups.length > 0 && ( +
+ {parsedGroups.map(id => ( +
+ {groupNameCache[id] || `#${id}`} + {groupNameCache[id] && #{id}} +
+ ))} +
+ )} + {/* 操作按钮 */}
{!isActive ? (