bug fixes and ui appearance improvements
This commit is contained in:
parent
9ee31684f6
commit
2fde909d86
@ -102,3 +102,6 @@ v0
|
|||||||
- Returns 200 with 'success' if no error occurs. If the block cannot be accepted, 'failure' with 400 is returned.
|
- Returns 200 with 'success' if no error occurs. If the block cannot be accepted, 'failure' with 400 is returned.
|
||||||
|
|
||||||
# Direct Connection API
|
# Direct Connection API
|
||||||
|
|
||||||
|
These are constant endpoints available on direct connection servers. Plugin endpoints for direct connections are not documented here.
|
||||||
|
|
||||||
|
@ -45,8 +45,6 @@ def sendto():
|
|||||||
msg = request.get_json(force=True)
|
msg = request.get_json(force=True)
|
||||||
except:
|
except:
|
||||||
msg = ''
|
msg = ''
|
||||||
if msg == None or msg == '':
|
|
||||||
msg = json.dumps({'m': 'hello world', 't': core_inst._utils.getEpoch()})
|
|
||||||
else:
|
else:
|
||||||
msg = json.dumps(msg)
|
msg = json.dumps(msg)
|
||||||
core_inst._utils.localCommand('/clandestine/addrec/%s' % (g.peer,), post=True, postData=msg)
|
core_inst._utils.localCommand('/clandestine/addrec/%s' % (g.peer,), post=True, postData=msg)
|
||||||
|
@ -23,7 +23,6 @@ threadPart = document.getElementById('threads')
|
|||||||
threadPlaceholder = document.getElementById('threadPlaceholder')
|
threadPlaceholder = document.getElementById('threadPlaceholder')
|
||||||
tabBtns = document.getElementById('tabBtns')
|
tabBtns = document.getElementById('tabBtns')
|
||||||
threadContent = {}
|
threadContent = {}
|
||||||
myPub = httpGet('/getActivePubkey')
|
|
||||||
replyBtn = document.getElementById('replyBtn')
|
replyBtn = document.getElementById('replyBtn')
|
||||||
|
|
||||||
function openReply(bHash, quote, subject){
|
function openReply(bHash, quote, subject){
|
||||||
@ -300,16 +299,6 @@ tabBtns.onclick = function(event){
|
|||||||
setActiveTab(event.target.innerText.toLowerCase())
|
setActiveTab(event.target.innerText.toLowerCase())
|
||||||
}
|
}
|
||||||
|
|
||||||
var idStrings = document.getElementsByClassName('myPub')
|
|
||||||
for (var i = 0; i < idStrings.length; i++){
|
|
||||||
if (idStrings[i].tagName.toLowerCase() == 'input'){
|
|
||||||
idStrings[i].value = myPub
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
idStrings[i].innerText = myPub
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < document.getElementsByClassName('refresh').length; i++){
|
for (var i = 0; i < document.getElementsByClassName('refresh').length; i++){
|
||||||
document.getElementsByClassName('refresh')[i].style.float = 'right'
|
document.getElementsByClassName('refresh')[i].style.float = 'right'
|
||||||
}
|
}
|
||||||
|
@ -19,17 +19,21 @@
|
|||||||
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
|
<img class='logo' src='/shared/onionr-icon.png' alt='onionr logo'>
|
||||||
<span class='logoText'>Onionr Web Control Panel</span>
|
<span class='logoText'>Onionr Web Control Panel</span>
|
||||||
<br><br>
|
<br><br>
|
||||||
<button id='shutdownNode'>Shutdown Node</button> <button id='refreshStats'>Refresh Stats</button>
|
<div>🕵️♂️ Current Used Identity: <input class='myPub' type='text' readonly></div>
|
||||||
|
<br>
|
||||||
|
<button id='shutdownNode' class='warnBtn'>Shutdown Node</button> <button id='refreshStats' class='primaryBtn'>Refresh Stats</button>
|
||||||
<br><br>
|
<br><br>
|
||||||
<label>Site Hash: <input type='text' id='siteViewer'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
|
<h2>Onionr Services</h2>
|
||||||
|
<label>Open Site: <input type='text' id='siteViewer' placeholder='Site Hash'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
|
||||||
<br>
|
<br>
|
||||||
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a>
|
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a>
|
||||||
|
<br><br><hr>
|
||||||
<h2>Stats</h2>
|
<h2>Stats</h2>
|
||||||
<p>Uptime: <span id='uptime'></span></p>
|
<p>🕰️ Uptime: <span id='uptime'></span></p>
|
||||||
<p>Last Received Connection: <span id='lastIncoming'>Unknown</span></p>
|
<p>🖇️ Last Received Connection: <span id='lastIncoming'>Unknown</span></p>
|
||||||
<p>Stored Blocks: <span id='storedBlocks'></span></p>
|
<p>💾 Stored Blocks: <span id='storedBlocks'></span></p>
|
||||||
<p>Blocks in queue: <span id='blockQueue'></span></p>
|
<p>📨 Blocks in queue: <span id='blockQueue'></span></p>
|
||||||
<p>Connected nodes:</p>
|
<p>🔗 Outgoing Connections:</p>
|
||||||
<pre id='connectedNodes'></pre>
|
<pre id='connectedNodes'></pre>
|
||||||
</div>
|
</div>
|
||||||
<script src='/shared/misc.js'></script>
|
<script src='/shared/misc.js'></script>
|
||||||
|
@ -152,7 +152,7 @@ body{
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn, .warnBtn, .dangerBtn, .successBtn{
|
.btn, .warnBtn, .dangerBtn, .successBtn, .primaryBtn{
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
webpass = document.location.hash.replace('#', '')
|
webpass = document.location.hash.replace('#', '')
|
||||||
nowebpass = false
|
nowebpass = false
|
||||||
|
|
||||||
|
myPub = httpGet('/getActivePubkey')
|
||||||
|
|
||||||
function post_to_url(path, params) {
|
function post_to_url(path, params) {
|
||||||
|
|
||||||
var form = document.createElement("form")
|
var form = document.createElement("form")
|
||||||
@ -92,3 +94,13 @@ for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++)
|
|||||||
document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden'
|
document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var idStrings = document.getElementsByClassName('myPub')
|
||||||
|
for (var i = 0; i < idStrings.length; i++){
|
||||||
|
if (idStrings[i].tagName.toLowerCase() == 'input'){
|
||||||
|
idStrings[i].value = myPub
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
idStrings[i].innerText = myPub
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user