added signature toggle on circles posts
This commit is contained in:
parent
271307fbe1
commit
2cb36875d2
@ -10,7 +10,7 @@
|
||||
|
||||
<img src='https://img.shields.io/github/license/beardog108/onionr'> <img src='https://gitlab.com/beardog/Onionr/badges/master/build.svg'> <img src='https://img.shields.io/badge/docker%20%F0%9F%90%8B-supported-success'> <img src='https://img.shields.io/badge/python%20version%20%F0%9F%90%8D-3.6+-blue'> <img src='https://img.shields.io/github/commit-activity/m/beardog108/onionr'>
|
||||
|
||||
<img src = 'https://img.shields.io/reddit/subreddit-subscribers/onionr?style=social'> <img src='https://img.shields.io/twitter/follow/onionrnet?style=social'>
|
||||
<a href='https://www.reddit.com/r/onionr'><img src = 'https://img.shields.io/reddit/subreddit-subscribers/onionr?style=social'></a> <a href='https://twitter.com/onionrnet'><img src='https://img.shields.io/twitter/follow/onionrnet?style=social'></a>
|
||||
|
||||
| | | |
|
||||
| ----------- | ----------- | ----------- |
|
||||
|
@ -39,7 +39,11 @@ function appendMessages(msg){
|
||||
var clone = document.importNode(template.content, true);
|
||||
var div = clone.querySelectorAll("div")
|
||||
div[2].textContent = msg['content']
|
||||
div[3].textContent = msgDate
|
||||
if (typeof msg['meta']['signer'] != 'undefined'){
|
||||
div[3].textContent = msg['meta']['signer'].substr(0, 5)
|
||||
div[3].title = msg['meta']['signer']
|
||||
}
|
||||
div[4].textContent = msgDate
|
||||
|
||||
if (firstLoad){
|
||||
feed.appendChild(clone)
|
||||
@ -82,7 +86,7 @@ function getBlocks(){
|
||||
appendMessages(bl)
|
||||
requested.push(blockList[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
firstLoad = false
|
||||
}
|
||||
|
||||
@ -94,7 +98,8 @@ newPostForm.onsubmit = function(){
|
||||
var message = document.getElementById('newMsgText').value
|
||||
var channel = document.getElementById('feedIDInput').value
|
||||
var meta = {'ch': channel}
|
||||
var postData = {'message': message, 'sign': false, 'type': 'brd', 'encrypt': false, 'meta': JSON.stringify(meta)}
|
||||
let doSign = document.getElementById('postAnon').checked
|
||||
var postData = {'message': message, 'sign': doSign, 'type': 'brd', 'encrypt': false, 'meta': JSON.stringify(meta)}
|
||||
postData = JSON.stringify(postData)
|
||||
newPostForm.style.display = 'none'
|
||||
fetch('/insertblock', {
|
||||
@ -111,7 +116,6 @@ newPostForm.onsubmit = function(){
|
||||
alert('This message is already queued')
|
||||
return
|
||||
}
|
||||
alert('Queued for submission! ' + data)
|
||||
setTimeout(function(){getBlocks()}, 3000)
|
||||
})
|
||||
return false
|
||||
|
@ -113,11 +113,9 @@
|
||||
</div>
|
||||
<input type="checkbox" class="checkbox" id="refreshCheckbox" checked>
|
||||
<label for="refreshCheckbox">Auto Refresh Feed</label>
|
||||
<!--
|
||||
<br>
|
||||
<input type="checkbox" class="checkbox" id="postAnon" checked>
|
||||
<label for="postAnon">Sign posts</label>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
@ -139,6 +137,7 @@
|
||||
<div class="column cMsg">
|
||||
Message
|
||||
</div>
|
||||
<div class="column cAuthor is-narrow"></div>
|
||||
<div class="column is-narrow cMsgDate">
|
||||
Date
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@
|
||||
Onionr
|
||||
</title>
|
||||
<link rel='shortcut icon' type='image/ico' href='/shared/images/favicon.ico'>
|
||||
<link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.css">
|
||||
<link rel="stylesheet" href="/shared/fontawesome-free-5.10.2/css/all.min.css">
|
||||
<link rel="stylesheet" href="/shared/main/bulma.min.css">
|
||||
<link rel="stylesheet" href="/shared/main/styles-new.css">
|
||||
<script defer src='/shared/navbar.js'></script>
|
||||
|
@ -106,10 +106,13 @@ for (var i = 0; i < idStrings.length; i++){
|
||||
}
|
||||
|
||||
/* Copy public ID on homepage */
|
||||
myPubCopy.onclick = function() {
|
||||
var copyText = document.getElementById("myPub");
|
||||
copyText.select();
|
||||
document.execCommand("copy")
|
||||
if (typeof myPubCopy != "undefined"){
|
||||
|
||||
myPubCopy.onclick = function() {
|
||||
var copyText = document.getElementById("myPub");
|
||||
copyText.select()
|
||||
document.execCommand("copy")
|
||||
}
|
||||
}
|
||||
|
||||
/* For Config toggle on homepage */
|
||||
|
Loading…
Reference in New Issue
Block a user