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:
parent
356854fc5f
commit
8eba27c792
9 changed files with 105 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue