Merge pull request #15 from Luminarys/master

Minor bug fixes
This commit is contained in:
Drew DeVault 2017-10-23 08:13:57 -04:00 committed by GitHub
commit fdd5eb3f5d
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ class AddTorrent extends Component {
console.log(socket); console.log(socket);
const a = document.createElement('a'); const a = document.createElement('a');
a.href = socket.uri; 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 { try {
const resp = await fetch(url, const resp = await fetch(url,
{ {

View File

@ -23,7 +23,7 @@ class ConnectionOverlay extends Component {
const password = localStorage.getItem("password"); const password = localStorage.getItem("password");
this.state = { this.state = {
uri: uri || "ws://127.0.0.1:8412", uri: uri || "ws://127.0.0.1:8412",
password: null, password,
autoconnect: !!uri autoconnect: !!uri
}; };
if (uri) { if (uri) {