fixed padding view for sentbox
This commit is contained in:
parent
9f1790a601
commit
6fe2da7b09
@ -28,6 +28,22 @@ addUnknownContact = document.getElementById('addUnknownContact')
|
|||||||
noInbox = document.getElementById('noInbox')
|
noInbox = document.getElementById('noInbox')
|
||||||
humanReadableCache = {}
|
humanReadableCache = {}
|
||||||
|
|
||||||
|
function stripEndZeroes(str){
|
||||||
|
str = str.split("")
|
||||||
|
let zeroCount = 0
|
||||||
|
for (x = str.length - 1; x != 0; x--){
|
||||||
|
if (str[x] == "0"){
|
||||||
|
zeroCount += 1
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str.splice(str.length - zeroCount, zeroCount)
|
||||||
|
str = str.join("")
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
async function addContact(pubkey, friendName){
|
async function addContact(pubkey, friendName){
|
||||||
fetch('/friends/add/' + pubkey, {
|
fetch('/friends/add/' + pubkey, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -89,6 +105,8 @@ function openThread(bHash, sender, date, sigBool, pubkey, subjectLine){
|
|||||||
document.getElementById('fromUser').value = pubkey || ''
|
document.getElementById('fromUser').value = pubkey || ''
|
||||||
document.getElementById('subjectView').innerText = subjectLine
|
document.getElementById('subjectView').innerText = subjectLine
|
||||||
|
|
||||||
|
resp = stripEndZeroes(resp)
|
||||||
|
/*
|
||||||
resp = resp.split("")
|
resp = resp.split("")
|
||||||
let zeroCount = 0
|
let zeroCount = 0
|
||||||
for (x = resp.length - 1; x != 0; x--){
|
for (x = resp.length - 1; x != 0; x--){
|
||||||
@ -101,6 +119,7 @@ function openThread(bHash, sender, date, sigBool, pubkey, subjectLine){
|
|||||||
}
|
}
|
||||||
resp.splice(resp.length - zeroCount, zeroCount)
|
resp.splice(resp.length - zeroCount, zeroCount)
|
||||||
resp = resp.join("")
|
resp = resp.join("")
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
messageDisplay.innerText = resp
|
messageDisplay.innerText = resp
|
||||||
@ -367,6 +386,7 @@ function getSentbox(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showSentboxWindow(to, content){
|
function showSentboxWindow(to, content){
|
||||||
|
content = stripEndZeroes(content)
|
||||||
document.getElementById('toID').value = to
|
document.getElementById('toID').value = to
|
||||||
document.getElementById('sentboxDisplayText').innerText = content
|
document.getElementById('sentboxDisplayText').innerText = content
|
||||||
overlay('sentboxDisplay')
|
overlay('sentboxDisplay')
|
||||||
|
Loading…
Reference in New Issue
Block a user