* Added dropdown close functionality when clicking
outside.
Added an event listener to the document that checks if the user clicks
outside the dropdown and closes it if so. This behavior is implemented
using a useRef hook and a mousedown event. The cleanup function is also
added to remove the event listener when the component unmounts.
* Optimized event listener in RoleSelector component
for improved performance.
Updated event listener for RoleSelector component
to only be added when the dropdown is opened and removed
when the dropdown is closed.
* Removed package-lock.json and yarn.lock
* Revert "Removed package-lock.json and yarn.lock"
This reverts commit f9dbf056b6003377d5bcf4f3a731afe7324f000b.
* Remove yarn.lock, package-lock.json from PR
* revert yarn.lock
* optimisation
* change React.useRef to useRef
---------
Co-authored-by: Jing Hua <tohjinghua123@gmail.com>
* adjust new chat button display in chat folder
* Display it at the top instead at the end.
This because chats are order by recently created.
UX issue when clicking to the button at the end,
and have to scroll at the top to see and edit newly created chat.
* Display the button when hovering the folder,
not just the group of chats in the folder.
This make the button to display when hover the folder,
even if there is not yet chats list in the folder.
* parent sibling hover
---------
Co-authored-by: Jing Hua <tohjinghua123@gmail.com>
* add feature to create new chat in a given folder
This to not have to drag and drop a chat each time in a folder
* change style
* fix margin
* style: folder gradient
* style
---------
Co-authored-by: Jing Hua <59118459+ztjhz@users.noreply.github.com>
save and submit the edited message when ctrl and shift key been pressed simultaneously.
Co-authored-by: Jing Hua <59118459+ztjhz@users.noreply.github.com>