added chat sendbox
parent
a5490b9f28
commit
315e860eff
|
@ -19,6 +19,7 @@
|
|||
'''
|
||||
import logger
|
||||
from communicatorutils import proxypicker
|
||||
import onionrexceptions
|
||||
import onionrblockapi as block
|
||||
from onionrutils import localcommand, stringvalidators, basicrequests
|
||||
from communicator import onlinepeers
|
||||
|
@ -42,7 +43,11 @@ def upload_blocks_from_communicator(comm_inst):
|
|||
continue
|
||||
triedPeers.append(peer)
|
||||
url = 'http://' + peer + '/upload'
|
||||
data = {'block': block.Block(bl).getRaw()}
|
||||
try:
|
||||
data = {'block': block.Block(bl).getRaw()}
|
||||
except onionrexceptions.NoDataAvailable:
|
||||
finishedUploads.append(bl)
|
||||
break
|
||||
proxyType = proxypicker.pick_proxy(peer)
|
||||
logger.info("Uploading block %s to %s" % (bl[:8], peer), terminal=True)
|
||||
resp = basicrequests.do_post_request(url, data=data, proxyType=proxyType)
|
||||
|
|
|
@ -17,3 +17,17 @@
|
|||
.connectStatus{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.friendsTitle{
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.chatInput{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
|
||||
}
|
||||
.chatInput textarea{
|
||||
resize: none;
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
<script defer src='/shared/direct-connections.js'></script>
|
||||
<script defer src='/chat/js/messages.js'></script>
|
||||
<script defer src='/chat/js/message-feed.js'></script>
|
||||
<script defer src='/chat/js/resizes.js'></script>
|
||||
<script defer src='/chat/js/main.js'></script>
|
||||
</head>
|
||||
|
||||
|
@ -84,10 +85,18 @@
|
|||
|
||||
<div class="columns chatContent">
|
||||
<div class="column has-background-grey-dark has-text-light is-one-fifths content convoListContainer">
|
||||
<span class='friendsTitle'>Friends</span>
|
||||
<hr>
|
||||
<ul class='conversationList'></ul>
|
||||
</div>
|
||||
<div class="column chatBox has-text-light has-background-dark is-four-fifths">
|
||||
<span class="chatFeed"></span>
|
||||
<div class="field has-addons">
|
||||
<p class="control chatInput">
|
||||
<textarea class="textarea" name="message-to-send" id="message-to-send" placeholder="Type your message" rows="1"></textarea>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
let doResize = function(){
|
||||
let chatInput = document.getElementsByClassName('chatInput')[0]
|
||||
chatInput.style.width = "50%";
|
||||
}
|
||||
doResize()
|
||||
window.onresize = doResize
|
Loading…
Reference in New Issue