work on mail, storagecounter bugfix
parent
6687b2a843
commit
0a8b31ff6e
|
@ -60,6 +60,7 @@ Everyone is welcome to help out. Help is wanted for the following:
|
|||
* Testing
|
||||
* Running stable nodes
|
||||
* Security review/audit
|
||||
* Automatic I2P setup
|
||||
|
||||
Bitcoin: [1onion55FXzm6h8KQw3zFw2igpHcV7LPq](bitcoin:1onion55FXzm6h8KQw3zFw2igpHcV7LPq)
|
||||
USD: [Ko-Fi](https://www.ko-fi.com/beardogkf)
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
'''
|
||||
from gevent.pywsgi import WSGIServer, WSGIHandler
|
||||
from gevent import Timeout
|
||||
#import gevent.monkey
|
||||
#gevent.monkey.patch_socket()
|
||||
import flask, cgi
|
||||
from flask import request, Response, abort, send_from_directory
|
||||
import sys, random, threading, hmac, hashlib, base64, time, math, os, json, socket
|
||||
|
|
|
@ -124,6 +124,7 @@ class Onionr:
|
|||
config.set('client.client.port', randomPort, savefile=True)
|
||||
if type(config.get('client.public.port')) is type(None):
|
||||
randomPort = netcontroller.getOpenPort()
|
||||
print(randomPort)
|
||||
config.set('client.public.port', randomPort, savefile=True)
|
||||
if type(config.get('client.participate')) is type(None):
|
||||
config.set('client.participate', True, savefile=True)
|
||||
|
@ -774,7 +775,7 @@ class Onionr:
|
|||
Onionr.setupConfig('data/', self = self)
|
||||
|
||||
if self._developmentMode:
|
||||
logger.warn('DEVELOPMENT MODE ENABLED (LESS SECURE)', timestamp = False)
|
||||
logger.warn('DEVELOPMENT MODE ENABLED (NOT RECOMMENDED)', timestamp = False)
|
||||
net = NetController(config.get('client.public.port', 59497), apiServerIP=apiHost)
|
||||
logger.debug('Tor is starting...')
|
||||
if not net.startTor():
|
||||
|
|
|
@ -1 +1 @@
|
|||
dd3llxdp5q6ak3zmmicoy3jnodmroouv2xr7whkygiwp3rl7nf23gdad.onion
|
||||
i7dgbnouzyl7gv75b3eaqfz7x236abkn6nkjdpun273sydkbwcoidrid.onion
|
|
@ -16,7 +16,13 @@
|
|||
<span class='logoText'>Onionr Mail</span>
|
||||
<div class='content'>
|
||||
<button class='refresh'>Refresh</button>
|
||||
<div id='threads' class='threads'></div>
|
||||
<br><br>
|
||||
<div class="btn-group">
|
||||
<button>Inbox</button><button>Sentbox</button><button>Drafts</button>
|
||||
</div>
|
||||
<div id='threads' class='threads'>
|
||||
<div id='threadPlaceholder'>Nothing here yet 😞</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src='/shared/misc.js'></script>
|
||||
<script src='/mail/mail.js'></script>
|
||||
|
|
|
@ -2,6 +2,32 @@
|
|||
padding-top: 1em;
|
||||
}
|
||||
.threads div span{
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
padding-left: 0.1em;
|
||||
padding-right: 0.1em;
|
||||
}
|
||||
|
||||
#threadPlaceholder{
|
||||
display: none;
|
||||
margin-top: 1em;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
input{
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.btn-group button {
|
||||
border: 1px solid black;
|
||||
padding: 10px 24px; /* Some padding */
|
||||
cursor: pointer; /* Pointer/hand icon */
|
||||
float: left; /* Float the buttons side by side */
|
||||
}
|
||||
|
||||
.btn-group button:hover {
|
||||
background-color: darkgray;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
margin-bottom: 2em;
|
||||
}
|
|
@ -1,7 +1,16 @@
|
|||
pms = ''
|
||||
threadPart = document.getElementById('threads')
|
||||
threadPlaceholder = document.getElementById('threadPlaceholder')
|
||||
function getInbox(){
|
||||
var showed = false
|
||||
for(var i = 0; i < pms.length; i++) {
|
||||
if (pms[i].trim().length == 0){
|
||||
continue
|
||||
}
|
||||
else{
|
||||
threadPlaceholder.style.display = 'none'
|
||||
showed = true
|
||||
}
|
||||
fetch('/getblockdata/' + pms[i], {
|
||||
headers: {
|
||||
"token": webpass
|
||||
|
@ -11,7 +20,7 @@ function getInbox(){
|
|||
|
||||
var entry = document.createElement('div')
|
||||
|
||||
var bHashDisplay = document.createElement('a')
|
||||
var bHashDisplay = document.createElement('span')
|
||||
var senderInput = document.createElement('input')
|
||||
var subjectLine = document.createElement('span')
|
||||
var dateStr = document.createElement('span')
|
||||
|
@ -30,13 +39,16 @@ function getInbox(){
|
|||
}
|
||||
//entry.innerHTML = 'sender ' + resp['meta']['signer'] + ' - ' + resp['meta']['time']
|
||||
threadPart.appendChild(entry)
|
||||
entry.appendChild(bHashDisplay)
|
||||
//entry.appendChild(bHashDisplay)
|
||||
entry.appendChild(senderInput)
|
||||
entry.appendChild(subjectLine)
|
||||
entry.appendChild(dateStr)
|
||||
|
||||
}.bind([pms, i]))
|
||||
}
|
||||
if (! showed){
|
||||
threadPlaceholder.style.display = 'block'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import config
|
||||
|
||||
config.reload()
|
||||
class StorageCounter:
|
||||
def __init__(self, coreInst):
|
||||
self._core = coreInst
|
||||
|
@ -27,7 +27,7 @@ class StorageCounter:
|
|||
|
||||
def isFull(self):
|
||||
retData = False
|
||||
if self._core.config.get('allocations.disk') <= (self.getAmount() + 1000):
|
||||
if self._core.config.get('allocations.disk', 2000000000) <= (self.getAmount() + 1000):
|
||||
retData = True
|
||||
return retData
|
||||
|
||||
|
|
Loading…
Reference in New Issue