Use attached instead of corresponding

This commit is contained in:
2023-01-29 01:23:10 +01:00
parent ae702fe492
commit 51be6c59d9
2 changed files with 7 additions and 7 deletions

View File

@ -499,7 +499,7 @@ def make_context_index(request: Request):
feed_list = [] feed_list = []
broken_feeds = [] broken_feeds = []
feeds_without_corresponding_webhook = [] feeds_without_attached_webhook = []
feeds: Iterable[Feed] = reader.get_feeds() feeds: Iterable[Feed] = reader.get_feeds()
for feed in feeds: for feed in feeds:
@ -512,7 +512,7 @@ def make_context_index(request: Request):
webhook_list = [hook["url"] for hook in hooks] webhook_list = [hook["url"] for hook in hooks]
if webhook not in webhook_list: if webhook not in webhook_list:
feeds_without_corresponding_webhook.append(feed) feeds_without_attached_webhook.append(feed)
return { return {
"request": request, "request": request,
@ -521,7 +521,7 @@ def make_context_index(request: Request):
"entry_count": reader.get_entry_counts(), "entry_count": reader.get_entry_counts(),
"webhooks": hooks, "webhooks": hooks,
"broken_feeds": broken_feeds, "broken_feeds": broken_feeds,
"feeds_without_corresponding_webhook": feeds_without_corresponding_webhook, "feeds_without_attached_webhook": feeds_without_attached_webhook,
} }

View File

@ -73,12 +73,12 @@ Thanks!
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
<!-- Show feeds that has no corresponding webhook --> <!-- Show feeds that has no attached webhook -->
{% if feeds_without_corresponding_webhook %} {% if feeds_without_attached_webhook %}
<div class="p-2 mb-2 border border-dark"> <div class="p-2 mb-2 border border-dark">
<ul class="list-group text-danger"> <ul class="list-group text-danger">
Feeds without corresponding webhook: Feeds without attached webhook:
{% for feed in feeds_without_corresponding_webhook %} {% for feed in feeds_without_attached_webhook %}
<a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}</a> <a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}</a>
{% endfor %} {% endfor %}
</ul> </ul>