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 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) var humanDate = new Date(0)
if (msg.length == 0){ if (msg.length == 0){
return return
@ -161,12 +162,12 @@ function getBlocks(){
continue continue
} }
requested.push(blockList[i]) 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, { fetch('/getblockdata/' + blockHash, {
method: 'GET', method: 'GET',
headers: { 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) //appendMessages(data, blockHash, before)
}) })
} }

View File

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

View File

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