fixed broken getcontent, more work on mail
This commit is contained in:
parent
158154184a
commit
d21db75edd
3 changed files with 21 additions and 15 deletions
|
@ -2,5 +2,6 @@
|
|||
padding-top: 1em;
|
||||
}
|
||||
.threads div span{
|
||||
padding-left: 1em;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
}
|
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue