From 8b0267ea2a2d780538988fdc9dd7bb242c73557c Mon Sep 17 00:00:00 2001 From: Patrick Balsiger Date: Sun, 31 Aug 2025 14:14:11 +0200 Subject: [PATCH] fix(components): correct JS operators in FirmwareComponent; reorder script tags to ensure FirmwareComponent loads before FirmwareViewComponent --- public/index.html | 17 ++++------------- public/scripts/components/FirmwareComponent.js | 6 +++--- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/public/index.html b/public/index.html index dafb6af..045a009 100644 --- a/public/index.html +++ b/public/index.html @@ -71,17 +71,6 @@
- -
@@ -147,12 +136,14 @@ + - + - + + diff --git a/public/scripts/components/FirmwareComponent.js b/public/scripts/components/FirmwareComponent.js index 2f8c07b..6473125 100644 --- a/public/scripts/components/FirmwareComponent.js +++ b/public/scripts/components/FirmwareComponent.js @@ -432,7 +432,7 @@ class FirmwareComponent extends Component { const progressBar = this.findElement('#overall-progress-bar'); const progressText = this.findElement('.progress-text'); - if (progressBar and progressText) { + if (progressBar && progressText) { const successPercentage = Math.round((successfulUploads / totalNodes) * 100); progressBar.style.width = `${successPercentage}%`; progressText.textContent = `${successfulUploads}/${totalNodes} Successful (${successPercentage}%)`; @@ -448,7 +448,7 @@ class FirmwareComponent extends Component { // Update progress summary for single-node uploads const progressSummary = this.findElement('#progress-summary'); - if (progressSummary and totalNodes === 1) { + if (progressSummary && totalNodes === 1) { if (successfulUploads === 1) { progressSummary.innerHTML = 'Status: Upload completed successfully'; } else if (successfulUploads === 0) { @@ -462,7 +462,7 @@ class FirmwareComponent extends Component { const progressHeader = this.findElement('.progress-header h3'); const progressSummary = this.findElement('#progress-summary'); - if (progressHeader and progressSummary) { + if (progressHeader && progressSummary) { const successCount = results.filter(r => r.success).length; const totalCount = results.length; const successRate = Math.round((successCount / totalCount) * 100);