Commit Graph

12 Commits

Author SHA1 Message Date
Saptak S
00cd37bfd3
Adds check whether username already exists 2020-08-21 17:46:21 +05:30
Micah Lee
dc15883080
Remove new message and change username buttons (user just presses enter instead) and update a bunch of css 2020-08-19 20:22:15 -04:00
Micah Lee
9482461a00
Split chat messages into username and message, and change UI for displaying messages 2020-08-19 19:40:00 -04:00
Saptak S
992ced72f6
Adds noscript HTML 2020-07-04 19:25:38 +05:30
Saptak S
08f891f4f6
Show in UX that there's a disconnect 2020-06-07 15:56:05 +05:30
Saptak S
afc6a2f4ce
Update username via both socket and ajax
- socket takes care of modifying the username in the forked socket
session and sending a status message to chat window
- ajax request takes care of updating the flask session so that on
refresh or re-opening of the URL in same browser, the username remains
same
2020-05-11 12:51:46 +05:30
Saptak S
409f3f7fbe
Keep save button disabled if changed username invalid
- Disabled till username not changed
- On change, if username is empty, then disabled
- On change, if username is changed back to previous, then disabled
- Else allow saving
2020-05-10 01:55:31 +05:30
Saptak S
89b112ea95
Refactors logic for chat user list and scroll
- Refactors server side code to use instance variable instead of
background thread to generate a list of connected users
- Send this user list anytime any change is made to the list. It can
be: join, update username, disconnect
- In js, render the entire user list everytime it is received.
- Scroll to the bottom of the chat, everytime the current user
sends a message
- Else, if already at the bottom of the chat, scroll to the bottom
after appending incoming status or chat message. But if the user
is scrolled up in the chat window, then do not scroll to the bottom
- When refreshed or close tab is clicked, default browser warning is
shown.
- On receiving disconnect, the browser removes user from room.
- If refreshed, it is shown as if the user left and joined again.
2020-05-04 03:47:13 +05:30
Saptak S
c63a7605ee
Adds list of active users in the chat and allows username change
- allows users to update their username and save the new username
- runs a background thread for every user session which emits a
broadcast with the username so every user can build their list of
active users in the frontend via the socket information
- on updating username, stop the old thread and start a new thread
with the new username being emitted. The username is updated in
everyone's list along with a status message for the same.
2020-03-12 14:54:48 +05:30
Saptak S
7eaefd5299
Sanitize message before appending them to the HTML 2020-03-11 18:10:08 +05:30
Saptak S
819e406d46
Create GUI for onionshare chat mode with the tab workflow 2020-03-09 17:44:00 +05:30
Saptak S
2c938fd777
Create web UI and socket code for the chat interface 2020-03-08 14:51:43 +05:30