* Mail compose no longer uses overlay

This commit is contained in:
Kevin Froman 2020-04-04 04:22:11 -05:00
parent aa729d862c
commit 7bedae48a4
3 changed files with 21 additions and 24 deletions

View File

@ -113,25 +113,6 @@
</div> </div>
</div> </div>
</div> </div>
<div id="sendMessage" class="overlay">
<div class="overlayContent">
<div class="field">
<label><i class="fas fa-user"></i> Select friend: <select id="friendSelect"></select></label>
</div>
<form method="post" action="" id="sendForm" enctype="application/x-www-form-urlencoded">
<span class="closeOverlay" overlay="sendMessage"></span>
<div class="field">
To: <input id="draftID" type="text" name="to" placeholder="pubkey or select above" required>
</div>
Subject: <input name="subject" id="draftSubject" maxlength="25" type="text"
placeholder="message subject">
<div class="field">
<textarea name="message" class="textarea" placeholder="type your message..." id="draftText" required></textarea>
</div>
<input type="submit" value="Send" class="button is-success successBtn">
</form>
</div>
</div>
<div id="settingsModal" class="modal"> <div id="settingsModal" class="modal">
<div class="modal-background"></div> <div class="modal-background"></div>
@ -255,7 +236,24 @@
</div> </div>
</div> </div>
</div> </div>
<div id="sendMessage">
<div class="container">
<div class="field">
<label><i class="fas fa-user"></i> Select friend: <select id="friendSelect"></select></label>
</div>
<form method="post" action="" id="sendForm" enctype="application/x-www-form-urlencoded">
<div class="field">
To: <input id="draftID" type="text" name="to" placeholder="pubkey or select above" required>
</div>
Subject: <input name="subject" id="draftSubject" maxlength="25" type="text"
placeholder="message subject">
<div class="field">
<textarea name="message" class="textarea" placeholder="type your message..." id="draftText" required></textarea>
</div>
<input type="submit" value="Send" class="button is-primary successBtn">
</form>
</div>
</div>
<div id="infoOverlay" class="overlay"> <div id="infoOverlay" class="overlay">
</div> </div>
</body> </body>

View File

@ -58,4 +58,3 @@
#settingsModal small{ #settingsModal small{
font-size: 0.5em; font-size: 0.5em;
} }

View File

@ -128,6 +128,7 @@ function openThread(bHash, sender, date, sigBool, pubkey, subjectLine){
sigEl.innerText = sigMsg sigEl.innerText = sigMsg
overlay('messageDisplay') overlay('messageDisplay')
replyBtn.onclick = function(){ replyBtn.onclick = function(){
document.getElementById('messageDisplay').style.visibility = 'hidden'
openReply(bHash, messageDisplay.innerText, subjectLine) openReply(bHash, messageDisplay.innerText, subjectLine)
} }
addUnknownContact.onclick = function(){ addUnknownContact.onclick = function(){
@ -144,6 +145,7 @@ function setActiveTab(tabName){
threadPart.innerHTML = "" threadPart.innerHTML = ""
noInbox.style.display = 'none' noInbox.style.display = 'none'
window.inboxActive = false window.inboxActive = false
document.getElementById('sendMessage').classList.add('is-hidden')
switch(tabName){ switch(tabName){
case 'inbox': case 'inbox':
window.inboxActive = true window.inboxActive = true
@ -154,8 +156,7 @@ function setActiveTab(tabName){
getSentbox() getSentbox()
break break
case 'compose': case 'compose':
overlay('sendMessage') document.getElementById('sendMessage').classList.remove('is-hidden')
document.getElementById('inboxTab').click()
break break
case 'settings': case 'settings':
document.getElementById('settingsModal').classList.add('is-active') document.getElementById('settingsModal').classList.add('is-active')
@ -419,7 +420,6 @@ fetch('/friends/list', {
.then(function(resp) { .then(function(resp) {
var friendSelectParent = document.getElementById('friendSelect') var friendSelectParent = document.getElementById('friendSelect')
var keys = []; var keys = [];
var friend
for(var k in resp) keys.push(k); for(var k in resp) keys.push(k);
friendSelectParent.appendChild(document.createElement('option')) friendSelectParent.appendChild(document.createElement('option'))