newsfeed: showAsList implemented.

This commit is contained in:
Robert Ewald 2021-06-03 11:40:18 +02:00
parent aa3a3bdf16
commit 3e96e8b3f5
3 changed files with 59 additions and 47 deletions

View File

@ -12,3 +12,12 @@ iframe.newsfeed-fullarticle {
bottom: inherit;
top: -90px;
}
.newsfeed-list {
list-style: none;
}
.newsfeed-list li {
text-align: justify;
margin-bottom: 0.5em;
}

View File

@ -129,6 +129,10 @@ Module.register("newsfeed", {
}
const item = this.newsItems[this.activeItem];
const items = this.newsItems.map(function (item) {
item.publishDate = moment(new Date(item.pubdate)).fromNow();
return item;
});
return {
loaded: true,
@ -137,7 +141,7 @@ Module.register("newsfeed", {
publishDate: moment(new Date(item.pubdate)).fromNow(),
title: item.title,
description: item.description,
items: this.newsItems
items: items
};
},
@ -247,7 +251,6 @@ Module.register("newsfeed", {
this.sendNotification("NEWS_FEED_UPDATE", { items: updatedItems });
}
Log.warn(newsItems);
this.newsItems = newsItems;
},