diff --git a/onionr/onionr.py b/onionr/onionr.py index 1a16742b..8e64214b 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -844,9 +844,9 @@ class Onionr: # count stats 'div2' : True, - 'Known Peers Count' : str(len(self.onionrCore.listPeers()) - 1), - 'Enabled Plugins Count' : str(len(config.get('plugins.enabled', list()))) + ' / ' + str(len(os.listdir(self.dataDir + 'plugins/'))), - 'Known Blocks Count' : str(totalBlocks), + 'Known Peers' : str(len(self.onionrCore.listPeers()) - 1), + 'Enabled Plugins' : str(len(config.get('plugins.enabled', list()))) + ' / ' + str(len(os.listdir(self.dataDir + 'plugins/'))), + 'Stored Blocks' : str(totalBlocks), 'Percent Blocks Signed' : str(round(100 * signedBlocks / max(totalBlocks, 1), 2)) + '%' } diff --git a/onionr/static-data/default-plugins/pms/mailapi.py b/onionr/static-data/default-plugins/pms/mailapi.py index cdc77094..31f6f18e 100644 --- a/onionr/static-data/default-plugins/pms/mailapi.py +++ b/onionr/static-data/default-plugins/pms/mailapi.py @@ -52,12 +52,7 @@ def list_sentbox(): deleted = [] for x in range(len(sentbox_list_copy)): if sentbox_list_copy[x]['hash'] in deleted: + x -= 1 sentbox_list.pop(x) - ''' - hash_list = [] - for x in sentbox_list: - hash_list.append({x['hash']) - return ','.join(hash_list) - ''' return json.dumps(sentbox_list) \ No newline at end of file diff --git a/onionr/static-data/www/friends/friends.js b/onionr/static-data/www/friends/friends.js index 68cc8661..c18da68b 100755 --- a/onionr/static-data/www/friends/friends.js +++ b/onionr/static-data/www/friends/friends.js @@ -33,8 +33,9 @@ addForm.onsubmit = function(){ headers: { "token": webpass }}).then(function(data) { + if (alias.value.trim().length > 0){ - post_to_url('/friends/setinfo/' + friend.value + '/name', {'data': alias.value, 'token': webpass}) + post_to_url('/friends/setinfo/' + friend.value + '/name', {'data': alias.value, 'token': webpass}) } }) diff --git a/onionr/static-data/www/friends/index.html b/onionr/static-data/www/friends/index.html index 8c1074fe..3d214274 100755 --- a/onionr/static-data/www/friends/index.html +++ b/onionr/static-data/www/friends/index.html @@ -18,7 +18,7 @@ Home