Compare commits
3 Commits
008ea9c43d
...
7274285f95
| Author | SHA1 | Date | |
|---|---|---|---|
|
7274285f95
|
|||
|
1ed720d7d6
|
|||
|
8d434cc114
|
@@ -119,21 +119,14 @@ class trdom_torrentcontrol extends EventTarget {
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 'magnet':
|
||||
/*let magneturl;
|
||||
for (const [srv, data] of Object.entries(this.#getKnownTorrents()[this.#hash].servers)) {
|
||||
if (data.magnetLink != null) {
|
||||
magneturl = data.magnetLink;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (magneturl != null) {
|
||||
this.#server.torrent_add_url(magneturl, false, null);
|
||||
e.stopPropagation();
|
||||
if (this.magnet != null) {
|
||||
this.#server.torrent_add_url(this.magnet, true, null);
|
||||
}
|
||||
else {
|
||||
this.#log(3, `Couldn't find magnet link! ${JSON.stringify(this.#getKnownTorrents()[this.#hash].servers)}`);
|
||||
}*/
|
||||
e.stopPropagation();
|
||||
window.alert('not implemented');
|
||||
this.#log(3, 'Couldn\'t find magnet link!');
|
||||
window.alert('Couldn\'t find magnet link!');
|
||||
}
|
||||
break;
|
||||
case 'download':
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -65,13 +65,13 @@ class trweb {
|
||||
this.#logger('Activating TRWEB instance');
|
||||
|
||||
this.#container = document.getElementById(this.#container);
|
||||
this.#container.classList.add('trweb_container');
|
||||
this.#container.classList.add('trweb_container', 'd-flex', 'flex-column', 'h-100');
|
||||
this.#container.appendChild(this.#dom_menubar.element);
|
||||
this.#container.appendChild(this.#dom_torrentmanagger.element);
|
||||
this.#container.appendChild(this.#guiFooter);
|
||||
|
||||
this.#dom_servermanager.loadServers();
|
||||
//this.setTimer();
|
||||
this.setTimer();
|
||||
break;
|
||||
default:
|
||||
this.#log(5, `Event type ${e.type} not supported`);
|
||||
@@ -80,14 +80,14 @@ class trweb {
|
||||
}
|
||||
|
||||
refresh() {
|
||||
this.#log(5,'Refresh');
|
||||
this.#log(6,'Refresh');
|
||||
for (const [key, value] of Object.entries(this.#dom_servermanager.getServers())) {
|
||||
value.refreshTorrentList();
|
||||
}
|
||||
}
|
||||
|
||||
#timercb = function() {
|
||||
this.#log(5,'Timer tick');
|
||||
this.#log(6,'Timer tick');
|
||||
this.refresh();
|
||||
}.bind(this);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
.trweb_torrentlistview {
|
||||
background-color: cadetblue;
|
||||
overflow-x: clip;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.trweb_torrentlistentry:nth-child(3n-1) {
|
||||
background-color: darkcyan;
|
||||
|
||||
Reference in New Issue
Block a user