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

View File

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

View File

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