move config editor in index, fix circles showing posts under wrong circle

This commit is contained in:
Kevin Froman 2019-10-10 02:25:12 -05:00
parent a704eaaf60
commit f0c72ef1c8
3 changed files with 18 additions and 18 deletions

View File

@ -51,7 +51,8 @@ fetch('/flow/version', {
document.getElementById('circlesVersion').innerText = data
})
function appendMessages(msg, blockHash, beforeHash){
function appendMessages(msg, blockHash, beforeHash, channel){
if (channel !== document.getElementById('feedIDInput').value){return}
var humanDate = new Date(0)
if (msg.length == 0){
return
@ -161,12 +162,12 @@ function getBlocks(){
continue
}
requested.push(blockList[i])
loadMessage(blockList[i], blockList, i)
loadMessage(blockList[i], blockList, i, ch)
}
}
}
function loadMessage(blockHash, blockList, count){
function loadMessage(blockHash, blockList, count, channel){
fetch('/getblockdata/' + blockHash, {
method: 'GET',
headers: {
@ -187,7 +188,7 @@ function loadMessage(blockHash, blockList, count){
}
}
}
setTimeout(function(){appendMessages(data, blockHash, before)}, delay)
setTimeout(function(){appendMessages(data, blockHash, before, channel)}, delay)
//appendMessages(data, blockHash, before)
})
}

View File

@ -3,7 +3,6 @@
<head>
<meta charset="utf-8">
<!--Mobile responsive-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Onionr
@ -108,7 +107,6 @@
</div>
</div>
</div>
</div>
</section>
<br>
@ -204,25 +202,20 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!--Configuration Card-->
<div class="card">
<header class="card-header" id="configToggle">
<p class="card-header-title">
<a class="button is-white">Edit Configuration</a>
</p>
</header>
<div class="card-content" id="configContent">
<a class="button is-white" id="configToggle">Edit Configuration</a>
<div id="configContent">
<div class="content">
<p><em>Warning: </em><b>Some values can be dangerous to change. Use caution.</b></p>
<textarea class="textarea configEditor" rows="20"></textarea>
<br>
<a class="button is-primary saveConfig">Save Config</a>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="modal aboutModal">

View File

@ -16,4 +16,10 @@
#connectedNodes{
overflow-y: auto;
}
}
#configToggle, #configContent{
margin-left: 1em;
margin-right: 1em;
margin-bottom: 1em;
}