移除 AI 机场报文解读面板的折叠收起按钮
将 <details>/<summary> 改为普通 <section>/<div>,面板始终展开。 移除 isCompactCard prop 及相关的 open/onToggle 状态管理。
This commit is contained in:
@@ -879,10 +879,6 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root :global(.scan-ai-city-ai-read summary) {
|
|
||||||
cursor: pointer;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.root :global(.scan-ai-city-ai-read summary::-webkit-details-marker) {
|
.root :global(.scan-ai-city-ai-read summary::-webkit-details-marker) {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import type {
|
import type {
|
||||||
AiCityForecastPayload,
|
AiCityForecastPayload,
|
||||||
AiCityForecastState,
|
AiCityForecastState,
|
||||||
@@ -28,7 +27,6 @@ export function AiEvidencePanel({
|
|||||||
aiRuleEvidenceText,
|
aiRuleEvidenceText,
|
||||||
debPrediction,
|
debPrediction,
|
||||||
fallbackAiReason,
|
fallbackAiReason,
|
||||||
isCompactCard,
|
|
||||||
isEn,
|
isEn,
|
||||||
isHkoObservation,
|
isHkoObservation,
|
||||||
localModelSupportNote,
|
localModelSupportNote,
|
||||||
@@ -49,7 +47,6 @@ export function AiEvidencePanel({
|
|||||||
aiRuleEvidenceText: string;
|
aiRuleEvidenceText: string;
|
||||||
debPrediction: number | null;
|
debPrediction: number | null;
|
||||||
fallbackAiReason: string;
|
fallbackAiReason: string;
|
||||||
isCompactCard: boolean;
|
|
||||||
isEn: boolean;
|
isEn: boolean;
|
||||||
isHkoObservation: boolean;
|
isHkoObservation: boolean;
|
||||||
localModelSupportNote: string;
|
localModelSupportNote: string;
|
||||||
@@ -57,12 +54,6 @@ export function AiEvidencePanel({
|
|||||||
rawObservationText: string;
|
rawObservationText: string;
|
||||||
tempSymbol: string;
|
tempSymbol: string;
|
||||||
}) {
|
}) {
|
||||||
const [isOpen, setIsOpen] = useState(() => !isCompactCard);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setIsOpen(!isCompactCard);
|
|
||||||
}, [isCompactCard]);
|
|
||||||
|
|
||||||
const aiConfidenceMeta = confidenceBadge(aiConfidence, isEn);
|
const aiConfidenceMeta = confidenceBadge(aiConfidence, isEn);
|
||||||
const hasAiPrediction = aiPredictedMax != null;
|
const hasAiPrediction = aiPredictedMax != null;
|
||||||
const hasDebPrediction = debPrediction != null;
|
const hasDebPrediction = debPrediction != null;
|
||||||
@@ -72,12 +63,8 @@ export function AiEvidencePanel({
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<details
|
<section className="scan-ai-city-section scan-ai-city-ai-read">
|
||||||
className="scan-ai-city-section scan-ai-city-ai-read"
|
<div className="scan-ai-city-section-title">
|
||||||
open={isOpen}
|
|
||||||
onToggle={(event) => setIsOpen(event.currentTarget.open)}
|
|
||||||
>
|
|
||||||
<summary className="scan-ai-city-section-title">
|
|
||||||
{isHkoObservation
|
{isHkoObservation
|
||||||
? isEn
|
? isEn
|
||||||
? "Evidence · AI HKO observation read"
|
? "Evidence · AI HKO observation read"
|
||||||
@@ -85,8 +72,7 @@ export function AiEvidencePanel({
|
|||||||
: isEn
|
: isEn
|
||||||
? "Evidence · AI airport read"
|
? "Evidence · AI airport read"
|
||||||
: "证据 · AI 机场报文解读"}
|
: "证据 · AI 机场报文解读"}
|
||||||
</summary>
|
</div>
|
||||||
{isOpen ? (
|
|
||||||
<div className="scan-ai-city-section-body">
|
<div className="scan-ai-city-section-body">
|
||||||
{hasAiPrediction || hasDebPrediction ? (
|
{hasAiPrediction || hasDebPrediction ? (
|
||||||
<div className="scan-ai-prediction-dual">
|
<div className="scan-ai-prediction-dual">
|
||||||
@@ -199,7 +185,6 @@ export function AiEvidencePanel({
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
</section>
|
||||||
</details>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -640,7 +640,6 @@ export function AiPinnedCityCard({
|
|||||||
aiRuleEvidenceText={aiRuleEvidenceText}
|
aiRuleEvidenceText={aiRuleEvidenceText}
|
||||||
debPrediction={debNumber}
|
debPrediction={debNumber}
|
||||||
fallbackAiReason={fallbackAiReason}
|
fallbackAiReason={fallbackAiReason}
|
||||||
isCompactCard={isCompactCard}
|
|
||||||
isEn={isEn}
|
isEn={isEn}
|
||||||
isHkoObservation={isHkoObservation}
|
isHkoObservation={isHkoObservation}
|
||||||
localModelSupportNote={localModelSupportNote}
|
localModelSupportNote={localModelSupportNote}
|
||||||
|
|||||||
@@ -193,7 +193,6 @@ export function MobileDecisionCard({
|
|||||||
aiRuleEvidenceText={aiRuleEvidenceText}
|
aiRuleEvidenceText={aiRuleEvidenceText}
|
||||||
debPrediction={debPrediction}
|
debPrediction={debPrediction}
|
||||||
fallbackAiReason={fallbackAiReason}
|
fallbackAiReason={fallbackAiReason}
|
||||||
isCompactCard
|
|
||||||
isEn={isEn}
|
isEn={isEn}
|
||||||
isHkoObservation={isHkoObservation}
|
isHkoObservation={isHkoObservation}
|
||||||
localModelSupportNote={localModelSupportNote}
|
localModelSupportNote={localModelSupportNote}
|
||||||
|
|||||||
Reference in New Issue
Block a user