Browse Source

add list download progress indicator

pull/543/head
billz 3 years ago
parent
commit
ff14e64bf9
  1. 5
      app/css/custom.css
  2. 14
      app/css/hackernews.css
  3. 14
      app/css/lightsout.css
  4. 7
      app/js/custom.js
  5. 1
      templates/adblock.php

5
app/css/custom.css

@ -230,3 +230,8 @@ canvas#divDBChartBandwidthhourly {
opacity: 0;
color: #1cc88a;
}
.check-progress {
color: #999;
}

14
app/css/hackernews.css

@ -245,3 +245,17 @@ canvas#divDBChartBandwidthhourly {
.table {
margin-bottom: 0rem;
}
.check-hidden {
visibility: hidden;
}
.check-updated {
opacity: 0;
color: #1cc88a;
}
.check-progress {
color: #999;
}

14
app/css/lightsout.css

@ -434,3 +434,17 @@ canvas#divDBChartBandwidthhourly {
.figure, .authors {
filter: brightness(70%) !important;
}
.check-hidden {
visibility: hidden;
}
.check-updated {
opacity: 0;
color: #1cc88a;
}
.check-progress {
color: #999;
}

7
app/js/custom.js

@ -298,16 +298,19 @@ function loadChannelSelect(selected) {
function updateBlocklist() {
var blocklist_id = $('#cbxblocklist').val();
if (blocklist_id == '') { return; }
$('#cbxblocklist-status').find('i').removeClass('fas fa-check').addClass('fas fa-cog fa-spin');
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-progress');
$.post('ajax/adblock/update_blocklist.php',{ 'blocklist_id':blocklist_id },function(data){
var jsonData = JSON.parse(data);
if (jsonData['return'] == '0') {
$('#cbxblocklist-status').removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
$('#cbxblocklist-status').find('i').removeClass('fas fa-cog fa-spin').addClass('fas fa-check');
$('#cbxblocklist-status').removeClass('check-progress').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
}
})
}
function clearBlocklistStatus() {
$('#cbxblocklist-status').addClass('check-hidden');
$('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
}
// Static Array method
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);

1
templates/adblock.php

@ -32,7 +32,6 @@
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="clienttab" href="#adblocklistsettings" data-toggle="tab"><?php echo _("Blocklist settings"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="clienttab" href="#adblockstats" data-toggle="tab"><?php echo _("Statistics"); ?></a></li>
<li class="nav-item"><a class="nav-link" id="logoutputtab" href="#adblocklogfileoutput" data-toggle="tab"><?php echo _("Logging"); ?></a></li>
</ul>

Loading…
Cancel
Save