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