Introduced length limits
This commit is contained in:
@ -9,38 +9,13 @@ component SettingsPersonal(user *arn.User)
|
||||
Icon("user")
|
||||
span Personal
|
||||
|
||||
InputText("Nick", user.Nick, "Username", "Your username on notify.moe")
|
||||
InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us a little bit about yourself")
|
||||
InputText("Nick", user.Nick, "Username", "Your username on notify.moe", 25)
|
||||
InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us a little bit about yourself", 2000)
|
||||
|
||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||
h3.widget-title
|
||||
Icon("camera")
|
||||
span Avatar
|
||||
|
||||
//- .widget-section
|
||||
//- label(for="Avatar.Source") Source:
|
||||
//- select.widget-ui-element.action(id="Avatar.Source", data-field="Avatar.Source", value=user.Settings().Avatar.Source, data-action="save", data-trigger="change")
|
||||
//- option(value="") Automatic
|
||||
//- option(value="Gravatar") Gravatar
|
||||
//- option(value="URL") Link
|
||||
//- option(value="FileSystem") Upload
|
||||
|
||||
//- //- URL input
|
||||
//- if user.Settings().Avatar.Source == "URL"
|
||||
//- InputText("Avatar.SourceURL", user.Settings().Avatar.SourceURL, "Link", "Post the link to the image here")
|
||||
|
||||
//- //- Gravatar preview image
|
||||
//- if user.Settings().Avatar.Source == "Gravatar" || (user.Settings().Avatar.Source == "" && user.Avatar.Source == "Gravatar")
|
||||
//- .profile-image-container.avatar-preview
|
||||
//- img.profile-image.mountable(src=user.Gravatar(), alt="Gravatar (" + user.Email + ")", title="Gravatar (" + user.Email + ")")
|
||||
|
||||
//- //- URL preview image
|
||||
//- if user.Settings().Avatar.Source == "URL" && user.Settings().Avatar.SourceURL != ""
|
||||
//- .profile-image-container.avatar-preview
|
||||
//- img.profile-image.mountable(src=strings.Replace(user.Settings().Avatar.SourceURL, "http://", "https://", 1), alt="Avatar preview")
|
||||
|
||||
//- //- File upload
|
||||
//- if user.Settings().Avatar.Source == "FileSystem"
|
||||
|
||||
AvatarInput(user)
|
||||
|
||||
|
Reference in New Issue
Block a user