diff options
author | Mario Lubenka <mario.lubenka@googlemail.com> | 2019-06-02 08:40:12 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-06-02 14:40:12 +0800 |
commit | 8eba27c79257c6bc68cefbdffbb36d3596e6d3ee (patch) | |
tree | 3a79fd7a5beb49d212d82bf61df7d8cd9bf1a613 /routers/admin/admin.go | |
parent | 356854fc5f8d7d1a7e4d68c9e00929e9ce8aa867 (diff) | |
download | gitea-8eba27c79257c6bc68cefbdffbb36d3596e6d3ee.tar.gz gitea-8eba27c79257c6bc68cefbdffbb36d3596e6d3ee.zip |
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>
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r-- | routers/admin/admin.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 0e6fa2c242..5107e18b7d 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -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 { |