You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules
Sandro Santilli 90dd0657b5 Add support for federated avatars (#3320)
* Add support for federated avatars

Fixes #3105

Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)

Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive

Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading

* Run gofmt on all modified files

* Move Avatar form in its own page

* Add go-libravatar dependency to vendor/ dir

Hopefully helps with accepting the contribution.
See also #3214

* Revert "Add go-libravatar dependency to vendor/ dir"

This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.

* Make federated avatar setting a global configuration

Removes the per-user setting

* Move avatar handling back to base tool, disable federated avatar in offline mode

* Format, handle error

* Properly set fallback host

* Use unsupported github.com mirror for importing go-libravatar

* Remove comment showing life exists outside of github.com

... pity, but contribution would not be accepted otherwise

* Use Combo for Get and Post methods over /avatar

* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR

* Fix persistance of federated avatar lookup checkbox at install time

* Federated Avatars -> Enable Federated Avatars

* Use len(string) == 0 instead of string == ""

* Move import line where it belong

See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md

Pity the import url is still the unofficial one, but oh well...

* Save a line (and waste much more expensive time)

* Remove redundant parens

* Remove an empty line

* Remove empty lines

* Reorder lines to make diff smaller

* Remove another newline

Unknwon review got me start a fight against newlines

* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE

On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106

* Remove newlines that weren't there before my intervention
8 years ago
..
auth Add support for federated avatars (#3320) 8 years ago
avatar avatar: make custom and generated avatars equal (#3301) 8 years ago
base Add support for federated avatars (#3320) 8 years ago
bindata #3393 fix missing sub-url prefix in relative avatar link 8 years ago
context #1601 support delete issue comment 8 years ago
cron Move cron module to independent package 8 years ago
httplib Remove unused tests 8 years ago
log #2798 fix assign operation not take effect 8 years ago
mailer #2854 fix no mail notification when issue is closed/reopened 8 years ago
markdown #3107 fix mention regex does not include dash 8 years ago
process introduce git-shell 9 years ago
setting Add support for federated avatars (#3320) 8 years ago
ssh #2850 fix potential SSH commands dislocation 8 years ago
template Use struct for UI settings 8 years ago
user The pruning for the synchronized mirrors is a option now. Default value: enable_prune = true (#3246) 8 years ago