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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user