Do sorting

It be slow
This commit is contained in:
2025-10-13 15:50:31 +02:00
parent cabc0fbaf1
commit 1c798fb899
4 changed files with 30 additions and 8 deletions

View File

@@ -72,13 +72,13 @@ class trweb {
}
#updateTorrentDisplay(torrent) {
let txt_name = torrent.getElement().element_name;
let txt_name = torrent.element.element_name;
nukeChildren(txt_name);
txt_name.appendChild(document.createTextNode(torrent.name));
for (const srv of Object.keys(this.#dom_servermanager.getServers())) {
let control = torrent.getControl(srv);
let control_element = control.getElement();
let control_element = control.element;
let status = control_element.element_status;
control_element.classList.remove(
@@ -155,8 +155,8 @@ class trweb {
this.#container = document.getElementById(this.#container);
this.#container.classList.add('trweb_container');
this.#container.appendChild(this.#dom_menubar.getElement());
this.#container.appendChild(this.#dom_torrentmanagger.getElement());
this.#container.appendChild(this.#dom_menubar.element);
this.#container.appendChild(this.#dom_torrentmanagger.element);
this.#container.appendChild(this.#guiFooter);
this.#dom_servermanager.loadServers();
@@ -192,7 +192,7 @@ class trweb {
list.sort((a, b) => a.name.localeCompare(b.name));
for (const torrent of list) {
this.#dom_torrentmanagger.getElement().appendChild(torrent.element);
this.#dom_torrentmanagger.element.appendChild(torrent.element);
}
return list;
}