mirror of
https://github.com/Kyren223/eko.git
synced 2026-07-17 00:51:39 +00:00
Limit chars of username client side to avoid getting an error from the
server
This commit is contained in:
@@ -76,7 +76,7 @@ func New() Model {
|
||||
name.FocusedTextStyle = focusedTextStyle
|
||||
name.BlurredTextStyle = blurredTextStyle
|
||||
name.ErrorStyle = lipgloss.NewStyle().Foreground(colors.Error)
|
||||
name.Input.CharLimit = width
|
||||
name.Input.CharLimit = packet.MaxUsernameBytes
|
||||
name.Focus()
|
||||
name.Input.Validate = func(s string) error {
|
||||
if strings.TrimSpace(s) == "" {
|
||||
|
||||
Reference in New Issue
Block a user