fix reindex notification filter
This commit is contained in:
parent
1e96c3211f
commit
5d524e5110
|
@ -22,7 +22,7 @@
|
|||
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
|
||||
{% endif %}
|
||||
</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-item">
|
||||
<div class="round-img">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
|
||||
{% endif %}
|
||||
</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-item">
|
||||
<div class="round-img">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a href="{% url 'downloads' %}?channel={{ channel_info.channel_id }}"><h3>Downloads</h3></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="notifications" data="channel"></div>
|
||||
<div id="notifications" data="channel reindex"></div>
|
||||
<div class="view-controls">
|
||||
<div class="toggle">
|
||||
<span>Show subscribed only:</span>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="boxed-content">
|
||||
<div id="notifications" data="setting"></div>
|
||||
<div id="notifications" data="setting reindex"></div>
|
||||
<div class="title-bar">
|
||||
<h1>User Configurations</h1>
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@ function getMessages(dataOrigin) {
|
|||
function buildMessage(responseData, dataOrigin) {
|
||||
// filter relevant messages
|
||||
let messages = responseData.filter(function (value) {
|
||||
return value.group.startsWith(dataOrigin);
|
||||
return dataOrigin.split(' ').includes(value.group.split(':')[0]);
|
||||
}, dataOrigin);
|
||||
let notifications = document.getElementById('notifications');
|
||||
let currentNotifications = notifications.childElementCount;
|
||||
|
|
|
@ -136,6 +136,9 @@ function reindex(button) {
|
|||
let message = document.createElement('p');
|
||||
message.innerText = 'Reindex scheduled';
|
||||
document.getElementById('reindex-button').replaceWith(message);
|
||||
setTimeout(function () {
|
||||
checkMessages();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// download page buttons
|
||||
|
|
Loading…
Reference in New Issue