gitea/modules
wxiaoguang d4c789dfc1
Refactor repo clone button and repo clone links, fix JS error on empty repo page (#19208)
The last PR about clone buttons introduced an JS error when visiting an empty repo page:
* https://github.com/go-gitea/gitea/pull/19028
* `Uncaught ReferenceError: isSSH is not defined`, because the variables are scoped and doesn't share between sub templates.

This:
1. Simplify `templates/repo/clone_buttons.tmpl` and make code clear
2. Move most JS code into `initRepoCloneLink`
3. Remove unused `CloneLink.Git`
4. Remove `ctx.Data["DisableSSH"] / ctx.Data["ExposeAnonSSH"] / ctx.Data["DisableHTTP"]`, and only set them when is is needed (eg: deploy keys / ssh keys)
5. Introduce `Data["CloneButton*"]` to provide data for clone buttons and links
6. Introduce `Data["RepoCloneLink"]` for the repo clone link (not the wiki)
7. Remove most `ctx.Data["PageIsWiki"]` because it has been set in the `/wiki` middleware
8. Remove incorrect `quickstart` class in `migrating.tmpl`
2022-03-29 05:21:30 +02:00
..
activitypub
analyze
appstate
auth RSS/Atom support for Repos (#19055) 2022-03-13 17:40:47 +01:00
avatar
base format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
cache
charset Don't treat BOM escape sequence as hidden character. (#18909) 2022-02-26 16:48:23 +00:00
context Refactor repo clone button and repo clone links, fix JS error on empty repo page (#19208) 2022-03-29 05:21:30 +02:00
convert API: Return primary language and repository language stats API URL (#18396) 2022-01-25 08:33:40 +02:00
csv format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
doctor Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) (#19163) 2022-03-22 16:22:54 +01:00
emoji format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
eventsource
generate Use base32 for 2FA scratch token (#18384) 2022-01-26 12:10:10 +08:00
git Hide sensitive content on admin panel progress monitor (#19218) 2022-03-27 12:54:09 +01:00
gitgraph
graceful Add pprof labels in processes and for lifecycles (#19202) 2022-03-25 12:47:12 +00:00
hcaptcha
highlight
hostmatcher remove not needed (#19128) 2022-03-18 20:17:57 +01:00
httpcache format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
httplib
indexer
json
lfs Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
log Add auto logging of goroutine pid label (#19212) 2022-03-26 20:04:36 +00:00
markup
metrics
migration
nosql
notification
options format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
password
pprof
private Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
process
proxy Return nil proxy function if proxy not enabled (#16742) 2021-08-19 16:41:20 -04:00
public Fix mime-type detection for HTTP server (#18370) 2022-01-23 20:19:49 +08:00
queue
recaptcha refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
references
repository Set the default branch for repositories generated from templates (#19136) 2022-03-27 03:56:28 +01:00
secret
session
setting Ensure that setting.LocalURL always has a trailing slash (#19171) 2022-03-22 16:59:57 +00:00
ssh
storage Clean paths when looking in Storage (#19124) 2022-03-22 17:02:26 -04:00
structs Set the default branch for repositories generated from templates (#19136) 2022-03-27 03:56:28 +01:00
svg refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
sync
templates Prevent start panic due to missing DotEscape function 2022-03-23 16:08:27 +00:00
test
timeutil
translation
typesniffer format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
updatechecker format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
upload
uri
user
util Cleanup protected branches when deleting users & teams (#19158) 2022-03-22 09:09:45 +08:00
validation
web