~dricottone/blog

ref: 51d69278defae2345fa9871ddf6edf91f9a1d3dd blog/static/js/chat.js -rw-r--r-- 7.8 KiB
Chat fixes

Input fields now clear on reload of the web page.

Empty messages now can't be sent. Need to create some UI indicator of
the error, but for now the error is logged to the console at least.
UI Changes

The chat shortcode has been reworked. Rather than appearing as
paragraphs, the UI elements have been sorted into tabs that are hidden
by default and toggled by buttons.

IDs have been added+changed to accomodate this.

Button and input styling have been abstracted slightly. I am considering
moving these styles further out, to my blog CSS.
Styling chat bubbles

CSS for 'own' and 'other' chat bubbles. This is managed with some clever
positioning and rotation of borders. Colors and sizes are all TBD.

Minor tweaks to the JS to enable this. The message is now returned from
decrypt/verify functions as an object, where message.message contains
the content (which formerly was the entire return value) and
message.trust contains the MessageAuthenticated enum value.

I likely will add further styling for messages that could not be
decrypted, and for messages where the signature could not be verified.
Chat identity

The chat app now uses digital signatures for identify verification.

A new blog post discusses this implementation and what I've learned
about PGP and digital signature cryptography.

Also, minor typo fixes and adding an aspell recipe.
Simple HTML sanitization
Adding live chat page