mirror of
https://github.com/mue/mue.git
synced 2026-07-21 07:54:13 +02:00
feat: widget zoom for weather and fixes
This commit is contained in:
@@ -59,7 +59,7 @@ export default class Quote extends React.PureComponent {
|
||||
return this.setState({
|
||||
quote: favouriteQuote.split(' - ')[0],
|
||||
author: favouriteQuote.split(' - ')[1],
|
||||
authorlink: this.getAuthorLink(data.author)
|
||||
authorlink: this.getAuthorLink(favouriteQuote.split(' - ')[1])
|
||||
});
|
||||
}
|
||||
|
||||
@@ -132,8 +132,6 @@ export default class Quote extends React.PureComponent {
|
||||
return this.doOffline();
|
||||
}
|
||||
|
||||
console.log(this.getAuthorLink(data.author))
|
||||
|
||||
this.setState({
|
||||
quote: '"' + data.quote + '"',
|
||||
author: data.author,
|
||||
|
||||
@@ -110,15 +110,20 @@ export default class Weather extends React.PureComponent {
|
||||
original_temp_max: data.main.temp_max
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelector('.weather svg').style.fontSize = `${0.95 * Number((localStorage.getItem('zoomWeather') || 100) / 100)}em`;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
EventBus.on('refresh', (data) => {
|
||||
if (data === 'weather') {
|
||||
this.getWeather();
|
||||
document.querySelector('.weather').style.fontSize = `${Number((localStorage.getItem('zoomWeather') || 100) / 100)}em`;
|
||||
document.querySelector('.weather svg').style.fontSize = `${0.95 * Number((localStorage.getItem('zoomWeather') || 100) / 100)}em`;
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelector('.weather').style.fontSize = `${Number((localStorage.getItem('zoomWeather') || 100) / 100)}em`;
|
||||
this.getWeather();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user