feat: Introduce dashboard data types, utilities, market alert engine, and panel sections.

This commit is contained in:
2569718930@qq.com
2026-03-10 10:07:18 +08:00
parent 732b3c10a5
commit e5011c5c8f
4 changed files with 83 additions and 9 deletions
@@ -550,7 +550,7 @@ export function ModelForecast({
hideTitle?: boolean;
targetDate?: string | null;
}) {
const { t } = useI18n();
const { locale, t } = useI18n();
const view = getModelView(detail, targetDate);
const modelEntries = Object.entries(view.models).filter(([, value]) =>
Number.isFinite(Number(value)),
@@ -565,6 +565,14 @@ export function ModelForecast({
? Math.max(...comparisonValues) + 1
: 1;
const range = Math.max(maxValue - minValue, 1);
const getModelDisplayName = (name: string) => {
if (String(name).trim().toLowerCase() === "meteoblue") {
return locale === "en-US"
? "Meteoblue (Daily Max)"
: "Meteoblue (日最高温)";
}
return name;
};
return (
<section className="models-section">
@@ -587,7 +595,7 @@ export function ModelForecast({
return (
<div key={name} className="model-row">
<div className="model-name" title={name}>
{name}
{getModelDisplayName(name)}
</div>
<div className="model-bar-track">
<div