1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/routers/web/auth
wxiaoguang fdbd646113
Group template helper functions, remove Printf, improve template error messages (#23982)
Follow #23328 


Major changes:

* Group the function in `templates/help.go` by their purposes. It could
make future work easier.
* Remove the `Printf` helper function, there is already a builtin
`printf`.
* Remove `DiffStatsWidth`, replace with `Eval` in template
* Rename the `NewTextFuncMap` to `mailSubjectTextFuncMap`, it's for
subject text template only, no need to make it support HTML functions.


----

And fine tune template error messages, to make it more friendly to
developers and users.


![image](https://user-images.githubusercontent.com/2114189/230714245-4fd202d1-2b25-41b2-8be5-03c5fee45091.png)


![image](https://user-images.githubusercontent.com/2114189/230714277-66783577-2a03-49d5-8e8c-ceba5e07a2d4.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-04-08 21:15:22 +08:00
..
2fa.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
auth.go Provide the ability to set password hash algorithm parameters (#22942) 2023-02-19 15:35:20 +08:00
linkaccount.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
oauth_test.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
oauth.go Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
openid.go Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
password.go Provide the ability to set password hash algorithm parameters (#22942) 2023-02-19 15:35:20 +08:00
webauthn.go Replace deprecated Webauthn library (#22400) 2023-01-11 21:51:00 -05:00