Skip to content

Commit

Permalink
misc tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Oct 8, 2024
1 parent 38e9b81 commit ae20990
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions changedetectionio/static/js/toggle-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ $(document).ready(function () {
$("#overlay").toggleClass('visible');
heartpath.style.fill = document.getElementById("overlay").classList.contains("visible") ? '#ff0000' : 'var(--color-background)';
});

setInterval(function () {
$('body').toggleClass('spinner-active', $.active > 0);
}, 250); // Checks every 250 milliseconds
}, 2000);

});
6 changes: 3 additions & 3 deletions changedetectionio/static/js/watch-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ function request_textpreview_update() {
const name = $element.attr('name'); // Get the name attribute of the element
data[name] = $element.is(':checkbox') ? ($element.is(':checked') ? $element.val() : false) : $element.val();
});
$('#text-preview-spinner').show();

$('body').toggleClass('spinner-active', 1);

$.abortiveSingularAjax({
type: "POST",
url: preview_text_edit_filters_url,
data: data,
namespace: 'watchEdit'
}).done(function (data) {
$('#text-preview-spinner').fadeOut();
$('#filters-and-triggers #text-preview-before-inner').text(data['before_filter']);
$('#filters-and-triggers #text-preview-inner')
.text(data['after_filter'])
Expand All @@ -43,7 +44,6 @@ function request_textpreview_update() {
}
]);
}).fail(function (error) {
$('#text-preview-spinner').fadeOut();
if (error.statusText === 'abort') {
console.log('Request was aborted due to a new request being fired.');
} else {
Expand Down

0 comments on commit ae20990

Please sign in to comment.