Fox sorting and magnet links

Magnet button stays disabled
This commit is contained in:
2025-10-14 08:23:38 +02:00
parent 1c798fb899
commit 2f20eee841
5 changed files with 28 additions and 7 deletions

View File

@@ -18,7 +18,20 @@ class trdom_torrentcontrol extends EventTarget {
#data;
get exists() {
return this.#data != null;
return this.#data != null && this.#data.name != null;
}
get name() {
return this.exists ? this.#data.name : this.#hash;
}
get magnet() {
return this.#data != null ? this.#data.magnetLink : null;
}
set magnet(value) {
if (this.#data == null) {
this.#data = {};
}
this.#data.magnetLink = value;
this.updateDOM();
}
updateDOM() {