Compare commits

..

3 Commits

Author SHA1 Message Date
7274285f95 Change scroll behavior
Only scroll the torrent list, not the whole document
2025-10-14 13:00:09 +02:00
1ed720d7d6 Re-enable auto-refresh
Also change its loglevel
2025-10-14 12:58:58 +02:00
8d434cc114 Re-enable magnet button 2025-10-14 12:57:30 +02:00
3 changed files with 12 additions and 17 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -1,5 +1,7 @@
.trweb_torrentlistview {
background-color: cadetblue;
overflow-x: clip;
overflow-y: auto;
}
.trweb_torrentlistentry:nth-child(3n-1) {
background-color: darkcyan;