feat(station): group slave nodes by station target
Merge stations with the same station code and platform into one logical target, and expand music and temp broadcast playback to all online slave nodes while the console and picker UIs show grouped station entries with node counts.
This commit is contained in:
@@ -274,14 +274,16 @@
|
||||
}
|
||||
for (const st of stations) {
|
||||
const name = st.name || "";
|
||||
const target = st.target || name;
|
||||
const code = st.code || "";
|
||||
const memberCount = Number(st.memberCount || 1);
|
||||
const lastSeen = st.lastSeen ? new Date(st.lastSeen).toLocaleString() : "";
|
||||
const row = document.createElement("div");
|
||||
row.className = "station-item";
|
||||
row.innerHTML = `
|
||||
<input type="checkbox" data-station-name="1" data-name="${escapeHtml(name)}" onchange="updateSelectedBadge()" />
|
||||
<input type="checkbox" data-station-name="1" data-name="${escapeHtml(target)}" onchange="updateSelectedBadge()" />
|
||||
<div class="station-name">${escapeHtml(name)}</div>
|
||||
<div class="station-meta">${escapeHtml(code)}${lastSeen ? " · " + escapeHtml(lastSeen) : ""}</div>
|
||||
<div class="station-meta">${escapeHtml(code)}${memberCount > 1 ? " · 从机 " + memberCount : ""}${lastSeen ? " · " + escapeHtml(lastSeen) : ""}</div>
|
||||
`;
|
||||
box.appendChild(row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user