Files
PolyWeather/frontend/components/dashboard/scan-terminal/WeatherDecisionBand.tsx
T
2569718930@qq.com f47de115c8 Reduce duplicate scan terminal decision copy and chrome
Removed the scan KPI bar, trimmed redundant decision-card content, and shortened the primary reason text so the city analysis cards read like concise signals instead of repeating the same state across sections.

Constraint: Keep existing city decision logic and data flow unchanged while simplifying the UI
Rejected: Rework the full card layout or mobile card flow | larger surface area than requested
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep hero, decision band, and market line responsibilities separate to avoid duplicate copy returning
Tested: frontend npm run build
Not-tested: Manual visual QA in browser across desktop/mobile breakpoints
2026-05-10 12:20:22 +08:00

57 lines
1.7 KiB
TypeScript

"use client";
import clsx from "clsx";
import type {
MarketDecisionView,
WeatherDecisionView,
} from "@/components/dashboard/scan-terminal/city-card-decision-utils";
import { MarketDecisionLine } from "@/components/dashboard/scan-terminal/MarketDecisionLine";
export function WeatherDecisionBand({
decisionView,
decisionWhyText,
isEn,
marketDecisionView,
marketLineText,
paceDeltaText,
}: {
decisionView: WeatherDecisionView;
decisionWhyText: string;
isEn: boolean;
marketDecisionView: MarketDecisionView;
marketLineText: string;
paceDeltaText: string;
}) {
return (
<section className={clsx("scan-ai-decision-band", decisionView.tone)}>
<div className="scan-ai-decision-main">
<span>{decisionView.kicker}</span>
<strong>{decisionView.action}</strong>
<p className="scan-ai-decision-why">{decisionWhyText}</p>
<MarketDecisionLine
isEn={isEn}
marketDecisionView={marketDecisionView}
marketLineText={marketLineText}
/>
</div>
<div className="scan-ai-decision-metrics">
<span>
{isEn ? "Weather range" : "天气区间"}
<b>{decisionView.targetRange}</b>
</span>
<span>
{isEn ? "Confidence" : "信心"}
<b>{decisionView.confidence}</b>
</span>
<span>
{isEn ? "Path delta" : "路径偏差"} <b>{paceDeltaText}</b>
</span>
<span>
{isEn ? "Quote status" : "报价状态"}{" "}
<b>{marketDecisionView.status === "ready" ? (isEn ? "Ready" : "已同步") : marketDecisionView.status === "loading" ? (isEn ? "Loading" : "同步中") : (isEn ? "Unavailable" : "不可用")}</b>
</span>
</div>
</section>
);
}