summaryrefslogtreecommitdiff
path: root/web/static
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-01-22 15:59:34 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-01-22 15:59:34 -1000
commitb341167d5b2a1175c0eb58ae873ec0d0ed88688e (patch)
tree3362dc51ab871abdbb3d65ca09797d0b7a201d0a /web/static
parentc9c17431cdddb64a8d44f77c43281a29270f81c2 (diff)
Fix refresh button JS error
Diffstat (limited to 'web/static')
-rw-r--r--web/static/js/app.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/web/static/js/app.js b/web/static/js/app.js
index 4d26e66..52d0c91 100644
--- a/web/static/js/app.js
+++ b/web/static/js/app.js
@@ -93,18 +93,11 @@ function setActiveTab(button) {
// Manual Refresh
async function refreshData() {
const button = event.target.closest('button');
- const refreshText = document.getElementById('refresh-text');
- const originalText = refreshText.textContent;
+ const icon = button.querySelector('svg');
// Show loading state
button.disabled = true;
- refreshText.innerHTML = `
- <svg class="animate-spin h-5 w-5 inline mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
- <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
- <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
- </svg>
- Refreshing...
- `;
+ if (icon) icon.classList.add('animate-spin');
try {
// Force API refresh (updates cache)
@@ -142,7 +135,7 @@ async function refreshData() {
} finally {
// Restore button state
button.disabled = false;
- refreshText.textContent = originalText;
+ if (icon) icon.classList.remove('animate-spin');
}
}