This is a merge of several updates from me as rebasing / merging each one was going to be a pain after all the css changes.
There is a slight modification to the login process on top of what Chris already changed.
MainLayout initialises AppState and that retrieves the apikey.
MainLayout listens for GotApiKey and attempts a login (actually this is just fetching the user object)
ChatRoomList listens for GotChatUser and fetches the rooms - then starts a timed refresh of the rooms.
Room listens for GotChatRooms and only loads the requested room when the chat room list is loaded
Index is purely for displaying the User, or requesting their API token and storing it in the AppState - it does not handle any logging in or fetching of rooms.
New features are:
Timeout - if the user is inactive for (currently 60 minutes) a period - stop updating the Room messages and display Paused...to save data when we go mobile. Not entirely new - but re-added.
Mark messages as read - mouse out of a message will mark it as read after 1 second. Fixes #6
If the message list is scrolled to the very bottom, new messages will automatically scroll into view, otherwise they will not. Fixes #19
The room list updates every 10 seconds so the Unread messsage counts are dynamic. Fixes #20
I will add specific message inline to the diff if anything needs clarifying.
This is a merge of several updates from me as rebasing / merging each one was going to be a pain after all the css changes.
There is a slight modification to the login process on top of what Chris already changed.
MainLayout initialises AppState and that retrieves the apikey. MainLayout listens for GotApiKey and attempts a login (actually this is just fetching the user object)
ChatRoomList listens for GotChatUser and fetches the rooms - then starts a timed refresh of the rooms.
Room listens for GotChatRooms and only loads the requested room when the chat room list is loaded
Index is purely for displaying the User, or requesting their API token and storing it in the AppState - it does not handle any logging in or fetching of rooms.
New features are:
I will add specific message inline to the diff if anything needs clarifying.