Add onboarding weather and template gradients
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m53s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 34s

This commit is contained in:
2026-08-28 20:05:23 +01:00
parent aa07a78912
commit 3960931ebe
80 changed files with 12750 additions and 519 deletions
+28 -1
View File
@@ -77,6 +77,28 @@
});
}
function updateDataSourceToggle(form, response) {
var toggleButton = document.querySelector('button[form="' + form.id + '"][data-async-data-source-toggle]');
if (!toggleButton) {
return;
}
var willEnable = toggleButton.getAttribute('data-enabled') !== 'true';
toggleButton.setAttribute('data-enabled', willEnable ? 'true' : 'false');
toggleButton.className = toggleButton.className.replace(/btn-(danger|success)/g, willEnable ? 'btn-danger' : 'btn-success');
toggleButton.innerHTML = '<i class="bi ' + (willEnable ? 'bi-pause-fill' : 'bi-play-fill') + ' me-1" aria-hidden="true"></i>' + (willEnable ? 'Disable' : 'Enable');
var message = '';
try {
message = new URL(response.url, window.location.href).searchParams.get('message') || '';
} catch (_error) {
message = '';
}
if (typeof showToast === 'function') {
showToast(message || (willEnable ? 'Data source enabled.' : 'Data source disabled.'), 'success');
}
}
function initDeleteButtons() {
document.addEventListener('click', function (event) {
var deleteButton = event.target.closest('[data-delete-action-url]');
@@ -610,7 +632,7 @@
} catch (_error) {
actionPath = String(form.action || '');
}
var shouldReloadAfterSuccess = /^\/announcements\/\d+\/(?:play|stop)$/.test(actionPath) || /^\/data-sources\/(?:api-sources|rss-feeds|weather)\/\d+$/.test(actionPath);
var shouldReloadAfterSuccess = /^\/announcements\/\d+\/(?:play|stop)$/.test(actionPath);
event.preventDefault();
@@ -641,6 +663,11 @@
return;
}
if (/^\/data-sources\/(?:api-sources|rss-feeds|weather)\/\d+$/.test(actionPath)) {
updateDataSourceToggle(form, response);
return;
}
if (shouldReloadAfterSuccess && response && response.ok) {
window.location.reload();
return;