mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Hide News Feed loading option
Configuration option to hide News Feed module if feed is empty instead of showing LOADING status
This commit is contained in:
parent
d26d94b62a
commit
81aca500b3
@ -21,6 +21,7 @@ Module.register("newsfeed",{
|
|||||||
showSourceTitle: true,
|
showSourceTitle: true,
|
||||||
showPublishDate: true,
|
showPublishDate: true,
|
||||||
showDescription: false,
|
showDescription: false,
|
||||||
|
hideLoading: false,
|
||||||
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
||||||
updateInterval: 10 * 1000,
|
updateInterval: 10 * 1000,
|
||||||
animationSpeed: 2.5 * 1000,
|
animationSpeed: 2.5 * 1000,
|
||||||
@ -179,12 +180,18 @@ Module.register("newsfeed",{
|
|||||||
fullArticle.src = this.newsItems[this.activeItem].url;
|
fullArticle.src = this.newsItems[this.activeItem].url;
|
||||||
wrapper.appendChild(fullArticle);
|
wrapper.appendChild(fullArticle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.hideLoading) {
|
||||||
|
this.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
wrapper.innerHTML = this.translate("LOADING");
|
if (this.config.hideLoading) {
|
||||||
wrapper.className = "small dimmed";
|
this.hide();
|
||||||
|
} else {
|
||||||
|
wrapper.innerHTML = this.translate("LOADING");
|
||||||
|
wrapper.className = "small dimmed";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wrapper;
|
return wrapper;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user