From 32cd799f25e4e3b0f61a7e2d20389e7af009e532 Mon Sep 17 00:00:00 2001 From: NieiR Date: Thu, 15 Jan 2026 09:57:33 +0800 Subject: [PATCH] fix: improve mobile layout for provider list - Use flex-wrap on mobile, flex-nowrap on desktop - Remove name truncation on mobile for better readability - Add mobile-specific metrics editing row (priority/weight/cost multiplier) - Increase touch target spacing (gap-3) for action buttons on mobile - Add visual separator between content and actions on mobile --- .../_components/provider-rich-list-item.tsx | 61 +++++++++++++++++-- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/src/app/[locale]/settings/providers/_components/provider-rich-list-item.tsx b/src/app/[locale]/settings/providers/_components/provider-rich-list-item.tsx index 51b26ca6..a93028af 100644 --- a/src/app/[locale]/settings/providers/_components/provider-rich-list-item.tsx +++ b/src/app/[locale]/settings/providers/_components/provider-rich-list-item.tsx @@ -345,7 +345,7 @@ export function ProviderRichListItem({ return ( <> -
+
{/* 左侧:状态和类型图标 */}
{/* 启用状态指示器 */} @@ -366,7 +366,7 @@ export function ProviderRichListItem({
{/* 中间:名称、URL、官网、tag、熔断状态 */} -
+
{/* Favicon */} {provider.faviconUrl && ( @@ -382,7 +382,7 @@ export function ProviderRichListItem({ )} {/* 名称 */} - {provider.name} + {provider.name} {/* Group Tags (supports comma-separated values) */} {(provider.groupTag @@ -556,8 +556,61 @@ export function ProviderRichListItem({ )}
+ {/* 移动端:指标快速编辑 */} +
+
+
{tList("priority")}
+
+ {canEdit ? ( + + ) : ( + {provider.priority} + )} +
+
+
+
{tList("weight")}
+
+ {canEdit ? ( + + ) : ( + {provider.weight} + )} +
+
+
+
{tList("costMultiplier")}
+
+ {canEdit ? ( + + ) : ( + {provider.costMultiplier}x + )} +
+
+
+ {/* 操作按钮 */} -
+
{/* 启用/禁用切换 */} {canEdit && (