From: Art Cancro Date: Thu, 8 Sep 2022 23:14:11 +0000 (-0400) Subject: mailbox temporary style X-Git-Tag: v958~26 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=3dc7813179b91b3f8baf2a1c884c55efd18310d0;p=citadel.git mailbox temporary style --- diff --git a/webcit-ng/static/css/webcit.css b/webcit-ng/static/css/webcit.css index 4c5dd876d..5796c69ac 100644 --- a/webcit-ng/static/css/webcit.css +++ b/webcit-ng/static/css/webcit.css @@ -12,12 +12,12 @@ .ctdl-grid-banner-item { /* These grid items will be referenced in the grid container */ grid-area: header; - background-color: #282a35; + background-color: DarkSlateGrey; } .ctdl-grid-navbar-item { grid-area: menu; - background-color: ghostwhite; + background-color: GhostWhite; } .ctdl-grid-main-item { @@ -34,8 +34,8 @@ 'header header' 'menu main'; gap: 3px; - background-color: #456789; /* This is the color of the lines between the boxes, and also the boxes themselves if not overridden */ - padding: 0; /* This is the border around the edges of the screen */ + background-color: DarkSlateGrey; /* This is the color of the lines between the boxes, and also the boxes themselves if not overridden */ + padding: 0; /* This is the border around the edges of the screen */ width: 100vw; height: 100vh; } @@ -49,17 +49,17 @@ float: left; display: block; padding: 8px; - background-color: #282a35; - color: white; + background-color: DarkSlateGrey; + color: White; font-size: 1.25vw; } .ctdl-banner-buttons li:hover { /* Buttons that appear in the top banner also reference this class when hovered over */ - background-color: black; + background-color: Black; } .ctdl-banner-buttons a { - color: white; + color: White; } html,body,h1,h2,h3,h4,h5 { @@ -75,7 +75,7 @@ html,body,h1,h2,h3,h4,h5 { transform: translate(-50%, -50%); border-style: outset; border-width: 3px; - border-color: black; + border-color: Black; justify-content: center; align-items: center; padding: 10px; @@ -101,13 +101,13 @@ html,body,h1,h2,h3,h4,h5 { padding: 10px; text-align: left; border-color: GhostWhite; - background-color: #GhostWhite;; + background-color: GhostWhite; color: #000000; font-size: 1vw; } .ctdl-sidebar-class button:hover { - background-color: #ffffff; + background-color: White; } .ctdl-grid-banner-item button { @@ -122,14 +122,14 @@ html,body,h1,h2,h3,h4,h5 { .ctdl-fmsg-wrapper { /* message wrapper for forum view */ overflow: hidden; border-radius: 10px; - background-color: white; + background-color: White; margin: 1vw; padding: 5px; /* inside the box */ } .ctdl-mmsg-wrapper { /* message wrapper for mailbox view */ overflow: hidden; - background-color: white; + background-color: White; padding: 5px; /* inside the box */ border-style: solid; /* could also be: dotted, dashed, solid, double, groove, ridge, inset, outset, none, hidden */ border-width: 1px; @@ -158,17 +158,17 @@ html,body,h1,h2,h3,h4,h5 { .ctdl-msg-button { margin-left: 2px; border-radius: 5px; - background-color: blue; - color: black; + background-color: Blue; + color: Black; padding: 2px; background-color: GhostWhite; border-style: solid; border-width: thin; - border-color: black; + border-color: Black; } .ctdl-msg-button a { - color: black; + color: Black; } .ctdl-msg-button:hover { @@ -179,7 +179,7 @@ html,body,h1,h2,h3,h4,h5 { } .ctdl-msg-button a:hover { - color: white; + color: White; } @@ -233,29 +233,29 @@ html,body,h1,h2,h3,h4,h5 { blockquote { background-color: #f5f5f5 !important; - color: navy !important; + color: Navy !important; margin-bottom: 0px; padding-bottom: 0px; } blockquote blockquote { background-color: #ebebeb !important; - color: maroon !important; + color: Maroon !important; } blockquote blockquote blockquote { background-color: #e1e1e1 !important; - color: green !important; + color: Green !important; } blockquote blockquote blockquote blockquote { background-color: #d7d7d7 !important; - color: purple !important; + color: Purple !important; } blockquote blockquote blockquote blockquote blockquote { background-color: #cdcdcd !important; - color: teal !important; + color: Teal !important; } blockquote pre { @@ -285,7 +285,7 @@ blockquote pre { .ctdl-roomlist-room { overflow: hidden; border-radius: 10px; - background-color: white; + background-color: White; padding: 0.5vw; margin-bottom: 0.5vw; width: 100%; @@ -328,6 +328,17 @@ blockquote pre { background-color: #DDDDDD; } +.ctdl-mailbox-table { + width: 100%; + background-color: GhostWhite; + border-collapse: collapse; +} + +.ctdl-mailbox-table tr { + border-top: 1px solid red; + border-bottom: 1px solid red; +} + .ctdl-mailbox-heading { position: sticky; top: 0; @@ -335,6 +346,7 @@ blockquote pre { background-color: #CCCCCC; } + .ctdl-mailbox-reading-pane { /* message reading pane when in mailbox view */ height: 80vw; overflow-x: hidden; diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 9eb32abff..c977edb42 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -116,7 +116,7 @@ function mail_render_row(msg) { + "" + msg["subject"] + "" + "" + msg["author"] + " <" + msg["addr"] + ">" + "" + string_timestamp(msg["time"],1) + "" - + "" + msg["msgnum"] + "" + + "" + msg["msgnum"] + "" + ""; return(row); } @@ -183,12 +183,12 @@ function render_mailbox_display() { msgs = await(response.json()); if (response.ok) { - box = "" - + "" + box = "
" + + "" + "" + "" + "" - + "" + + "" + ""; for (var i=0; issl_handle = SSL_new(ssl_ctx))) { - syslog(LOG_WARNING, "SSL_new failed: %s", - ERR_reason_error_string(ERR_get_error())); - return; - } - if (!(SSL_set_fd(ch->ssl_handle, ch->sock))) { - syslog(LOG_WARNING, "SSL_set_fd failed: %s", - ERR_reason_error_string(ERR_get_error())); - SSL_free(ch->ssl_handle); - return; - } - retval = SSL_accept(ch->ssl_handle); - if (retval < 1) { - syslog(LOG_WARNING, "SSL_accept failed: %s", - ERR_reason_error_string(ERR_get_error())); - } else { - syslog(LOG_INFO, "SSL_accept success"); - } - bits = - SSL_CIPHER_get_bits(SSL_get_current_cipher(ch->ssl_handle), - &alg_bits); - syslog(LOG_INFO, "SSL/TLS using %s on %s (%d of %d bits)", - SSL_CIPHER_get_name(SSL_get_current_cipher(ch->ssl_handle)), - SSL_CIPHER_get_version(SSL_get_current_cipher - (ch->ssl_handle)), bits, alg_bits); - syslog(LOG_INFO, "SSL started"); -} - - -// shuts down the TLS connection -void endtls(struct client_handle *ch) -{ - syslog(LOG_INFO, "Ending SSL/TLS"); - if (ch->ssl_handle != NULL) { - SSL_shutdown(ch->ssl_handle); - SSL_get_SSL_CTX(ch->ssl_handle); - SSL_free(ch->ssl_handle); - } - ch->ssl_handle = NULL; -} - - -// Send binary data to the client encrypted. -int client_write_ssl(struct client_handle *ch, char *buf, int nbytes) -{ - int retval; - int nremain; - char junk[1]; - - if (ch->ssl_handle == NULL) - return (-1); - - nremain = nbytes; - while (nremain > 0) { - if (SSL_want_write(ch->ssl_handle)) { - if ((SSL_read(ch->ssl_handle, junk, 0)) < 1) { - syslog(LOG_WARNING, - "SSL_read in client_write: %s", - ERR_reason_error_string - (ERR_get_error())); - } - } - retval = - SSL_write(ch->ssl_handle, &buf[nbytes - nremain], - nremain); - if (retval < 1) { - long errval; - - errval = SSL_get_error(ch->ssl_handle, retval); - if (errval == SSL_ERROR_WANT_READ - || errval == SSL_ERROR_WANT_WRITE) { - sleep(1); - continue; - } - syslog(LOG_WARNING, "SSL_write: %s", - ERR_reason_error_string(ERR_get_error())); - if (retval == -1) { - syslog(LOG_WARNING, "errno is %d", errno); - endtls(ch); - } - return -1; - } - nremain -= retval; - } - return 0; -} - - -// read data from the encrypted layer -int client_read_ssl(struct client_handle *ch, char *buf, int nbytes) -{ - int bytes_read = 0; - int rlen = 0; - char junk[1]; - - if (ch->ssl_handle == NULL) - return (-1); - - while (bytes_read < nbytes) { - if (SSL_want_read(ch->ssl_handle)) { - if ((SSL_write(ch->ssl_handle, junk, 0)) < 1) { - syslog(LOG_WARNING, - "SSL_write in client_read"); - } - } - rlen = - SSL_read(ch->ssl_handle, &buf[bytes_read], - nbytes - bytes_read); - if (rlen < 1) { - long errval; - errval = SSL_get_error(ch->ssl_handle, rlen); - if (errval == SSL_ERROR_WANT_READ - || errval == SSL_ERROR_WANT_WRITE) { - sleep(1); - continue; - } - syslog(LOG_WARNING, "SSL_read error %ld", errval); - endtls(ch); - return (-1); - } - bytes_read += rlen; - } - return (bytes_read); -}
" + _("Subject") + "" + _("Sender") + "" + _("Date") + "##