fix reindex notification filter

pull/474/head
simon 2 years ago
parent 1e96c3211f
commit 5d524e5110
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

@ -22,7 +22,7 @@
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a> <a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
{% endif %} {% endif %}
</div> </div>
<div id="notifications" data="channel"></div> <div id="notifications" data="channel reindex"></div>
<div class="info-box info-box-2"> <div class="info-box info-box-2">
<div class="info-box-item"> <div class="info-box-item">
<div class="round-img"> <div class="round-img">

@ -22,7 +22,7 @@
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a> <a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
{% endif %} {% endif %}
</div> </div>
<div id="notifications" data="channel"></div> <div id="notifications" data="channel reindex"></div>
<div class="info-box info-box-3"> <div class="info-box info-box-3">
<div class="info-box-item"> <div class="info-box-item">
<div class="round-img"> <div class="round-img">

@ -22,7 +22,7 @@
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a> <a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
{% endif %} {% endif %}
</div> </div>
<div id="notifications" data="channel"></div> <div id="notifications" data="channel reindex"></div>
<div class="view-controls"> <div class="view-controls">
<div class="toggle"> <div class="toggle">
<span>Show subscribed only:</span> <span>Show subscribed only:</span>

@ -2,7 +2,7 @@
{% load static %} {% load static %}
{% block content %} {% block content %}
<div class="boxed-content"> <div class="boxed-content">
<div id="notifications" data="setting"></div> <div id="notifications" data="setting reindex"></div>
<div class="title-bar"> <div class="title-bar">
<h1>User Configurations</h1> <h1>User Configurations</h1>
</div> </div>

@ -31,7 +31,7 @@ function getMessages(dataOrigin) {
function buildMessage(responseData, dataOrigin) { function buildMessage(responseData, dataOrigin) {
// filter relevant messages // filter relevant messages
let messages = responseData.filter(function (value) { let messages = responseData.filter(function (value) {
return value.group.startsWith(dataOrigin); return dataOrigin.split(' ').includes(value.group.split(':')[0]);
}, dataOrigin); }, dataOrigin);
let notifications = document.getElementById('notifications'); let notifications = document.getElementById('notifications');
let currentNotifications = notifications.childElementCount; let currentNotifications = notifications.childElementCount;

@ -136,6 +136,9 @@ function reindex(button) {
let message = document.createElement('p'); let message = document.createElement('p');
message.innerText = 'Reindex scheduled'; message.innerText = 'Reindex scheduled';
document.getElementById('reindex-button').replaceWith(message); document.getElementById('reindex-button').replaceWith(message);
setTimeout(function () {
checkMessages();
}, 500);
} }
// download page buttons // download page buttons

Loading…
Cancel
Save