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, { 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) {