commit 26/01/2026
This commit is contained in:
@@ -49,7 +49,6 @@ function getCardByIndex(index) {
|
||||
* @param {StreamerOutputData[]} values
|
||||
*/
|
||||
function UpdateStreamerCard(values) {
|
||||
if (!Array.isArray(values) || values.length === 0) return;
|
||||
|
||||
function setProgress(index, $bar, value, max = 100) {
|
||||
const v = Number(value ?? 0);
|
||||
@@ -60,6 +59,11 @@ function UpdateStreamerCard(values) {
|
||||
.css('width', pct + '%') // visual width
|
||||
.text(pct); // optional label
|
||||
}
|
||||
if (!Array.isArray(values) || values.length === 0) {
|
||||
// create dummy data to disable all cards
|
||||
values = [];
|
||||
}
|
||||
|
||||
for (let i = 1; i <= 64; i++) {
|
||||
let vv = values.find(v => v.index === i);
|
||||
let card = getCardByIndex(i);
|
||||
@@ -461,7 +465,6 @@ $(document).ready(function () {
|
||||
* @type {StreamerOutputData[]}
|
||||
*/
|
||||
let so = JSON.parse(data);
|
||||
console.log(so);
|
||||
UpdateStreamerCard(so);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user