mirror of
https://github.com/mue/mue.git
synced 2026-07-13 20:13:47 +02:00
feat: individual widget zoom, hot reload for font and custom js/css etc
This commit is contained in:
@@ -160,7 +160,7 @@ export default class Weather extends React.PureComponent {
|
||||
<div className='weather'>
|
||||
<WeatherIcon name={this.state.icon}/>
|
||||
<span>{this.state.weather.temp + this.state.temp_text}</span>
|
||||
<span className='loc' style={{ 'textTransform': 'capitalize' }}><br/>{this.state.weather.description}</span>
|
||||
{enabled('weatherdescription') ? <span className='loc' style={{ 'textTransform': 'capitalize' }}><br/>{this.state.weather.description}</span> : null}
|
||||
<span className='minmax'>{minmax()}</span>
|
||||
{enabled('humidity') ? <span className='loc'><br/><WiHumidity/>{this.state.weather.humidity}%</span> : null}
|
||||
{enabled('windspeed') ? <span className='loc'><br/><WiWindy/>{this.state.weather.wind_speed}<span className='minmax'> m/s</span> {enabled('windDirection') ? <WindDirectionIcon degrees={this.state.weather.wind_degrees}/> : null}</span> : null}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { WiDirectionDownLeft, WiDirectionDownRight, WiDirectionDown, WiDirection
|
||||
export default function WindDirectionIcon(props) {
|
||||
let icon;
|
||||
|
||||
// convert the number openweathermap gives us to closest direction or something
|
||||
const getDirection = (angle) => {
|
||||
const directions = ['North', 'North-West', 'West', 'South-West', 'South', 'South-East', 'East', 'North-East'];
|
||||
return directions[Math.round(((angle %= 360) < 0 ? angle + 360 : angle) / 45) % 8];
|
||||
|
||||
Reference in New Issue
Block a user