1
0
mirror of https://gitcode.com/gitea/gitea.git synced 2025-06-10 14:48:14 +08:00
Commit Graph

32 Commits

Author SHA1 Message Date
a8fd76557b Better builtin avatar generator ()
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 
3. Fix a small padding error in the algorithm
2021-11-20 01:10:41 +08:00
8e262104c2 Add Image Diff for SVG files ()
* 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>
2021-06-05 15:32:19 +03:00
1e6fa57acb Use single shared random string generation function ()
* 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: 

* use const string method

* Update modules/avatar/avatar.go

Co-authored-by: a1012112796 <1012112796@qq.com>

Co-authored-by: a1012112796 <1012112796@qq.com>
2021-05-10 07:45:17 +01:00
80a6b0f5bc Avatars and Repo avatars support storing in minio ()
* 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
2020-10-14 21:07:51 +08:00
f7b3e06026 Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) ()
* Update Vendor github.com/nfnt/resize

* switch resize algo NearestNeighbor -> Bilinear
2020-09-06 20:53:33 +01:00
df2557835b Improve handling of non-square avatars ()
* Crop avatar before resizing ()

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>

* Fix spelling error

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
2019-05-25 14:46:14 +03:00
3c87c57d96 golint fixed for modules/avatar 2016-11-25 16:37:04 +08:00
6488ee12be avatar: make custom and generated avatars equal ()
Sets all avatars to use PNG image format.
Keeps avatars consistent at 290x290px resolution.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-07-21 15:31:14 +08:00
d5a3021a7d Make markdown as an independent module 2016-02-20 17:10:05 -05:00
58e004f7da Remove cache avatar support and add its tests 2016-02-14 23:14:55 -05:00
5dc3dd1704 fix 2015-11-16 11:11:59 -05:00
1559bd58e7 save custom avatar as PNG 2015-11-13 16:43:43 -05:00
a205acf829 drop go 1.2 support 2015-09-26 17:54:02 -04:00
384fbeca80 logic fix 2015-08-29 14:44:38 +08:00
5ddcd8420b minor fix 2015-08-29 12:03:40 +08:00
4cfa2ca40d Edit New issue UpdateGravatarSource() assumes insecure protocol 2015-08-28 14:35:08 +08:00
68b9d78386 remove sync.Pool and support go1.2 again 2015-08-09 12:06:08 +08:00
4b43ffc96c Generate random avatar based on e-mail when disable Gravatar 2015-08-09 11:46:10 +08:00
cf59057ef3 fix if service.ENABLE_CACHE_AVATAR is true 2015-01-20 05:20:33 +02:00
39c068400e Fix spelling errors in comments. 2014-12-06 20:22:48 -05:00
adc1ac689e HashEmail function should also remove spaces
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.
2014-12-05 10:58:49 -07:00
55dfe2c978 custom avatar upload 2014-11-21 10:58:08 -05:00
a0f9197b45 GetFile api 2014-11-16 21:32:26 -05:00
c3a52f7dd0 Mirror bug fix on downloading zip 2014-04-15 20:01:20 -04:00
eb6021f73f Fix issue pages URL params 2014-03-27 19:42:10 -04:00
4662a73ac3 name change of avatar 2014-03-26 21:26:31 +08:00
2fa8d0c8dd Added create issue 2014-03-25 12:12:27 -04:00
7048ea4527 update avatar, remove gzip request header 2014-03-25 18:34:57 +08:00
8376b0d53c use modeles/log instead log 2014-03-24 21:16:00 +08:00
964e537479 append route to web 2014-03-23 18:13:23 +08:00
79604f553f fix download part problem, add png support 2014-03-23 15:55:27 +08:00
8e47ae2102 add avatar inorder to view code on github 2014-03-23 12:24:09 +08:00