side bar and ui node list fixes

This commit is contained in:
Kevin Froman 2020-10-15 23:24:25 +00:00
parent cf669024bf
commit 895b4fe4fd
4 changed files with 15 additions and 8 deletions

View File

@ -53,7 +53,10 @@ class PrivateEndpoints:
if result == "success": if result == "success":
return Response("success") return Response("success")
else: else:
return Response(result, 409) if "already" in result:
return Response(result, 409)
else:
return Response(result, 400)
@private_endpoints_bp.route('/www/<path:path>', endpoint='www') @private_endpoints_bp.route('/www/<path:path>', endpoint='www')
def wwwPublic(path): def wwwPublic(path):

View File

@ -271,7 +271,7 @@
<i class="fas fa-link"></i> <i class="fas fa-link"></i>
Outgoing Connections: Outgoing Connections:
<div class="control"> <div class="container connectedNodesControl">
<pre id="connectedNodes">Unable to get nodes</pre> <pre id="connectedNodes">Unable to get nodes</pre>
</div> </div>
<br> <br>

View File

@ -15,9 +15,9 @@
} }
#connectedNodes{ #connectedNodes{
overflow-y: auto; overflow-y: hidden;
max-height: 300px; max-height: 300px;
max-width: 300px;
} }
#configToggle, #configContent{ #configToggle, #configContent{
@ -41,9 +41,9 @@
display: block; display: block;
vertical-align: bottom; vertical-align: bottom;
} }
/* ---- particles.js container ---- */ /* ---- particles.js container ---- */
#particles-js { #particles-js {
position:absolute; position:absolute;
width:100%; width:100%;
@ -51,11 +51,11 @@
top:0; top:0;
z-index:-1; z-index:-1;
} }
.mainCont{ .mainCont{
z-index: 2; z-index: 2;
position: fixed; position: fixed;
} }
.torTransportField { .torTransportField {

View File

@ -25,6 +25,10 @@ function sidebarAddPeerRegister(){
}}) }})
.then(function(resp){ .then(function(resp){
if (! resp.ok){ 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?"}) PNotify.error({text: "Could not add peer. Is your input valid?"})
throw new Error("Could not add peer " + newPeer) throw new Error("Could not add peer " + newPeer)
} }