Skip to content

Improve avatar uploading / resizing / compressing, remove Fomantic card module #24653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
May 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7b679b3
fix
wxiaoguang May 11, 2023
8f3a71c
support webp animation
wxiaoguang May 11, 2023
d40c7e6
improve webp detection
wxiaoguang May 11, 2023
4702918
fix
wxiaoguang May 11, 2023
34868ce
Update modules/avatar/avatar.go
wxiaoguang May 11, 2023
90f6e2e
remove unnecessary setting access
wxiaoguang May 11, 2023
ef79c9c
refactor
wxiaoguang May 11, 2023
ceeee5a
fine tune
wxiaoguang May 11, 2023
ab70def
improve comment
wxiaoguang May 11, 2023
d6e10c5
fix comment typo
wxiaoguang May 11, 2023
0bfed61
Apply suggestions from code review
wxiaoguang May 12, 2023
865f18e
Update docs/content/doc/administration/config-cheat-sheet.en-us.md
wxiaoguang May 12, 2023
9c2eb7a
fix typo in comment
wxiaoguang May 12, 2023
b79d492
double default AVATAR_MAX_FILE_SIZE to 2MiB
silverwind May 12, 2023
85e3fb1
double AVATAR_MAX_ORIGIN_SIZE to 256KiB
silverwind May 12, 2023
ceb44e5
reduce AVATAR_RENDERED_SIZE_FACTOR to 2
silverwind May 12, 2023
60410f9
increase AVATAR_MAX_HEIGHT to 4096
silverwind May 12, 2023
1ac0d77
take into account setting.Avatar.RenderedSizeFactor when scaling, red…
silverwind May 12, 2023
c3ac10f
revert AVATAR_MAX_FILE_SIZE to 1MiB
silverwind May 12, 2023
c32812f
update comment
silverwind May 12, 2023
b916c2a
make fmt
silverwind May 12, 2023
eb3037d
replace number in test
silverwind May 12, 2023
2b8133c
Update templates/user/profile.tmpl
wxiaoguang May 13, 2023
f80f89e
fix failed tests
wxiaoguang May 13, 2023
52fb4db
remove fomantic card module and extract all needed styles, fix avatar…
silverwind May 13, 2023
68047ce
add comment
silverwind May 13, 2023
5288391
avatar page fixes
silverwind May 13, 2023
7941519
more fixes, migrate is now pixel-identical
silverwind May 13, 2023
04c5fde
move card styles to own file
silverwind May 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update templates/user/profile.tmpl
  • Loading branch information
wxiaoguang authored and silverwind committed May 13, 2023
commit 2b8133c187e0e9fb709a57df306904256e1dd90c
1 change: 1 addition & 0 deletions templates/user/profile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<div id="profile-avatar" class="content gt-df">
{{if eq .SignedUserID .ContextUser.ID}}
<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{.locale.Tr "user.change_avatar"}}">
{{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}}
{{avatar $.Context .ContextUser 256}}
</a>
{{else}}
Expand Down