diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-30 13:23:21 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-30 13:23:21 +0200 |
commit | 9d4fd43ff924238c15da5734dffcd378d0346e11 (patch) | |
tree | ac26f0767130658d506af22769c3ee5787d02877 | |
parent | fix: the feed wasn't regularly updated (diff) | |
download | newspipe-9d4fd43ff924238c15da5734dffcd378d0346e11.tar.gz newspipe-9d4fd43ff924238c15da5734dffcd378d0346e11.tar.bz2 newspipe-9d4fd43ff924238c15da5734dffcd378d0346e11.zip |
hide feeds with too much erros from the menu
-rw-r--r-- | newspipe/templates/home.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/newspipe/templates/home.html b/newspipe/templates/home.html index 3ecc0aab..d941adbc 100644 --- a/newspipe/templates/home.html +++ b/newspipe/templates/home.html @@ -27,7 +27,7 @@ <a href="{{ url_for('article.mark_as', new_value='read') }}"><i class="fa fa-check-square-o" aria-hidden="true" title="{{ _('Mark all as read') }}"></i></a> </span></li> {% for fid, nbunread in unread|dictsort(by='value')|reverse %} - <li class="nav-item feed-menu" data-feed="{{ fid }}"><a class="nav-link" href="{{ gen_url(feed=fid) }}"> + <li class="nav-item feed-menu {% if in_error.get(fid, 0) > 0 %}d-none{% endif %}" data-feed="{{ fid }}"><a class="nav-link" href="{{ gen_url(feed=fid) }}"> {% if feed_id == fid %}<b>{% endif %} {% if in_error.get(fid, 0) > 0 %} <span style="background-color: {{ "red" if in_error[fid] > 2 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }}</span> @@ -37,7 +37,7 @@ {{ feeds[fid].title | safe | truncate(25, True) }} {% if feed_id == fid %}</b>{% endif %} </a></li> - <li class="nav-item feed-commands" data-feed="{{ fid }}"><span class="nav-link"> + <li class="nav-item feed-commands {% if in_error.get(fid, 0) > 0 %}d-none{% endif %}" data-feed="{{ fid }}"><span class="nav-link"> <a href="/feed/{{ fid }}"><i class="fa fa-info" aria-hidden="true" title="{{ _('Details') }}"></i></a> <a href="{{ url_for('feed.form', feed_id=fid) }}"><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ _('Edit this feed') }}"></i></a> <a href="{{ url_for('article.mark_as', new_value='unread', feed_id=fid) }}"><i class="fa fa-square-o" aria-hidden="true" title="{{ _('Mark this feed as unread') }}"></i></a> @@ -47,7 +47,7 @@ {% endfor %} {% for fid, feed in feeds.items() if not fid in unread %} - <li class="nav-item feed-menu" data-feed="{{ fid }}"><a class="nav-link" href="{{ gen_url(feed=fid) }}"> + <li class="nav-item feed-menu {% if in_error.get(fid, 0) > 0 %}d-none{% endif %}" data-feed="{{ fid }}"><a class="nav-link" href="{{ gen_url(feed=fid) }}"> {% if in_error.get(fid, 0) > 0 %} <span style="background-color: {{ "red" if in_error[fid] > 2 else "orange" }} ;" class="badge pull-right" title="Some errors occured while trying to retrieve that feed.">{{ in_error[fid] }}</span> {% endif %} @@ -56,7 +56,7 @@ {{ feed.title | safe | truncate(25, True) }} {% if feed_id == fid %}</b>{% endif %} </a></li> - <li class="nav-item feed-commands" data-feed="{{ fid }}"><span class="nav-link"> + <li class="nav-item feed-commands {% if in_error.get(fid, 0) > 0 %}d-none{% endif %}" data-feed="{{ fid }}"><span class="nav-link"> <a href="/feed/{{ fid }}"><i class="fa fa-info" aria-hidden="true" title="{{ _('Details') }}"></i></a> <a href="{{ url_for('feed.form', feed_id=fid) }}"><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ _('Edit this feed') }}"></i></a> <a href="{{ url_for('article.mark_as', new_value='unread', feed_id=fid) }}"><i class="fa fa-square-o" aria-hidden="true" title="{{ _('Mark this feed as unread') }}"></i></a> |