feat(clock widget): Adds animated weather and temp (#6372)

This commit is contained in:
Bergasha authored and GitHub committed 2026-07-23 00:04:32 +02:00
1 parent 9bb0c0f811
commit 7184bc09c1
6 files changed
+200 -23

No files matched your search

+5 -4
View File
@@ -12,7 +12,8 @@ import { useScopedI18n } from "@homarr/translation/client";
import { WidgetEmptyState } from "../common/empty-state";
import type { WidgetComponentProps } from "../definition";
import { WeatherDescription, WeatherIcon } from "./icon";
import { AnimatedWeatherIcon } from "./animated-icon";
import { WeatherDescription } from "./icon";
export default function WeatherWidget({ isEditMode, options }: WidgetComponentProps<"weather">) {
const input = {
@@ -55,7 +56,7 @@ const DailyWeather = ({ options, weather }: WeatherProps) => {
<HoverCard>
<HoverCard.Target>
<Box>
<WeatherIcon size={30} code={weather.current.weathercode} />
<AnimatedWeatherIcon size={30} code={weather.current.weathercode} />
</Box>
</HoverCard.Target>
<HoverCard.Dropdown>
@@ -146,7 +147,7 @@ const WeeklyForecast = ({ options, weather }: WeatherProps) => {
<HoverCard>
<HoverCard.Target>
<Box>
<WeatherIcon size={16} code={weather.current.weathercode} />
<AnimatedWeatherIcon size={16} code={weather.current.weathercode} />
</Box>
</HoverCard.Target>
<HoverCard.Dropdown>
@@ -184,7 +185,7 @@ function Forecast({ weather, options }: WeatherProps) {
align="center"
>
<Text fz="xl">{dayjs(dayWeather.time).format("dd")}</Text>
<WeatherIcon size={16} code={dayWeather.weatherCode} />
<AnimatedWeatherIcon size={16} code={dayWeather.weatherCode} />
<Text fz={16}>
{getPreferredUnit(dayWeather.maxTemp, options.isFormatFahrenheit, options.disableTemperatureDecimals)}
</Text>