mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Repository avatar fallback configuration (#7087)
* Only show repository avatar in list when one was selected Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds fallback configuration option for repository avatar Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Implements repository avatar fallback Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds admin task for deleting generated repository avatars Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Solve linting issues Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Save avatar before updating database * Linting * Update models/repo.go Co-Authored-By: zeripath <art27@cantab.net>
This commit is contained in:
		
				
					committed by
					
						 Lunny Xiao
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							356854fc5f
						
					
				
				
					commit
					8eba27c792
				
			| @@ -125,6 +125,7 @@ const ( | ||||
| 	reinitMissingRepository | ||||
| 	syncExternalUsers | ||||
| 	gitFsck | ||||
| 	deleteGeneratedRepositoryAvatars | ||||
| ) | ||||
|  | ||||
| // Dashboard show admin panel dashboard | ||||
| @@ -167,6 +168,9 @@ func Dashboard(ctx *context.Context) { | ||||
| 		case gitFsck: | ||||
| 			success = ctx.Tr("admin.dashboard.git_fsck_started") | ||||
| 			go models.GitFsck() | ||||
| 		case deleteGeneratedRepositoryAvatars: | ||||
| 			success = ctx.Tr("admin.dashboard.delete_generated_repository_avatars_success") | ||||
| 			err = models.RemoveRandomAvatars() | ||||
| 		} | ||||
|  | ||||
| 		if err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user