* fixed some mail elements for bulma redesign

* added dll, exe to .gitignore
* fixed some miscpublicapi endpoints httpapi calls
This commit is contained in:
KF 2019-07-02 17:34:26 -05:00
parent 10ef9ce41b
commit 2f07b2d00e
8 changed files with 22 additions and 21 deletions

3
.gitignore vendored
View File

@ -18,6 +18,9 @@ core
venv/* venv/*
onionr/fs* onionr/fs*
*.dll
*.exe
# log files # log files
output.log output.log
*.log *.log

View File

@ -227,4 +227,4 @@ class API:
pass pass
def getBlockData(self, bHash, decrypt=False, raw=False, headerOnly=False): def getBlockData(self, bHash, decrypt=False, raw=False, headerOnly=False):
return self.get_block_data.get_block_data(self, bHash, decrypt, raw, headerOnly) return self.get_block_data.get_block_data(bHash, decrypt=decrypt, raw=raw, headerOnly=headerOnly)

View File

@ -38,12 +38,12 @@ class PublicEndpoints:
@public_endpoints_bp.route('/getblocklist') @public_endpoints_bp.route('/getblocklist')
def get_block_list(): def get_block_list():
return getblocks.public_block_list(client_API, public_api, request) return getblocks.get_public_block_list(client_API, public_api, request)
@public_endpoints_bp.route('/getdata/<name>') @public_endpoints_bp.route('/getdata/<name>')
def get_block_data(name): def get_block_data(name):
# Share data for a block if we have it # Share data for a block if we have it
return getblocks.public_get_block_data(client_API, public_api, name) return getblocks.get_block_data(client_API, public_api, name)
@public_endpoints_bp.route('/www/<path:path>') @public_endpoints_bp.route('/www/<path:path>')
def www_public(path): def www_public(path):
@ -66,7 +66,7 @@ class PublicEndpoints:
@public_endpoints_bp.route('/announce', methods=['post']) @public_endpoints_bp.route('/announce', methods=['post'])
def accept_announce(): def accept_announce():
resp = httpapi.miscpublicapi.announce(client_API, request) resp = announce.handle_announce(client_API, request)
return resp return resp
@public_endpoints_bp.route('/upload', methods=['post']) @public_endpoints_bp.route('/upload', methods=['post'])

View File

@ -17,7 +17,7 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item idLink" href="/"> <a class="navbar-item idLink" href="/">
<img src="/shared/images/favicon.ico" class="navabarLogo"> Onionr <img src="/shared/images/favicon.ico" class="navbarLogo"> Onionr
</a> </a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"

View File

@ -19,7 +19,7 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item idLink" href="/"> <a class="navbar-item idLink" href="/">
<img src="/shared/images/favicon.ico" class="navabarLogo"> Onionr <img src="/shared/images/favicon.ico" class="navbarLogo"> Onionr
</a> </a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"

View File

@ -18,7 +18,7 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item idLink" href="/"> <a class="navbar-item idLink" href="/">
<img src="/shared/images/favicon.ico" class="navabarLogo"> Onionr <img src="/shared/images/favicon.ico" class="navbarLogo"> Onionr
</a> </a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
@ -84,7 +84,7 @@
<!--Start of content--> <!--Start of content-->
<div class="container"> <div class="container">
<div class="tabs"> <div class="tabs" id="tabBtns">
<ul> <ul>
<li class="is-active"> <li class="is-active">
<a> <a>
@ -112,9 +112,6 @@
<div class='mailPing'> <div class='mailPing'>
API server either shutdown, has disabled mail, or has experienced a bug. API server either shutdown, has disabled mail, or has experienced a bug.
</div> </div>
<div class="btn-group" id='tabBtns'>
<button class='activeTab'>Inbox</button><button>Sentbox</button><button>Send Message</button>
</div>
<div id='threads' class='threads'> <div id='threads' class='threads'>
<div id='threadPlaceholder'>Nothing here yet 😞</div> <div id='threadPlaceholder'>Nothing here yet 😞</div>
</div> </div>
@ -159,7 +156,6 @@
</div> </div>
</div> </div>
<script src='/shared/misc.js'></script> <script src='/shared/misc.js'></script>
<script src='/shared/tabs.js'></script>
<script src='/mail/mail.js'></script> <script src='/mail/mail.js'></script>
<script src='/mail/sendmail.js'></script> <script src='/mail/sendmail.js'></script>
</body> </body>

View File

@ -110,10 +110,10 @@ function setActiveTab(tabName){
case 'inbox': case 'inbox':
refreshPms() refreshPms()
break break
case 'sentbox': case 'sent':
getSentbox() getSentbox()
break break
case 'send message': case 'compose':
overlay('sendMessage') overlay('sendMessage')
setActiveTab('inbox') setActiveTab('inbox')
break break
@ -320,12 +320,12 @@ fetch('/mail/getinbox', {
} }
tabBtns.onclick = function(event){ tabBtns.onclick = function(event){
var children = tabBtns.children var children = tabBtns.children[0].children
for (var i = 0; i < children.length; i++) { for (var i = 0; i < children.length; i++) {
var btn = children[i] var btn = children[i]
btn.classList.remove('activeTab') btn.classList.remove('is-active')
} }
event.target.classList.add('activeTab') event.target.parentElement.parentElement.classList.add('is-active')
setActiveTab(event.target.innerText.toLowerCase()) setActiveTab(event.target.innerText.toLowerCase())
} }

View File

@ -109,13 +109,15 @@ for (var i = 0; i < idStrings.length; i++){
myPubCopy.onclick = function() { myPubCopy.onclick = function() {
var copyText = document.getElementById("myPub"); var copyText = document.getElementById("myPub");
copyText.select(); copyText.select();
document.execCommand("copy"); document.execCommand("copy")
} }
/* For Config toggle on homepage */ /* For Config toggle on homepage */
var toggle = document.getElementById("configToggle"); var toggle = document.getElementById("configToggle");
var content = document.getElementById("configContent"); var content = document.getElementById("configContent");
toggle.addEventListener("click", function() { if(typeof toggle !== 'undefined' && toggle !== null) {
content.classList.toggle("show"); toggle.addEventListener("click", function() {
}); content.classList.toggle("show");
})
}