gitea/templates/repo
wxiaoguang f0ba87fda8
Avatar refactor, move avatar code from models to models.avatars, remove duplicated code (#17123)
Why this refactor

The goal is to move most files from `models` package to `models.xxx` package. Many models depend on avatar model, so just move this first.

And the existing logic is not clear, there are too many function like `AvatarLink`, `RelAvatarLink`, `SizedRelAvatarLink`, `SizedAvatarLink`, `MakeFinalAvatarURL`, `HashedAvatarLink`, etc. This refactor make everything clear:

* user.AvatarLink()
* user.AvatarLinkWithSize(size)
* avatars.GenerateEmailAvatarFastLink(email, size)
* avatars.GenerateEmailAvatarFinalLink(email, size)

And many duplicated code are deleted in route handler, the handler and the model share the same avatar logic now.
2021-10-06 01:25:46 +02:00
..
branch
diff Support direct comparison (git diff a..b) as well merge comparison (a...b) (#16635) 2021-09-27 13:19:34 +01:00
editor
graph
issue Avatar refactor, move avatar code from models to models.avatars, remove duplicated code (#17123) 2021-10-06 01:25:46 +02:00
migrate Make mirror feature more configurable (#16957) 2021-09-07 17:49:36 +02:00
projects Kanban colored boards (#16647) 2021-09-29 22:53:12 +02:00
pulls
release
settings Kanban colored boards (#16647) 2021-09-29 22:53:12 +02:00
wiki
activity.tmpl
blame.tmpl
branch_dropdown.tmpl
clone_buttons.tmpl
commit_page.tmpl
commit_status.tmpl
commit_statuses.tmpl
commits_list_small.tmpl
commits_list.tmpl
commits_table.tmpl
commits.tmpl
create.tmpl fixed create repo page layout (#17012) 2021-09-12 20:24:57 +02:00
empty.tmpl
forks.tmpl Direct avatar rendering (#13649) 2020-12-03 19:46:11 +01:00
graph.tmpl Kanban colored boards (#16647) 2021-09-29 22:53:12 +02:00
header.tmpl
home.tmpl
icon.tmpl
search.tmpl Issue sidebar and misc css fixes (#15524) 2021-05-16 22:18:18 +02:00
shabox_badge.tmpl
sub_menu.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl Add option to copy line permalink (#17145) 2021-10-02 10:46:43 +03:00
view_list.tmpl
watchers.tmpl