diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/Feeds.js | 5 | ||||
-rwxr-xr-x | js/Headlines.js | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/js/Feeds.js b/js/Feeds.js index 01d31f3c1..e9ac5328d 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -633,4 +633,9 @@ const Feeds = { // }); }, + renderIcon: function(feed_id, exists) { + return feed_id && exists ? + `<img class="icon" src="${App.escapeHtml(App.getInitParam("icons_url"))}/${feed_id}.ico">` : + `<i class='icon-no-feed material-icons'>rss_feed</i>`; + } }; diff --git a/js/Headlines.js b/js/Headlines.js index 60066164f..d086870cf 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -423,7 +423,7 @@ const Headlines = { if (headlines.vfeed_group_enabled && hl.feed_title && this.vgroup_last_feed != hl.feed_id) { const vgrhdr = `<div data-feed-id='${hl.feed_id}' class='feed-title'> - <div style='float : right'>${hl.feed_icon}</div> + <div style='float : right'>${Feeds.renderIcon(hl.feed_id, hl.has_icon)}</div> <a class="title" href="#" onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title} <a class="catchup" title="${__('mark feed as read')}" onclick="Feeds.catchupFeedInGroup(${hl.feed_id})" href="#"><i class="icon-done material-icons">done_all</i></a> </div>` @@ -477,7 +477,8 @@ const Headlines = { <i class="material-icons icon-score" title="${hl.score}" onclick="Article.setScore(${hl.id}, this)">${Article.getScorePic(hl.score)}</i> <span style="cursor : pointer" title="${App.escapeHtml(hl.feed_title)}" onclick="Feeds.open({feed:${hl.feed_id}})"> - ${hl.feed_icon}</span> + ${Feeds.renderIcon(hl.feed_id, hl.has_icon)} + </span> </div> </div> @@ -538,7 +539,7 @@ const Headlines = { </div> <div class="right"> <i class="material-icons icon-score" title="${hl.score}" onclick="Article.setScore(${hl.id}, this)">${Article.getScorePic(hl.score)}</i> - <span onclick="Feeds.open({feed:${hl.feed_id}})" style="cursor : pointer" title="${App.escapeHtml(hl.feed_title)}">${hl.feed_icon}</span> + <span onclick="Feeds.open({feed:${hl.feed_id}})" style="cursor : pointer" title="${App.escapeHtml(hl.feed_title)}">${Feeds.renderIcon(hl.feed_id, hl.has_icon)}</span> </div> </div> `; |