From b7b48916cd51c59b935577841da15ae9d8fe1e1f Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sun, 22 Oct 2017 21:16:30 -0700 Subject: [PATCH 1/2] Use pathname in torrent upload --- src/ui/add_torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/add_torrent.js b/src/ui/add_torrent.js index f8928e1..3bb055d 100644 --- a/src/ui/add_torrent.js +++ b/src/ui/add_torrent.js @@ -53,7 +53,7 @@ class AddTorrent extends Component { console.log(socket); const a = document.createElement('a'); a.href = socket.uri; - const url = (a.protocol === "ws:" ? "http://" : "https://") + a.host; + const url = (a.protocol === "ws:" ? "http://" : "https://") + a.host + a.pathname; try { const resp = await fetch(url, { From b098c9d3bd6c8e4aa32ac51b55e31b06c270bb8f Mon Sep 17 00:00:00 2001 From: Luminarys Date: Sun, 22 Oct 2017 21:21:28 -0700 Subject: [PATCH 2/2] Properly use password from localStorage --- src/ui/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/connection.js b/src/ui/connection.js index 66c44e5..7c7e6cb 100644 --- a/src/ui/connection.js +++ b/src/ui/connection.js @@ -23,7 +23,7 @@ class ConnectionOverlay extends Component { const password = localStorage.getItem("password"); this.state = { uri: uri || "ws://127.0.0.1:8412", - password: null, + password, autoconnect: !!uri }; if (uri) {