Skip to content

Commit

Permalink
Updated icons; Fixed weather mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
smirko-dev committed Dec 3, 2021
1 parent ef8dbd0 commit 142a3d7
Show file tree
Hide file tree
Showing 27 changed files with 77 additions and 66 deletions.
41 changes: 26 additions & 15 deletions companion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ function findWeatherConditionIcon(condition) {
case WeatherCondition.MostlyClearNight:
return 'weather-night.png';
case WeatherCondition.Cloudy:
case WeatherCondition.Overcast:
return 'weather-cloudy.png';
case WeatherCondition.Cold:
return 'weather-snowflake-alert.png';
case WeatherCondition.Flurries:
return '';
return 'weather-snowy.png';
case WeatherCondition.Fog:
return 'weather-fog.png';
case WeatherCondition.FreezingRain:
Expand All @@ -140,40 +141,50 @@ function findWeatherConditionIcon(condition) {
case WeatherCondition.Hot:
return 'weather-sunny-alert.png';
case WeatherCondition.Ice:
return 'weather-snowflake.png';
return 'weather-snowflake-alert.png';
case WeatherCondition.IntermittentCloudsDay:
case WeatherCondition.MostlyCloudyDay:
return 'weather-partly-cloudy.png';
case WeatherCondition.IntermittentCloudsNight:
case WeatherCondition.MostlyCloudyNight:
return 'weather-night-partly-cloudy.png';
case WeatherCondition.MostlyCloudyWithFlurriesDay:
case WeatherCondition.MostlyCloudyWithFlurriesNight:
case WeatherCondition.MostlyCloudyWithShowersDay:
case WeatherCondition.MostlyCloudyWithShowersNight:
case WeatherCondition.PartlyCloudyWithShowersNight:
case WeatherCondition.PartlySunnyWithShowersDay:
return 'weather-partly-rainy.png.png';
case WeatherCondition.PartlySunnyWithFlurriesDay:
case WeatherCondition.MostlyCloudyWithFlurriesDay:
case WeatherCondition.MostlyCloudyWithFlurriesNight:
case WeatherCondition.MostlyCloudyWithSnowDay:
case WeatherCondition.MostlyCloudyWithSnowNight:
return 'weather-partly-snowy.png';
case WeatherCondition.MostlyCloudyWithThunderstormsDay:
case WeatherCondition.MostlyCloudyWithThunderstormsNight:
case WeatherCondition.MostlySunnyDay:
case WeatherCondition.Overcast:
case WeatherCondition.PartlyCloudyNight:
case WeatherCondition.PartlyCloudyWithShowersNight:
case WeatherCondition.PartlyCloudyWithThunderstormsNight:
case WeatherCondition.PartlySunnyDay:
case WeatherCondition.PartlySunnyWithFlurriesDay:
case WeatherCondition.PartlySunnyWithShowersDay:
case WeatherCondition.PartlySunnyWithThunderstormsDay:
case WeatherCondition.Thunderstorms:
return 'weather-lightning.png';
case WeatherCondition.MostlySunnyDay:
case WeatherCondition.PartlySunnyDay:
return 'weather-partly-cloudy.png';
case WeatherCondition.Rain:
return 'weather-rainy.png';
case WeatherCondition.RainAndSnow:
case WeatherCondition.Showers:
case WeatherCondition.Sleet:
return 'weather-snowy-rainy.png';
case WeatherCondition.Showers:
return 'weather-pouring.png';
case WeatherCondition.Snow:
return 'weather-snowflake.png';
case WeatherCondition.SunnyDay:
case WeatherCondition.Thunderstorms:
return 'weather-sunny.png';
case WeatherCondition.Windy:
return 'weather-windy.png';
case WeatherCondition.PartlyCloudyNight:
return 'weather-night-partly-cloudy.png';
default:
console.log(`UNUSED WEATHER ICON: ${condition}`);
break;
return 'thermometer.png';
}
return 'thermometer.png';
}
4 changes: 2 additions & 2 deletions resources/thermometer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-cloudy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-fog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-hail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-hazy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-lightning-rainy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-lightning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-night-partly-cloudy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-night.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-partly-cloudy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-partly-lightning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-partly-rainy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-partly-snowy-rainy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-partly-snowy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-pouring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-rainy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-snowflake-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-snowflake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-snowy-heavy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-snowy-rainy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-snowy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-storm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-sunny-alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-sunny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions resources/weather-windy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion settings/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function settingsFunc(props) {
{ name: `${gettext("steps")}`, value: 'steps' },
{ name: `${gettext("dist")}`, value: 'distance' },
{ name: `${gettext("floors")}`, value: 'floors' },
{ name: `${gettext("calories")}`, value: 'calories' },
{ name: `${gettext("cal")}`, value: 'calories' },
{ name: `${gettext("weather")}`, value: 'weather' }
]}
onSelection={(value) => console.log(value)}
Expand Down

0 comments on commit 142a3d7

Please sign in to comment.