fix broken peer cleanup

This commit is contained in:
Kevin Froman 2019-07-12 19:03:06 -05:00
parent 2a124c423b
commit 2811173051
6 changed files with 2 additions and 39 deletions

View File

@ -19,6 +19,7 @@
'''
import sqlite3
import logger
from onionrutils import epoch
from . import scoresortedpeerlist, peerprofiles
def peer_cleanup(core_inst):
'''Removes peers who have been offline too long or score too low'''

View File

@ -34,7 +34,6 @@
<a class="navbar-item idLink" href="/mail/">Mail</a>
<a class="navbar-item idLink" href="/friends/">Friends</a>
<a class="navbar-item idLink" href="/board/">Circles</a>
<a class="navbar-item idLink" href="/clandestine/">Clandestine</a>
</div>
</div>
</nav>

View File

@ -99,31 +99,5 @@ fetch('/friends/list', {
}
}
/* Template to add Friends to page */
// Test to see if the browser supports the HTML template element by checking
// for the presence of the template element's content attribute.
if ('content' in document.createElement('template')) {
// Instantiate the table with the existing HTML tbody
// and the row with the template
var template = document.getElementById('friendTemplate');
// Clone the new row and insert it into the table
var list = document.getElementById("friendList");
var clone = document.importNode(template.content, true);
var div = clone.querySelectorAll("div");
div[2].textContent = nameText.value;
div[3].textContent = peer;
div[3].setAttribute('data-pubkey', peer)
list.appendChild(clone);
} else {
// Find another way to add the rows to the table because
// the HTML template element is not supported.
}
})
document.getElementById('defriend').onclick = function(){
removeFriend(document.getElementById('friendPubkey').value)
}

View File

@ -36,7 +36,6 @@
<a class="navbar-item idLink" href="/mail/">Mail</a>
<a class="navbar-item idLink" href="/friends/">Friends</a>
<a class="navbar-item idLink" href="/board/">Circles</a>
<a class="navbar-item idLink" href="/clandestine/">Clandestine</a>
</div>
</div>
</nav>
@ -135,14 +134,6 @@
</div>
</div>
<div id="friendInfo" class='overlay'>
<div class='overlayContent'>
<span class='closeOverlay' overlay='friendInfo'></span>
<div>Name: <span id='friendName'></span></div>
<label>Public Key: <input id='friendPubkey' type='text' readonly></label>
<button id='defriend' class='warnBtn'>Unfriend</button>
</div>
</div>
<!--Template markup for friend list-->
<template id="friendTemplate">

View File

@ -36,7 +36,6 @@
<a class="navbar-item idLink" href="/mail/">Mail</a>
<a class="navbar-item idLink" href="/friends/">Friends</a>
<a class="navbar-item idLink" href="/board/">Circles</a>
<a class="navbar-item idLink" href="/clandestine/">Clandestine</a>
</div>
</div>
</nav>

View File

@ -40,7 +40,6 @@
<a class="navbar-item idLink" href="/mail/">Mail</a>
<a class="navbar-item idLink" href="/friends/">Friends</a>
<a class="navbar-item idLink" href="/board/">Circles</a>
<a class="navbar-item idLink" href="/clandestine/">Clandestine</a>
</div>
</div>
</nav>