diff --git a/src/components/layout/TopBar.tsx b/src/components/layout/TopBar.tsx index f266eac..dade940 100644 --- a/src/components/layout/TopBar.tsx +++ b/src/components/layout/TopBar.tsx @@ -300,9 +300,9 @@ function pageTitle(page: AppPage | null) { return "Gráficos Gerais"; case "meteo": - return "Previsões"; + return "Previsões Meteorológicas"; case "meteoCharts": - return "Gráficos"; + return "Gráficos Meteorológicos"; case "synoptic": return "Sinótico"; @@ -315,11 +315,13 @@ function pageTitle(page: AppPage | null) { // ALL CLIMATE PAGES case "climate": - case "climateCharts": case "climateLighting": case "climateVentilation": return "Clima"; + case "climateCharts": + return "Gráficos Climáticos"; + // ALL IRRIGATION / REGA PAGES case "irrigation": case "irrigationCharts": diff --git a/src/features/meteo/pages/MeteoPage.tsx b/src/features/meteo/pages/MeteoPage.tsx index 4925586..ad9a68b 100644 --- a/src/features/meteo/pages/MeteoPage.tsx +++ b/src/features/meteo/pages/MeteoPage.tsx @@ -202,7 +202,7 @@ export function MeteoPage({ theme, onOpenMeteoCharts }: MeteoPageProps) { ); return ( -
+
{selectedDayIndex === 0 ? "Condições de hoje" : `Previsão para ${heroDateLabel}`} @@ -633,7 +645,7 @@ function WeatherHeroPanel({ Abrir quadro meteorológico @@ -658,13 +670,13 @@ function WeatherHeroPanel({ )} - + {formatNumber(heroTemperature, 1)}° - + {conditionText} - + {heroMinTemperature !== null ? `Mínima ${formatNumber(heroMinTemperature, 0)}°` : "Sem mínima disponível"} @@ -672,8 +684,9 @@ function WeatherHeroPanel({ - + Previsão diária - Próximos 7 dias + Próximos 7 dias {selectedDay && ( - + Dia selecionado - + {weekday(selectedDay.date)} · {shortDate(selectedDay.date)} @@ -807,6 +824,7 @@ function ForecastDayCard({ className={[ RADIUS, "group relative min-h-[110px] overflow-hidden px-3.5 py-3 text-left outline-none transition-all duration-300 focus-visible:ring-1 focus-visible:ring-sky-300/45", + isDark ? "border border-white/[0.035]" : "border border-slate-200", active ? isDark ? "bg-white/[0.04]" @@ -816,14 +834,23 @@ function ForecastDayCard({ : "bg-slate-100/60 hover:bg-slate-100", ].join(" ")} style={{ - backgroundImage: ` - linear-gradient( - 180deg, - rgba(4,13,24,${active ? "0.78" : "0.86"}), - rgba(4,13,24,${active ? "0.95" : "0.985"}) - ), - url(${background}) - `, + backgroundImage: isDark + ? ` + linear-gradient( + 180deg, + rgba(4,13,24,${active ? "0.78" : "0.86"}), + rgba(4,13,24,${active ? "0.95" : "0.985"}) + ), + url(${background}) + ` + : ` + linear-gradient( + 180deg, + rgba(255,255,255,${active ? "0.50" : "0.58"}), + rgba(248,250,252,${active ? "0.76" : "0.84"}) + ), + url(${background}) + `, backgroundSize: "cover", backgroundPosition: "center 24%", }} @@ -862,10 +889,10 @@ function ForecastDayCard({ - + {label} - + {shortDate(day.date)} @@ -888,10 +915,10 @@ function ForecastDayCard({ - + {Math.round(day.maxTemperatureC)}° - + {Math.round(day.minTemperatureC)}° @@ -899,9 +926,13 @@ function ForecastDayCard({ UV {formatNumber(day.uv, 0)} @@ -1212,12 +1243,19 @@ function RealtimeChartPanel({ }); } + const hasAnyChartData = chart.variables.some( + (variable) => variable.data.length > 0, + ); return ( - + Gráficos Personalizados @@ -1228,7 +1266,7 @@ function RealtimeChartPanel({ - + {title} - {value} - {helper} + + {value} + + + {helper} + ); } @@ -1344,7 +1390,7 @@ function SummaryTile({ className={ isDark ? "rounded-[5px] bg-slate-700 px-2 py-1 text-[11px] font-black text-slate-200" - : "rounded-[5px] bg-white px-2 py-1 text-[11px] font-black text-slate-700" + : "rounded-[5px] border border-slate-200 bg-white px-2 py-1 text-[11px] font-black text-slate-700" } > {badge}
{conditionText}
{heroMinTemperature !== null ? `Mínima ${formatNumber(heroMinTemperature, 0)}°` : "Sem mínima disponível"} @@ -672,8 +684,9 @@ function WeatherHeroPanel({
Próximos 7 dias
Dia selecionado
{weekday(selectedDay.date)} · {shortDate(selectedDay.date)}
{value}
{helper}
+ {value} +
+ {helper} +