feat(schedule): improve predefined schedule groups

This commit is contained in:
2026-09-08 21:12:08 +03:00
parent a6f6586969
commit f76f33b501
9 changed files with 54 additions and 20 deletions
+5 -5
View File
@@ -8,17 +8,17 @@ export class ScheduleChannelManager {
const container = document.querySelector(selector);
if (container) {
container.innerHTML = "";
if (channels.length > 0) {
const groupElement = new ScheduleChannelGroupElement();
groupElement.setAttribute("channels", JSON.stringify(channels));
container.append(groupElement);
}
for (const channel of channels) {
const element = new ScheduleChannelElement();
element.setAttribute("channel", JSON.stringify(channel));
element.setAttribute("removable", "");
container.appendChild(element);
}
if (channels.length > 0) {
const groupElement = new ScheduleChannelGroupElement();
groupElement.setAttribute("channels", JSON.stringify(channels));
container.append(groupElement);
}
}
}
}