From 92efb42c5c928163716a9d8ce0da23f3fef49fad Mon Sep 17 00:00:00 2001 From: wipedlifepotato <60944239+wipedlifepotato@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:54:52 +0300 Subject: [PATCH 1/3] css with 2000x desing minimal --- contrib/webconsole/torrent_client.html | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/contrib/webconsole/torrent_client.html b/contrib/webconsole/torrent_client.html index 01f33732..cf6383fd 100644 --- a/contrib/webconsole/torrent_client.html +++ b/contrib/webconsole/torrent_client.html @@ -1,3 +1,29 @@ +
Torrent Client
@@ -73,7 +99,7 @@ return (statusIndicator.textContent = "STATUS: INVALID_RESPONSE"); statusIndicator.textContent = "STATUS: Connected"; - statusIndicator.style.color = "#00ff66"; + statusIndicator.style.color = "rgb(77, 91, 83)"; const torrents = document.getElementById("torrents"); currentTorrentsData = r.result.torrents; From d13abcda6b9c1b2725157bcc339cf5cbd8c8c330 Mon Sep 17 00:00:00 2001 From: wipedlifepotato <60944239+wipedlifepotato@users.noreply.github.com> Date: Sat, 5 Sep 2026 04:25:55 +0300 Subject: [PATCH 2/3] torrent-add by magnet --- contrib/webconsole/torrent-rpc.js | 13 +++++++++++ contrib/webconsole/torrent_client.html | 7 ++++++ contrib/webconsole/torrents_client_2000.css | 25 +++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 contrib/webconsole/torrents_client_2000.css diff --git a/contrib/webconsole/torrent-rpc.js b/contrib/webconsole/torrent-rpc.js index bfc3f1bc..f596c5dc 100644 --- a/contrib/webconsole/torrent-rpc.js +++ b/contrib/webconsole/torrent-rpc.js @@ -33,6 +33,19 @@ class TorrentClient { return (bytesPerSec / 1024).toFixed(2) + ' KB/s'; } + async addTorrentByMagnet(magnet) + { + // TODO: check link + const magnetRegex = /^magnet:\?xt=urn:btih:[a-f0-9]{40}(&.+)?$/i; + if(!magnetRegex.test(magnet)) return false; + const res = await fetch(this.getEndpoint(), { + method: "POST", + body: JSON.stringify({ 'method': 'torrent-add', 'arguments': { 'filename': magnet } }), + headers: { 'Content-Type': 'application/json' } + }); + return res.json(); + + } async addTorrent(b64metainfo) { const res = await fetch(this.getEndpoint(), { method: "POST", diff --git a/contrib/webconsole/torrent_client.html b/contrib/webconsole/torrent_client.html index cf6383fd..424340f9 100644 --- a/contrib/webconsole/torrent_client.html +++ b/contrib/webconsole/torrent_client.html @@ -27,6 +27,7 @@
Torrent Client
+
diff --git a/contrib/webconsole/torrents_client_2000.css b/contrib/webconsole/torrents_client_2000.css new file mode 100644 index 00000000..9a44c238 --- /dev/null +++ b/contrib/webconsole/torrents_client_2000.css @@ -0,0 +1,25 @@ +#torrent-ui button { + border-radius: 3.33px; + padding: 0.1vw; + margin: 2px; + text-decoration: underline; + color: black; + background: aquamarine; + text-transform: uppercase; +} + +#torrent-ui button:hover { + cursor:pointer; + background-color: yellow; + transition: background-color 0.5s ease 0.1s; +} + +#torrent-ui { + display: flex; + flex-direction: column; + gap: 2.5px; +} + +#torrents li { + border-bottom: none; +} From 3a93debe5c5d8970752294dd8c4dfe02dcbc7b46 Mon Sep 17 00:00:00 2001 From: wipedlifepotato <60944239+wipedlifepotato@users.noreply.github.com> Date: Sat, 5 Sep 2026 04:27:21 +0300 Subject: [PATCH 3/3] remove blob --- contrib/webconsole/torrents_client_2000.css | 25 --------------------- 1 file changed, 25 deletions(-) delete mode 100644 contrib/webconsole/torrents_client_2000.css diff --git a/contrib/webconsole/torrents_client_2000.css b/contrib/webconsole/torrents_client_2000.css deleted file mode 100644 index 9a44c238..00000000 --- a/contrib/webconsole/torrents_client_2000.css +++ /dev/null @@ -1,25 +0,0 @@ -#torrent-ui button { - border-radius: 3.33px; - padding: 0.1vw; - margin: 2px; - text-decoration: underline; - color: black; - background: aquamarine; - text-transform: uppercase; -} - -#torrent-ui button:hover { - cursor:pointer; - background-color: yellow; - transition: background-color 0.5s ease 0.1s; -} - -#torrent-ui { - display: flex; - flex-direction: column; - gap: 2.5px; -} - -#torrents li { - border-bottom: none; -}