Show item status in source view

This commit is contained in:
Tim Van Baak 2023-05-29 21:09:43 -07:00
parent da24d23eb7
commit 329f187a56
2 changed files with 2 additions and 2 deletions

View File

@ -66,6 +66,7 @@ def source_feed(source_name):
return render_template( return render_template(
"feed.jinja2", "feed.jinja2",
items=all_items, items=all_items,
now=int(time.time()),
mdeac=[ mdeac=[
{"source": item["source"], "itemid": item["id"]} {"source": item["source"], "itemid": item["id"]}
for item in all_items for item in all_items

View File

@ -116,10 +116,9 @@ var callback = function (source, itemid) {
</head> </head>
<body> <body>
<div id="wrapper"> <div id="wrapper">
{# #}
{% if items %} {% if items %}
{% for item in items %} {% for item in items %}
<div class="readable-item" id="{{item.source}}-{{item.id}}"> <div class="readable-item {%- if not item.active %} strikethru fade{% endif %}{%- if item.active and item.tts and item.created + item.tts > now %} fade{% endif %}" id="{{item.source}}-{{item.id}}">
{% if item.id %} {% if item.id %}
<button class="item-button" onclick="javascript:deactivate('{{item.source}}', '{{item.id}}')" title="Deactivate">&#10005;</button> <button class="item-button" onclick="javascript:deactivate('{{item.source}}', '{{item.id}}')" title="Deactivate">&#10005;</button>
{% endif %} {% endif %}