Moves validation into template

This commit is contained in:
oemel09 2021-04-08 16:48:29 +02:00
parent 256d5ae14f
commit a49962b8de
2 changed files with 10 additions and 8 deletions

View File

@ -135,7 +135,7 @@ Module.register("newsfeed", {
sourceTitle: item.sourceTitle,
publishDate: moment(new Date(item.pubdate)).fromNow(),
title: item.title,
description: this.isShowingDescription ? item.description : null
description: item.description
};
},

View File

@ -13,6 +13,7 @@
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
{{ title }}
</div>
{% if (config.showDescription) %}
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
{% if config.truncDescription %}
{{ description | truncate(config.lengthDescription) }}
@ -20,6 +21,7 @@
{{ description }}
{% endif %}
</div>
{% endif %}
</div>
{% elseif error %}
<div class="small dimmed">