mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Add appearance section in settings (#17433)
* Add appearance section in settings * Fix lint * Fix lint * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		@@ -240,7 +240,6 @@ type UpdateProfileForm struct {
 | 
			
		||||
	KeepEmailPrivate    bool
 | 
			
		||||
	Website             string `binding:"ValidSiteUrl;MaxSize(255)"`
 | 
			
		||||
	Location            string `binding:"MaxSize(50)"`
 | 
			
		||||
	Language            string
 | 
			
		||||
	Description         string `binding:"MaxSize(255)"`
 | 
			
		||||
	Visibility          structs.VisibleType
 | 
			
		||||
	KeepActivityPrivate bool
 | 
			
		||||
@@ -252,6 +251,17 @@ func (f *UpdateProfileForm) Validate(req *http.Request, errs binding.Errors) bin
 | 
			
		||||
	return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateLanguageForm form for updating profile
 | 
			
		||||
type UpdateLanguageForm struct {
 | 
			
		||||
	Language string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Validate validates the fields
 | 
			
		||||
func (f *UpdateLanguageForm) Validate(req *http.Request, errs binding.Errors) binding.Errors {
 | 
			
		||||
	ctx := context.GetContext(req)
 | 
			
		||||
	return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Avatar types
 | 
			
		||||
const (
 | 
			
		||||
	AvatarLocal  string = "local"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user