merged forgotton ui stuff

master
Kevin Froman 2019-02-17 15:55:53 -06:00
parent 629c0083f4
commit 0ff8e22973
6 changed files with 0 additions and 98 deletions

File diff suppressed because one or more lines are too long

View File

@ -2,10 +2,6 @@
padding-top: 1em; padding-top: 1em;
} }
.threads div span{ .threads div span{
<<<<<<< HEAD
padding-left: 0.5em;
padding-right: 0.5em;
=======
padding-left: 0.2em; padding-left: 0.2em;
padding-right: 0.2em; padding-right: 0.2em;
} }
@ -98,5 +94,4 @@ input{
color: black; color: black;
font-size: 1.5em; font-size: 1.5em;
width: 10%; width: 10%;
>>>>>>> contacts
} }

View File

@ -1,45 +1,3 @@
<<<<<<< HEAD
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')
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 = 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) {
subjectLine.innerText = '()'
}
else{
subjectLine.innerText = '(' + resp['metadata']['subject'] + ')'
}
//entry.innerHTML = 'sender ' + resp['meta']['signer'] + ' - ' + resp['meta']['time']
threadPart.appendChild(entry)
entry.appendChild(bHashDisplay)
entry.appendChild(senderInput)
entry.appendChild(subjectLine)
entry.appendChild(dateStr)
}.bind([pms, i]))
}
=======
/* /*
Onionr - P2P Anonymous Storage Network Onionr - P2P Anonymous Storage Network
@ -215,7 +173,6 @@ function showSentboxWindow(to, 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')
>>>>>>> contacts
} }
fetch('/getblocksbytype/pm', { fetch('/getblocksbytype/pm', {
@ -225,11 +182,6 @@ fetch('/getblocksbytype/pm', {
.then((resp) => resp.text()) // Transform the data into json .then((resp) => resp.text()) // Transform the data into json
.then(function(data) { .then(function(data) {
pms = data.split(',') pms = data.split(',')
<<<<<<< HEAD
getInbox(pms)
})
=======
setActiveTab('inbox') setActiveTab('inbox')
}) })
@ -264,4 +216,3 @@ for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++)
} }
} }
>>>>>>> contacts

View File

@ -21,10 +21,7 @@ uptimeDisplay = document.getElementById('uptime')
connectedDisplay = document.getElementById('connectedNodes') connectedDisplay = document.getElementById('connectedNodes')
storedBlockDisplay = document.getElementById('storedBlocks') storedBlockDisplay = document.getElementById('storedBlocks')
queuedBlockDisplay = document.getElementById('blockQueue') queuedBlockDisplay = document.getElementById('blockQueue')
<<<<<<< HEAD
=======
lastIncoming = document.getElementById('lastIncoming') lastIncoming = document.getElementById('lastIncoming')
>>>>>>> contacts
function getStats(){ function getStats(){
stats = JSON.parse(httpGet('getstats', webpass)) stats = JSON.parse(httpGet('getstats', webpass))
@ -32,8 +29,6 @@ function getStats(){
connectedDisplay.innerText = stats['connectedNodes'] connectedDisplay.innerText = stats['connectedNodes']
storedBlockDisplay.innerText = stats['blockCount'] storedBlockDisplay.innerText = stats['blockCount']
queuedBlockDisplay.innerText = stats['blockQueueCount'] queuedBlockDisplay.innerText = stats['blockQueueCount']
<<<<<<< HEAD
=======
var lastConnect = httpGet('/lastconnect') var lastConnect = httpGet('/lastconnect')
if (lastConnect > 0){ if (lastConnect > 0){
var humanDate = new Date(0) var humanDate = new Date(0)
@ -44,6 +39,5 @@ function getStats(){
lastConnect = 'Unknown' lastConnect = 'Unknown'
} }
lastIncoming.innerText = lastConnect lastIncoming.innerText = lastConnect
>>>>>>> contacts
} }
getStats() getStats()

View File

@ -37,11 +37,7 @@ body{
align-items:center; align-items:center;
} }
.logo{ .logo{
<<<<<<< HEAD
max-width: 25%;
=======
max-width: 20%; max-width: 20%;
>>>>>>> contacts
vertical-align: middle; vertical-align: middle;
} }
.logoText{ .logoText{
@ -136,14 +132,6 @@ body{
left: 0px; left: 0px;
top: 0px; top: 0px;
width:100%; width:100%;
<<<<<<< HEAD
opacity: 0.9;
height:100%;
text-align:center;
z-index: 1000;
background-color: black;
}
=======
height:100%; height:100%;
text-align:left; text-align:left;
z-index: 1000; z-index: 1000;
@ -163,4 +151,3 @@ body{
content: '❌'; content: '❌';
padding: 5px; padding: 5px;
} }
>>>>>>> contacts

View File

@ -1,7 +1,3 @@
<<<<<<< HEAD
webpass = document.location.hash.replace('#', '')
nowebpass = false
=======
/* /*
Onionr - P2P Anonymous Storage Network Onionr - P2P Anonymous Storage Network
@ -24,7 +20,6 @@ nowebpass = false
webpass = document.location.hash.replace('#', '') webpass = document.location.hash.replace('#', '')
nowebpass = false nowebpass = false
>>>>>>> contacts
if (typeof webpass == "undefined"){ if (typeof webpass == "undefined"){
webpass = localStorage['webpass'] webpass = localStorage['webpass']
} }
@ -37,13 +32,10 @@ if (typeof webpass == "undefined" || webpass == ""){
nowebpass = true nowebpass = true
} }
<<<<<<< HEAD
=======
function arrayContains(needle, arrhaystack) { function arrayContains(needle, arrhaystack) {
return (arrhaystack.indexOf(needle) > -1); return (arrhaystack.indexOf(needle) > -1);
} }
>>>>>>> contacts
function httpGet(theUrl) { function httpGet(theUrl) {
var xmlHttp = new XMLHttpRequest() var xmlHttp = new XMLHttpRequest()
xmlHttp.open( "GET", theUrl, false ) // false for synchronous request xmlHttp.open( "GET", theUrl, false ) // false for synchronous request
@ -59,10 +51,7 @@ function httpGet(theUrl) {
function overlay(overlayID) { function overlay(overlayID) {
el = document.getElementById(overlayID) el = document.getElementById(overlayID)
el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible" el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible"
<<<<<<< HEAD
=======
scroll(0,0) scroll(0,0)
>>>>>>> contacts
} }
var passLinks = document.getElementsByClassName("idLink") var passLinks = document.getElementsByClassName("idLink")