From 72b5921b7e5044ee306261289482126476ba5ecf Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 10 Dec 2021 10:32:37 -0500 Subject: [PATCH] Don't use \r\n with ctdl_printf() because it adds a \n on its own. Only add \r when CRLF is needed. Also some UI tweaks. --- webcit-ng/messages.c | 7 ++++--- webcit-ng/static/css/webcit.css | 12 ++++++++---- webcit-ng/static/index.html | 14 ++++++-------- webcit-ng/static/js/view_forum.js | 4 ++-- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/webcit-ng/messages.c b/webcit-ng/messages.c index adc4260ad..ed88c9970 100644 --- a/webcit-ng/messages.c +++ b/webcit-ng/messages.c @@ -157,12 +157,13 @@ void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *eu return; } + // Remember, ctdl_printf() appends \n on its own, so we only need \r here. content_type = header_val(h, "Content-type"); - ctdl_printf(c, "Content-type: %s\r\n", (content_type ? content_type : "application/octet-stream")); - ctdl_printf(c, "\r\n"); + ctdl_printf(c, "Content-type: %s\r", (content_type ? content_type : "application/octet-stream")); + ctdl_printf(c, "\r"); ctdl_write(c, h->request_body, h->request_body_length); if (h->request_body[h->request_body_length] != '\n') { - ctdl_printf(c, "\r\n"); + ctdl_printf(c, "\r"); } ctdl_printf(c, "000"); diff --git a/webcit-ng/static/css/webcit.css b/webcit-ng/static/css/webcit.css index a692e7750..93b082d3e 100644 --- a/webcit-ng/static/css/webcit.css +++ b/webcit-ng/static/css/webcit.css @@ -9,15 +9,19 @@ html,body,h1,h2,h3,h4,h5 { } .ctdl-msg-reading-pane { - background-color: #123456; + background-color: #456789; } .ctdl-msg-wrapper { overflow: hidden; - border-radius: 25px; + border-radius: 10px; background-color: white; - margin: 8px; - padding: 4px; /* inside the box */ + margin: 1vw; + padding: 5px; /* inside the box */ +} + +.ctdl-msg-reply { + margin-left: 5vw; } .ctdl-msg-header { diff --git a/webcit-ng/static/index.html b/webcit-ng/static/index.html index d25dc4cad..741805247 100644 --- a/webcit-ng/static/index.html +++ b/webcit-ng/static/index.html @@ -52,15 +52,13 @@
Close Menu - Rooms + Mail
rooms go here
- Users - Bombs - Missiles - Tards - News - General - History + Forums + Calendar + Contacts + Blogs + Wikis Settings

diff --git a/webcit-ng/static/js/view_forum.js b/webcit-ng/static/js/view_forum.js index 94bd03121..53c12969e 100644 --- a/webcit-ng/static/js/view_forum.js +++ b/webcit-ng/static/js/view_forum.js @@ -194,7 +194,7 @@ function open_reply_box(prefix, msgnum, is_quoted) { // FIXME - we need to retain the message number being replied to replybox = - "
" // begin message wrapper + "
" // begin message wrapper + "
" // begin avatar + "" @@ -349,7 +349,7 @@ function forum_save_message(div_name, reply_to_msgnum) { if (error_message.length == 0) { error_message = _("An error has occurred."); } - alert(error_message); // FIXME make this pretty + alert(error_message); } } }; -- 2.30.2