fix: simplify material search status hints
This commit is contained in:
parent
f8900a0d72
commit
1a82296133
@ -109,12 +109,6 @@ export function AgentWorkflowMaterialPicker({
|
||||
value: result?.goodsInfo?.boardType || null,
|
||||
},
|
||||
].filter((item) => Boolean(item.value));
|
||||
const goodsInfoMissingHint =
|
||||
result?.queryType === "sku" &&
|
||||
Boolean(String(result?.matchedSku || result?.query || "").trim()) &&
|
||||
goodsInfoItems.length === 0
|
||||
? `当前 SKU「${result?.matchedSku || result?.query}」暂未从商品信息接口匹配到商品名称、尺寸或材质信息。`
|
||||
: "";
|
||||
const remainingSelectableCount =
|
||||
resolvedSelectionLimit === null ? null : Math.max(resolvedSelectionLimit - selectedCount, 0);
|
||||
const totalImageCount = result?.images?.length || 0;
|
||||
@ -276,24 +270,6 @@ export function AgentWorkflowMaterialPicker({
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{searchNote ? (
|
||||
<div className={cn("text-xs", isDark ? "text-white/56" : "text-muted-foreground")}>
|
||||
{searchNote}
|
||||
</div>
|
||||
) : null}
|
||||
{resolvedSelectionLimit !== null ? (
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-[20px] border px-3 py-2 text-xs",
|
||||
isDark
|
||||
? "border-emerald-500/18 bg-emerald-500/[0.08] text-emerald-100"
|
||||
: "border-emerald-200 bg-emerald-50 text-emerald-700"
|
||||
)}
|
||||
>
|
||||
{selectionLimitLabel}最多可选择 {resolvedSelectionLimit} 张图片
|
||||
{remainingSelectableCount !== null ? `,当前还可选择 ${remainingSelectableCount} 张。` : "。"}
|
||||
</div>
|
||||
) : null}
|
||||
{disabled && disabledHint ? (
|
||||
<div
|
||||
className={cn(
|
||||
@ -369,6 +345,7 @@ export function AgentWorkflowMaterialPicker({
|
||||
)}
|
||||
>
|
||||
最多 {resolvedSelectionLimit} 张
|
||||
{remainingSelectableCount !== null ? ` · 还可选 ${remainingSelectableCount} 张` : ""}
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
@ -477,19 +454,6 @@ export function AgentWorkflowMaterialPicker({
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{goodsInfoMissingHint ? (
|
||||
<div
|
||||
className={cn(
|
||||
"rounded-[20px] border px-3 py-2 text-xs",
|
||||
isDark
|
||||
? "border-amber-500/20 bg-amber-500/10 text-amber-100"
|
||||
: "border-amber-200 bg-amber-50 text-amber-800"
|
||||
)}
|
||||
>
|
||||
{goodsInfoMissingHint}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{result.skuOptions?.length ? (
|
||||
<div className="grid grid-cols-1 gap-3 xl:grid-cols-2">
|
||||
{result.skuOptions.map((option) => (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user