Fixed night weather icons.
This commit is contained in:
@@ -146,6 +146,7 @@ export default {
|
||||
sunny: "weather-clear-symbolic",
|
||||
clear: "weather-clear-night-symbolic",
|
||||
partly_cloudy: "weather-few-clouds-symbolic",
|
||||
partly_cloudy_night: "weather-few-clouds-night-symbolic",
|
||||
cloudy: "weather-overcast-symbolic",
|
||||
overcast: "weather-overcast-symbolic",
|
||||
mist: "weather-overcast-symbolic",
|
||||
|
||||
@@ -98,12 +98,15 @@ const WeatherWidget = () => {
|
||||
Widget.Icon({
|
||||
class_name: "calendar-menu-weather today icon",
|
||||
icon: theWeather.bind("value").as((v) => {
|
||||
return icons.weather[
|
||||
v.current.condition.text
|
||||
let iconQuery = v.current.condition.text
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replaceAll(" ", "_")
|
||||
];
|
||||
|
||||
if (!v.current.isDay && iconQuery === "partly_cloudy") {
|
||||
iconQuery = "partly_cloudy_night";
|
||||
}
|
||||
return icons.weather[iconQuery];
|
||||
}),
|
||||
}),
|
||||
],
|
||||
@@ -275,12 +278,16 @@ const WeatherWidget = () => {
|
||||
(h) => h.time_epoch === nextEpoch,
|
||||
);
|
||||
|
||||
return icons.weather[
|
||||
weatherAtEpoch?.condition.text
|
||||
let iconQuery = weatherAtEpoch?.condition.text
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replaceAll(" ", "_")
|
||||
];
|
||||
|
||||
if (!weatherAtEpoch?.isDay && iconQuery === "partly_cloudy") {
|
||||
iconQuery = "partly_cloudy_night";
|
||||
}
|
||||
|
||||
return icons.weather[iconQuery];
|
||||
}),
|
||||
}),
|
||||
Widget.Label({
|
||||
|
||||
@@ -34,7 +34,11 @@ const Media = () => {
|
||||
)[0];
|
||||
}
|
||||
|
||||
if (media.players.length && curPlayer && curPlayer.play_back_status !== "Stopped") {
|
||||
if (
|
||||
media.players.length &&
|
||||
curPlayer &&
|
||||
curPlayer.play_back_status !== "Stopped"
|
||||
) {
|
||||
return (self.children = [
|
||||
AlbumCover(curPlayer),
|
||||
Widget.Box({
|
||||
|
||||
Reference in New Issue
Block a user