mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-06 08:34:14 +01:00
Merge 2dddbbae6b into 996de036e8
This commit is contained in:
commit
cfd4ef264d
2 changed files with 10 additions and 6 deletions
|
|
@ -57,7 +57,8 @@ export default {
|
||||||
},
|
},
|
||||||
endpoint() {
|
endpoint() {
|
||||||
const { apiKey, city } = this.options;
|
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}`;
|
return `${widgetApiEndpoints.weatherForecast}${params}`;
|
||||||
},
|
},
|
||||||
tempDisplayUnits() {
|
tempDisplayUnits() {
|
||||||
|
|
@ -92,9 +93,12 @@ export default {
|
||||||
/* Process the results from the Axios request */
|
/* Process the results from the Axios request */
|
||||||
processData(dataList) {
|
processData(dataList) {
|
||||||
const uiWeatherData = [];
|
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({
|
uiWeatherData.push({
|
||||||
index,
|
index: i,
|
||||||
date: this.dateFromStamp(day.dt),
|
date: this.dateFromStamp(day.dt),
|
||||||
icon: day.weather[0].icon,
|
icon: day.weather[0].icon,
|
||||||
main: day.weather[0].main,
|
main: day.weather[0].main,
|
||||||
|
|
@ -102,7 +106,7 @@ export default {
|
||||||
temp: this.processTemp(day.main.temp),
|
temp: this.processTemp(day.main.temp),
|
||||||
info: this.makeWeatherData(day),
|
info: this.makeWeatherData(day),
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
this.weatherData = uiWeatherData;
|
this.weatherData = uiWeatherData;
|
||||||
},
|
},
|
||||||
/* Process additional data, needed when user clicks a given day */
|
/* Process additional data, needed when user clicks a given day */
|
||||||
|
|
|
||||||
|
|
@ -1889,7 +1889,7 @@ html[data-theme='neomorphic'] {
|
||||||
|
|
||||||
div.edit-mode-bottom-banner, .add-new-section {
|
div.edit-mode-bottom-banner, .add-new-section {
|
||||||
background: rgba(255, 255, 255, 0.15);
|
background: rgba(255, 255, 255, 0.15);
|
||||||
backdrop-filter: blur(50px);
|
//backdrop-filter: blur(50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.critical-error-wrap {
|
.critical-error-wrap {
|
||||||
|
|
@ -1910,7 +1910,7 @@ html[data-theme='glass'] {
|
||||||
}
|
}
|
||||||
|
|
||||||
html[data-theme='glass-2'] {
|
html[data-theme='glass-2'] {
|
||||||
body {
|
body {
|
||||||
background: url('https://i.ibb.co/FnLH6bj/dashy-glass.jpg') center center no-repeat;
|
background: url('https://i.ibb.co/FnLH6bj/dashy-glass.jpg') center center no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-color: #090317;
|
background-color: #090317;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue