Chat name & color modal (#2347)

* Improve name & color change modal design

* Resend user info after color change

That way the name change dialog shows the correct
color when opening it the next time

* Name change modal: allow overflow of color picker

* Allow submitting form only if button is enabled

* Prettified Code!

* Make button & text input same height

Co-authored-by: xarantolus <xarantolus@users.noreply.github.com>
This commit is contained in:
Philipp
2022-11-23 19:52:39 +01:00
committed by GitHub
parent 7393a18546
commit 56a3f350ee
4 changed files with 35 additions and 23 deletions

View File

@@ -114,6 +114,10 @@ func (s *Server) userColorChanged(eventData chatClientEvent) {
if err := user.ChangeUserColor(eventData.client.User.ID, receivedEvent.NewColor); err != nil {
log.Errorln("error changing user display color", err)
}
// Resend client's user info with new color, otherwise the name change dialog would still show the old color
eventData.client.User.DisplayColor = receivedEvent.NewColor
eventData.client.sendConnectedClientInfo()
}
func (s *Server) userMessageSent(eventData chatClientEvent) {