Update the number of unread items when marking an item as read
This commit is contained in:
parent
4abf966878
commit
bdfd7a19a3
@ -171,6 +171,12 @@
|
|||||||
{
|
{
|
||||||
var item = document.getElementById("item-" + item_id);
|
var item = document.getElementById("item-" + item_id);
|
||||||
if (item) item.parentNode.removeChild(item);
|
if (item) item.parentNode.removeChild(item);
|
||||||
|
|
||||||
|
var $unread_span = document.getElementById("unread-count");
|
||||||
|
var unread_count = parseInt($unread_span.innerHTML, 10) - 1;
|
||||||
|
|
||||||
|
$unread_span.innerHTML = unread_count;
|
||||||
|
document.querySelector("title").innerHTML = "miniflux (" + unread_count + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h2><?= t('%d unread items', $nb_items) ?></h2>
|
<h2> <?= t('<span id="unread-count">%d</span> unread items', $nb_items) ?></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="?action=mark-as-read"><?= t('mark all as read') ?></a></li>
|
<li><a href="?action=mark-as-read"><?= t('mark all as read') ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user