This commit is contained in:
Jasper 2025-11-08 21:26:26 +00:00 committed by GitHub
commit cfd4ef264d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 6 deletions

View file

@ -57,7 +57,8 @@ export default {
},
endpoint() {
const { apiKey, city } = this.options;
const params = `?q=${city}&cnt=${this.numDays}&units=${this.units}&appid=${apiKey}`;
const count = this.numDays * 8;
const params = `?q=${city}&cnt=${count}&units=${this.units}&appid=${apiKey}`;
return `${widgetApiEndpoints.weatherForecast}${params}`;
},
tempDisplayUnits() {
@ -92,9 +93,12 @@ export default {
/* Process the results from the Axios request */
processData(dataList) {
const uiWeatherData = [];
dataList.list.forEach((day, index) => {
const step = 8;
for (let i = 1; i < dataList.list.length; i += step) {
const day = dataList.list[i];
uiWeatherData.push({
index,
index: i,
date: this.dateFromStamp(day.dt),
icon: day.weather[0].icon,
main: day.weather[0].main,
@ -102,7 +106,7 @@ export default {
temp: this.processTemp(day.main.temp),
info: this.makeWeatherData(day),
});
});
}
this.weatherData = uiWeatherData;
},
/* Process additional data, needed when user clicks a given day */

View file

@ -1889,7 +1889,7 @@ html[data-theme='neomorphic'] {
div.edit-mode-bottom-banner, .add-new-section {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(50px);
//backdrop-filter: blur(50px);
}
.critical-error-wrap {
@ -1910,7 +1910,7 @@ html[data-theme='glass'] {
}
html[data-theme='glass-2'] {
body {
body {
background: url('https://i.ibb.co/FnLH6bj/dashy-glass.jpg') center center no-repeat;
background-size: cover;
background-color: #090317;