Added feed icons

This commit is contained in:
Marcus Noble 2020-11-09 20:55:46 +00:00
parent be481d9c99
commit d5d24b0e7e

View File

@ -57,7 +57,7 @@
</div>
<div v-for="feed in feeds" :class="{strong: unreadCounts[feed.ID], 'alert': true, 'alert-success': selectedFeed == feed.ID }" :data-feed="feed.FeedURL" v-on:click="loadFeed(feed.ID)">
{{feed.Title}} ({{unreadCounts[feed.ID] || '0'}})
<img :src="feedIcon(feed)" style="height: 16px; width: 16px;" onerror="this.style.visibility = 'hidden'" /> {{feed.Title}} ({{unreadCounts[feed.ID] || '0'}})
</div>
<div :class="{ strong: items.length, alert: true, 'alert-success': selectedFeed == 'SAVED'}" v-on:click="loadFeed('SAVED')">
@ -324,6 +324,13 @@
this.setBusy(false);
});
}
},
feedIcon(feed) {
if (feed.ImageURL) {
return feed.ImageURL;
}
return "https://s2.googleusercontent.com/s2/favicons?domain_url=" + (feed.HomepageURL || feed.FeedURL);
}
},
created() {