moved a couple files, work on mail interface, improvements to web + blockapi for block decryption
This commit is contained in:
parent
f0382d24da
commit
557ffa2f4a
12 changed files with 101 additions and 18 deletions
|
@ -1 +1 @@
|
|||
svlegnabtuh3dq6ncmzqmpnxzik5mita5x22up4tai2ekngzcgqbnbqd.onion
|
||||
dd3llxdp5q6ak3zmmicoy3jnodmroouv2xr7whkygiwp3rl7nf23gdad.onion
|
|
@ -12,10 +12,12 @@
|
|||
<div id="infoOverlay" class='overlay'>
|
||||
</div>
|
||||
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
|
||||
<span class='logoText'>Onionr Web Mail</span>
|
||||
<span class='logoText'>Onionr Mail</span>
|
||||
<div class='content'>
|
||||
|
||||
<button class='refresh'>Refresh</button>
|
||||
<div id='threads'></div>
|
||||
</div>
|
||||
<script src='/shared/misc.js'></script>
|
||||
<script src='/mail/mail.js'></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
pms = ''
|
||||
threadPart = document.getElementById('threads')
|
||||
function getInbox(){
|
||||
for(var i = 0; i < pms.length; i++) {
|
||||
fetch('/getblockdata/' + pms[i], {
|
||||
headers: {
|
||||
"token": webpass
|
||||
}})
|
||||
.then((resp) => resp.json()) // Transform the data into json
|
||||
.then(function(resp) {
|
||||
var entry = document.createElement('div')
|
||||
entry.innerHTML = resp['meta']['time'] + ' - ' + resp['meta']['signer']
|
||||
threadPart.appendChild(entry)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fetch('/getblocksbytype/pm', {
|
||||
headers: {
|
||||
"token": webpass
|
||||
}})
|
||||
.then((resp) => resp.text()) // Transform the data into json
|
||||
.then(function(data) {
|
||||
pms = data.split(',')
|
||||
getInbox()
|
||||
})
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
<span class='logoText'>Onionr Web Control Panel</span>
|
||||
<div class='content'>
|
||||
<button id='shutdownNode'>Shutdown Node</button> <button id='refreshStats'>Refresh Stats</button>
|
||||
<br><br><a class='idLink' href='/mail/'>Mail</a>
|
||||
<h2>Stats</h2>
|
||||
<p>Uptime: <span id='uptime'></span></p>
|
||||
<p>Stored Blocks: <span id='storedBlocks'></span></p>
|
||||
|
|
|
@ -5,7 +5,7 @@ if (typeof webpass == "undefined"){
|
|||
}
|
||||
else{
|
||||
localStorage['webpass'] = webpass
|
||||
document.location.hash = ''
|
||||
//document.location.hash = ''
|
||||
}
|
||||
if (typeof webpass == "undefined" || webpass == ""){
|
||||
alert('Web password was not found in memory or URL')
|
||||
|
@ -28,3 +28,17 @@ function overlay(overlayID) {
|
|||
el = document.getElementById(overlayID)
|
||||
el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible"
|
||||
}
|
||||
|
||||
var passLinks = document.getElementsByClassName("idLink")
|
||||
for(var i = 0; i < passLinks.length; i++) {
|
||||
passLinks[i].href += '#' + webpass
|
||||
}
|
||||
|
||||
var refreshLinks = document.getElementsByClassName("refresh")
|
||||
|
||||
for(var i = 0; i < refreshLinks.length; i++) {
|
||||
//Can't use .reload because of webpass
|
||||
refreshLinks[i].onclick = function(){
|
||||
location.reload()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue