John Olheiser
875eedbaef
Go 1.19 format ( #20758 )
...
* 1.19 gofumpt
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Change CSV test
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* Commit whitespace fixes from @zeripath
Co-authored-by: zeripath <art27@cantab.net >
* Update emoji
Signed-off-by: jolheiser <john.olheiser@gmail.com >
* bump swagger & fix generate-swagger
Signed-off-by: jolheiser <john.olheiser@gmail.com >
Co-authored-by: zeripath <art27@cantab.net >
Co-authored-by: 6543 <6543@obermui.de >
Co-authored-by: Lauris BH <lauris@nix.lv >
2022-08-30 21:15:45 -05:00
wxiaoguang
6306826631
Remove legacy +build: constraint ( #19582 )
...
Go 1.17 and later use modern `//go:build` constraints, the old `// +build:` constraints should be removed.
2022-05-02 23:22:45 +08:00
6543
e0a2bd79c9
format with gofumpt ( #18184 )
...
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
2022-01-20 18:46:10 +01:00
luzpaz
e1836ee81f
Fix various typos ( #18219 )
...
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-01-10 17:32:37 +08:00
Gusted
95c8f0ccf4
Simplify parameter types ( #18006 )
...
Remove repeated type declarations in function definitions.
2021-12-20 04:41:31 +00:00
techknowlogick
f6bb2872fc
Add user settings key/value DB table ( #16834 )
2021-11-22 04:47:23 -05:00
wxiaoguang
3190a2c234
Better builtin avatar generator ( #17707 )
...
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
2021-11-20 01:10:41 +08:00
Eng Zer Jun
feb2abec7f
refactor: move from io/ioutil to io and os package ( #17109 )
...
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil . This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.io >
2021-09-22 13:38:34 +08:00
KN4CK3R
be7ef050aa
Add Image Diff for SVG files ( #14867 )
...
* 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
silverwind
8b973146bc
Use single shared random string generation function ( #15741 )
...
* 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 >
2021-05-10 07:45:17 +01:00
Lunny Xiao
572bb2adc2
Avatars and Repo avatars support storing in minio ( #12516 )
...
* 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
6543
5347f92f8f
Fix Avatar Resize (resize algo NearestNeighbor -> Bilinear) ( #12745 )
...
* Update Vendor github.com/nfnt/resize
* switch resize algo NearestNeighbor -> Bilinear
2020-09-06 20:53:33 +01:00
Rob Watson
1d7a0f2179
Improve handling of non-square avatars ( #7025 )
...
* 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 >
2019-05-25 14:46:14 +03:00
Ethan Koenig
8ec023cb81
Use assert in legacy unit tests ( #867 )
2017-02-08 14:29:07 +08:00
Lunny Xiao
795095ff2a
golint fixed for modules/avatar
2016-11-25 16:37:04 +08:00
Dennis Chen
ade2b40c6b
avatar: make custom and generated avatars equal ( #3301 )
...
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
Unknwon
69f420490d
Make markdown as an independent module
2016-02-20 17:10:05 -05:00
Unknwon
354dd25700
Remove cache avatar support and add its tests
2016-02-14 23:14:55 -05:00
Unknwon
05cf023b6a
fix #1960
2015-11-16 11:11:59 -05:00
Unknwon
3d46157c3c
save custom avatar as PNG
2015-11-13 16:43:43 -05:00
Unknwon
74cf48cf9a
drop go 1.2 support
2015-09-26 17:54:02 -04:00
Unknwon
c9daeb0f57
#1474 logic fix
2015-08-29 14:44:38 +08:00
Unknwon
0f565c5e5e
#1474 minor fix
2015-08-29 12:03:40 +08:00
Unknwon
0cb00beef6
#1474 Edit New issue UpdateGravatarSource() assumes insecure protocol
2015-08-28 14:35:08 +08:00
Unknwon
2b48435128
remove sync.Pool and support go1.2 again
2015-08-09 12:06:08 +08:00
Unknwon
74a535b53d
Generate random avatar based on e-mail when disable Gravatar
2015-08-09 11:46:10 +08:00
Vitaliy Vasilenko
cf59057ef3
fix if service.ENABLE_CACHE_AVATAR is true
2015-01-20 05:20:33 +02:00
Joseph Crail
39c068400e
Fix spelling errors in comments.
2014-12-06 20:22:48 -05:00
Andrew Burns
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
Unknwon
55dfe2c978
custom avatar upload
2014-11-21 10:58:08 -05:00
Unknwon
a0f9197b45
GetFile api
2014-11-16 21:32:26 -05:00
Unknown
c3a52f7dd0
Mirror bug fix on downloading zip
2014-04-15 20:01:20 -04:00
Unknown
eb6021f73f
Fix issue pages URL params
2014-03-27 19:42:10 -04:00
skyblue
4662a73ac3
name change of avatar
2014-03-26 21:26:31 +08:00
Unknown
2fa8d0c8dd
Added create issue
2014-03-25 12:12:27 -04:00
skyblue
7048ea4527
update avatar, remove gzip request header
2014-03-25 18:34:57 +08:00
shxsun
8376b0d53c
use modeles/log instead log
2014-03-24 21:16:00 +08:00
Gogs
964e537479
append route to web
2014-03-23 18:13:23 +08:00
skyblue
79604f553f
fix download part problem, add png support
2014-03-23 15:55:27 +08:00
skyblue
8e47ae2102
add avatar inorder to view code on github
2014-03-23 12:24:09 +08:00