fixed broken getcontent, more work on mail

This commit is contained in:
Kevin Froman 2019-02-01 21:15:28 -06:00
parent 158154184a
commit d21db75edd
3 changed files with 21 additions and 15 deletions

View file

@ -2,5 +2,6 @@
padding-top: 1em;
}
.threads div span{
padding-left: 1em;
padding-left: 0.5em;
padding-right: 0.5em;
}

View file

@ -8,16 +8,18 @@ function getInbox(){
}})
.then((resp) => resp.json()) // Transform the data into json
.then(function(resp) {
var entry = document.createElement('div')
var bHash = pms[i].substring(0, 10)
var bHashDisplay = document.createElement('span')
var bHashDisplay = document.createElement('a')
var senderInput = document.createElement('input')
var subjectLine = document.createElement('span')
var dateStr = document.createElement('span')
var humanDate = new Date(0)
humanDate.setUTCSeconds(resp['meta']['time'])
senderInput.value = resp['meta']['signer']
bHashDisplay.innerText = bHash
bHashDisplay.innerText = pms[i - 1].substring(0, 10)
bHashDisplay.setAttribute('hash', pms[i - 1]);
senderInput.readOnly = true
dateStr.innerText = humanDate.toString()
if (resp['metadata']['subject'] === undefined || resp['metadata']['subject'] === null) {
@ -33,7 +35,7 @@ function getInbox(){
entry.appendChild(subjectLine)
entry.appendChild(dateStr)
})
}.bind([pms, i]))
}
}
@ -45,6 +47,6 @@ fetch('/getblocksbytype/pm', {
.then((resp) => resp.text()) // Transform the data into json
.then(function(data) {
pms = data.split(',')
getInbox()
getInbox(pms)
})