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