From 52c7ba860d96c31fedb5c2075a5f781bfa756fac Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 9 Jul 2019 22:17:56 -0500 Subject: [PATCH] fixed mail UI for redesign --- onionr/static-data/www/mail/index.html | 99 +++++++++++++------------- onionr/static-data/www/mail/mail.js | 9 ++- onionr/static-data/www/shared/mail.css | 32 +++++++++ 3 files changed, 85 insertions(+), 55 deletions(-) create mode 100644 onionr/static-data/www/shared/mail.css diff --git a/onionr/static-data/www/mail/index.html b/onionr/static-data/www/mail/index.html index 73bb0a66..2202b709 100755 --- a/onionr/static-data/www/mail/index.html +++ b/onionr/static-data/www/mail/index.html @@ -11,6 +11,7 @@ + @@ -50,7 +51,7 @@ Mail

- Send email style messages to persons + Send email style messages

@@ -81,7 +82,45 @@
- +
+
+ +
+ From: Signature: +
+
+ Subject: +
+
+ +
+
+
+
+
+
+
+
+ + To: +
+
+
+
+
+
+ +
+ + To: + Subject: + + +
+
+
@@ -103,58 +142,18 @@
+
+
+ API server either shutdown, has disabled mail, or has experienced a bug. +
+
+
Nothing here yet 😞
+
+
-
-
-
- API server either shutdown, has disabled mail, or has experienced a bug. -
-
-
Nothing here yet 😞
-
-
-
- -
- From: Signature: -
-
- Subject: -
-
- -
-
-
-
-
-
-
-
- - To: -
-
-
-
-
-
- -
- - To: - Subject: - - -
-
-
-
diff --git a/onionr/static-data/www/mail/mail.js b/onionr/static-data/www/mail/mail.js index 3a6dcaf4..cd14739f 100755 --- a/onionr/static-data/www/mail/mail.js +++ b/onionr/static-data/www/mail/mail.js @@ -182,7 +182,7 @@ function loadInboxEntries(bHash){ } entry.setAttribute('data-nameSet', true) if (senderInput.value == ''){ - senderInput.value = resp['meta']['signer'] + senderInput.value = resp['meta']['signer'] || 'Anonymous' entry.setAttribute('data-nameSet', false) } bHashDisplay.innerText = bHash.substring(0, 10) @@ -190,8 +190,7 @@ function loadInboxEntries(bHash){ entry.setAttribute('data-pubkey', resp['meta']['signer']) senderInput.readOnly = true dateStr.innerText = humanDate.substring(0, humanDate.indexOf('(')) - deleteBtn.innerText = 'X' - deleteBtn.classList.add('dangerBtn', 'deleteBtn') + deleteBtn.classList.add('delete', 'deleteBtn') if (metadata['subject'] === undefined || metadata['subject'] === null) { subjectLine.innerText = '()' } @@ -268,8 +267,7 @@ function getSentbox(){ var preview = document.createElement('span') var deleteBtn = document.createElement('button') var message = resp[i]['message'] - deleteBtn.classList.add('deleteBtn', 'dangerBtn') - deleteBtn.innerText = 'X' + deleteBtn.classList.add('deleteBtn', 'delete') toEl.readOnly = true sentDate.innerText = humanDate.substring(0, humanDate.indexOf('(')) if (resp[i]['name'] == null || resp[i]['name'].toLowerCase() == 'anonymous'){ @@ -279,6 +277,7 @@ function getSentbox(){ toEl.value = resp[i]['name'] } preview.innerText = '(' + resp[i]['subject'] + ')' + entry.classList.add('sentboxList') entry.setAttribute('data-hash', resp[i]['hash']) entry.appendChild(deleteBtn) entry.appendChild(toLabel) diff --git a/onionr/static-data/www/shared/mail.css b/onionr/static-data/www/shared/mail.css new file mode 100644 index 00000000..5e9de2f6 --- /dev/null +++ b/onionr/static-data/www/shared/mail.css @@ -0,0 +1,32 @@ +.threadEntry{ + margin-bottom: 2%; +} +.threadEntry button{ + margin-right: 1%; +} +.threadEntry span, .sentboxList span{ + padding-left: 1%; +} + +.overlayContent{ + background-color: lightgray; + border: 3px solid black; + border-radius: 3px; + color: black; + font-family: Verdana, Geneva, Tahoma, sans-serif; + min-height: 100%; + padding: 1em; + margin: 1em; +} + +#draftText{ + margin-top: 1em; + margin-bottom: 1em; + display: block; + width: 50%; + height: 75%; + min-width: 2%; + min-height: 5%; + background: white; + color: black; +} \ No newline at end of file