Art Cancro [Fri, 3 Nov 2023 04:13:46 +0000 (19:13 -0900)]
json.c: encode JSON strings the correct way (RFC 7159 section 7).
The previous code used the JavaScript encoder from the stringbuf library, which
is *not* the same encoding. Now it doesn't make the browser's parser barf when
it encounters a control character.
Art Cancro [Fri, 3 Nov 2023 02:42:28 +0000 (17:42 -0900)]
War on old style continues.
I really ought to be writing some real code tonight. But I get into a file and I see
old style and I want to make it clean and shiny and it's easier than the kind of heavy
brain work I should be doing. When faced with a heavy think, I dawdle for a long time
before I really get started. I've done this since I was a child.
Art Cancro [Mon, 30 Oct 2023 18:05:20 +0000 (09:05 -0900)]
stringbuf.c: chipped away at style modernization
This is a big one with a lot of outdated style in it.
Folded lines which were >80 columns but <132 columns.
Add {} braces to single-line conditional blocks.
Replaced C89 comments with C99 comments.
Art Cancro [Mon, 16 Oct 2023 19:53:17 +0000 (19:53 +0000)]
loadtest: counter position is now derived from thread id, not socket number.
This is what I was actually trying to accomplish a couple of commits ago. I made
a race condition and that's why it was malfunctioning. This way is better and it
works. It also once shot a man in Reno just to watch him die.
Art Cancro [Tue, 26 Sep 2023 04:13:35 +0000 (00:13 -0400)]
view_mail.js: throbber and "Processing dropped files..." message appears
"Processing dropped files..." is not exactly the right message because
the upload message might have been clicked, but I don't want to throw
away the translations of that message.
Anyway, it's really cool, they appear in the list, and go away when the
uploads are complete.
Art Cancro [Tue, 26 Sep 2023 03:35:17 +0000 (23:35 -0400)]
Simplify the upload dialog.
Reduce the number of divs and make it more generic. Allow the upload dialog to
be attached to any parent div. Make the dialog appear automatically when a file
is dragged into the parent div.
Art Cancro [Tue, 26 Sep 2023 02:44:10 +0000 (22:44 -0400)]
view_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload
Uploads now have their own div in their own separate modal.
This is, of course, because I am trying to loosely couple the uploader so
that it can be attached to other parts of the system when needed.
Also I realized that my div names are ctdl-not ctdl_consistent with each other.
Trying to fix that.
Art Cancro [Tue, 19 Sep 2023 20:26:13 +0000 (16:26 -0400)]
Attachments now download with the appropriate filename.
This was accomplished by disregarding any REST components to the right of
the part number, allowing the filename to be placed there. The filename is
sanitized to prevent script injection.
Art Cancro [Tue, 19 Sep 2023 20:02:38 +0000 (16:02 -0400)]
view_mail.js: better display of attachment links; attachments are now working
Displaying each one as a link definitely makes it stand out from the message text.
Display the size of each attachment -- _(bytes) is already in the webcit-classic translations
Downloads are working, but the wrong file name is derived
Art Cancro [Tue, 5 Sep 2023 22:09:38 +0000 (18:09 -0400)]
textclient: don't prompt to change internet email addresses when deleting a user
The 'edit user' and 'delete user' workflows run through the same function since
the process of deleting a user simply edits them and changes their access level
to 0. Add a check for cmd==25 (edit user) before asking the user if they want
to change the email addresses.
Art Cancro [Tue, 5 Sep 2023 03:59:44 +0000 (23:59 -0400)]
Omit the warning about session scheduled for termination but not idle.
Something about this warning makes it reference a bad pointer and crash
during periods of extremely high load. I don't know why, but just leaving
it alone seems to fix the problem.