summaryrefslogtreecommitdiffstats
path: root/modules/avatar/avatar.go
Commit message (Collapse)AuthorAgeFilesLines
* Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551)delvh2022-10-241-3/+3
| | | | | | | | | Found using `find . -type f -name '*.go' -print -exec vim {} -c ':%s/fmt\.Errorf(\(.*\)%v\(.*\)err/fmt.Errorf(\1%w\2err/g' -c ':wq' \;` Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Better builtin avatar generator (#17707)wxiaoguang2021-11-201-17/+4
| | | | | | | This PR fixes the builtin avatar generator. 1. The random background color makes some images very dirty. So now we only use white background for avatars. 2. We use left-right mirror avatars to satisfy #14799 3. Fix a small padding error in the algorithm
* Add Image Diff for SVG files (#14867)KN4CK3R2021-06-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added type sniffer. * Switched content detection from base to typesniffer. * Added GuessContentType to Blob. * Moved image info logic to client. Added support for SVG images in diff. * Restore old blocked svg behaviour. * Added missing image formats. * Execute image diff only when container is visible. * add margin to spinner * improve BIN tag on image diffs * Default to render view. * Show image diff on incomplete diff. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use single shared random string generation function (#15741)silverwind2021-05-101-4/+6
| | | | | | | | | | | | | | | | | | * Use single shared random string generation function - Replace 3 functions that do the same with 1 shared one - Use crypto/rand over math/rand for a stronger RNG - Output only alphanumerical for URL compatibilty Fixes: #15536 * use const string method * Update modules/avatar/avatar.go Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: a1012112796 <1012112796@qq.com>
* Avatars and Repo avatars support storing in minio (#12516)Lunny Xiao2020-10-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avatar support minio * Support repo avatar minio storage * Add missing migration * Fix bug * Fix test * Add test for minio store type on avatars and repo avatars; Add documents * Fix bug * Fix bug * Add back missed avatar link method * refactor codes * Simplify the codes * Code improvements * Fix lint * Fix test mysql * Fix test mysql * Fix test mysql * Fix settings * Fix test * fix test * Fix bug
* Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) (#12745)65432020-09-061-1/+1
| | | | | | * Update Vendor github.com/nfnt/resize * switch resize algo NearestNeighbor -> Bilinear
* Improve handling of non-square avatars (#7025)Rob Watson2019-05-251-0/+50
| | | | | | | | | | * Crop avatar before resizing (#1268) Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com> * Fix spelling error Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
* golint fixed for modules/avatarLunny Xiao2016-11-251-3/+4
|
* avatar: make custom and generated avatars equal (#3301)Dennis Chen2016-07-211-2/+2
| | | | | | Sets all avatars to use PNG image format. Keeps avatars consistent at 290x290px resolution. Signed-off-by: Dennis Chen <barracks510@gmail.com>
* Make markdown as an independent moduleUnknwon2016-02-201-2/+4
|
* Remove cache avatar support and add its testsUnknwon2016-02-141-306/+8
|
* fix #1960Unknwon2015-11-161-2/+2
|
* save custom avatar as PNGUnknwon2015-11-131-1/+3
|
* drop go 1.2 supportUnknwon2015-09-261-1/+1
|
* #1474 logic fixUnknwon2015-08-291-1/+1
|
* #1474 minor fixUnknwon2015-08-291-3/+4
|
* #1474 Edit New issue UpdateGravatarSource() assumes insecure protocolUnknwon2015-08-281-2/+3
|
* remove sync.Pool and support go1.2 againUnknwon2015-08-091-1/+1
|
* Generate random avatar based on e-mail when disable GravatarUnknwon2015-08-091-0/+24
|
* fix if service.ENABLE_CACHE_AVATAR is trueVitaliy Vasilenko2015-01-201-1/+5
|
* Fix spelling errors in comments.Joseph Crail2014-12-061-1/+1
|
* HashEmail function should also remove spacesAndrew Burns2014-12-051-1/+5
| | | | According to the [Gravatar API](https://en.gravatar.com/site/implement/hash/) whitespace should also be removed from the email, it was not doing this previously.
* custom avatar uploadUnknwon2014-11-211-1/+1
|
* GetFile apiUnknwon2014-11-161-5/+11
|
* Mirror bug fix on downloading zipUnknown2014-04-151-2/+3
|
* Fix issue pages URL paramsUnknown2014-03-271-10/+9
|
* name change of avatarskyblue2014-03-261-7/+7
|
* Added create issueUnknown2014-03-251-1/+2
|
* update avatar, remove gzip request headerskyblue2014-03-251-2/+2
|
* use modeles/log instead logshxsun2014-03-241-15/+13
|
* append route to webGogs2014-03-231-53/+70
|
* fix download part problem, add png supportskyblue2014-03-231-17/+162
|
* add avatar inorder to view code on githubskyblue2014-03-231-0/+136