diff --git a/src/httpapi/miscclientapi/endpoints.py b/src/httpapi/miscclientapi/endpoints.py index 01408114..09c8e4c5 100644 --- a/src/httpapi/miscclientapi/endpoints.py +++ b/src/httpapi/miscclientapi/endpoints.py @@ -53,7 +53,10 @@ class PrivateEndpoints: if result == "success": return Response("success") else: - return Response(result, 409) + if "already" in result: + return Response(result, 409) + else: + return Response(result, 400) @private_endpoints_bp.route('/www/', endpoint='www') def wwwPublic(path): diff --git a/static-data/www/private/index.html b/static-data/www/private/index.html index b42057ec..313fa36f 100755 --- a/static-data/www/private/index.html +++ b/static-data/www/private/index.html @@ -271,7 +271,7 @@ Outgoing Connections: -
+
Unable to get nodes

diff --git a/static-data/www/private/main.css b/static-data/www/private/main.css index e3bcfd44..b53e80b6 100755 --- a/static-data/www/private/main.css +++ b/static-data/www/private/main.css @@ -15,9 +15,9 @@ } #connectedNodes{ - overflow-y: auto; + overflow-y: hidden; max-height: 300px; - + max-width: 300px; } #configToggle, #configContent{ @@ -41,9 +41,9 @@ display: block; vertical-align: bottom; } - + /* ---- particles.js container ---- */ - + #particles-js { position:absolute; width:100%; @@ -51,11 +51,11 @@ top:0; z-index:-1; } - + .mainCont{ z-index: 2; position: fixed; - + } .torTransportField { diff --git a/static-data/www/shared/sidebar/sidebar.js b/static-data/www/shared/sidebar/sidebar.js index 492b673e..054c7f68 100644 --- a/static-data/www/shared/sidebar/sidebar.js +++ b/static-data/www/shared/sidebar/sidebar.js @@ -25,6 +25,10 @@ function sidebarAddPeerRegister(){ }}) .then(function(resp){ if (! resp.ok){ + if (resp.status == 409){ + PNotify.notice({text: "Peer already added"}) + return + } PNotify.error({text: "Could not add peer. Is your input valid?"}) throw new Error("Could not add peer " + newPeer) }