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.
gitea/modules
HesterG 2f0e79e639
Use frontend fetch for branch dropdown component (#25719)
- Send request to get branch/tag list, use loading icon when waiting for
response.
- Only fetch when the first time branch/tag list shows.
- For backend, removed assignment to `ctx.Data["Branches"]` and
`ctx.Data["Tags"]` from `context/repo.go` and passed these data wherever
needed.
- Changed some `v-if` to `v-show` and used native `svg` as mentioned in
https://github.com/go-gitea/gitea/pull/25719#issuecomment-1631712757 to
improve perfomance when there are a lot of branches.
- Places Used the dropdown component:

     Repo Home Page
    
<img width="1429" alt="Screen Shot 2023-07-06 at 12 17 51"
src="https://github.com/go-gitea/gitea/assets/17645053/6accc7b6-8d37-4e88-ae1a-bd2b3b927ea0">

    Commits Page

<img width="1431" alt="Screen Shot 2023-07-06 at 12 18 34"
src="https://github.com/go-gitea/gitea/assets/17645053/2d0bf306-d1e2-45a8-a784-bc424879f537">

    Specific commit -> operations -> cherry-pick
    
<img width="758" alt="Screen Shot 2023-07-06 at 12 23 28"
src="https://github.com/go-gitea/gitea/assets/17645053/1e557948-3881-4e45-a625-8ef36d45ae2d">

    Release Page
    
<img width="1433" alt="Screen Shot 2023-07-06 at 12 25 05"
src="https://github.com/go-gitea/gitea/assets/17645053/3ec82af1-15a4-4162-a50b-04a9502161bb">

- Demo


https://github.com/go-gitea/gitea/assets/17645053/d45d266b-3eb0-465a-82f9-57f78dc5f9f3

- Note:

UI of dropdown menu could be improved in another PR as it should apply
to more dropdown menus.

Fix #14180

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago
..
actions Fix `ref` for workflows triggered by `pull_request_target` (#25743) 2 years ago
activitypub Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
analyze Implement FSFE REUSE for golang files (#21840) 2 years ago
assetfs Skip unuseful error message in dev mode when watching local filesystem (#25919) 2 years ago
auth Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
avatar Remove nfnt/resize and oliamb/cutter (#25999) 2 years ago
base Replace `interface{}` with `any` (#25686) 2 years ago
cache Upgrade go dependencies (#25819) 2 years ago
charset Replace `interface{}` with `any` (#25686) 2 years ago
container Implement FSFE REUSE for golang files (#21840) 2 years ago
context Use frontend fetch for branch dropdown component (#25719) 2 years ago
csv Refactor locale number (#24134) 2 years ago
doctor Upgrade go dependencies (#25819) 2 years ago
emoji Update emoji set to Unicode 15 (#25595) 2 years ago
eventsource Less naked returns (#25713) 2 years ago
generate Bump github.com/golang-jwt/jwt to v5 (#25975) 2 years ago
git Remove `git.FileBlame` (#25841) 2 years ago
gitgraph Add context cache as a request level cache (#22294) 2 years ago
graceful Replace `interface{}` with `any` (#25686) 2 years ago
hcaptcha Consume hcaptcha and pwn deps (#22610) 2 years ago
highlight Upgrade go dependencies (#25819) 2 years ago
hostmatcher Implement FSFE REUSE for golang files (#21840) 2 years ago
html Replace `interface{}` with `any` (#25686) 2 years ago
httpcache Less naked returns (#25713) 2 years ago
httplib Less naked returns (#25713) 2 years ago
indexer Add open/closed field support for issue index (#25708) 2 years ago
issue/template Replace `interface{}` with `any` (#25686) 2 years ago
json Replace `interface{}` with `any` (#25686) 2 years ago
label Make label templates have consistent behavior and priority (#23749) 2 years ago
lfs Rewrite logger system (#24726) 2 years ago
log Fix sub-command log level (#25537) 2 years ago
markup Disallow dangerous url schemes (#25960) 2 years ago
mcaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
metrics Use a separate admin page to show global stats, remove `actions` stat (#25062) 2 years ago
migration Replace `interface{}` with `any` (#25686) 2 years ago
mirror Improve queue and logger context (#24924) 2 years ago
nosql Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
notification Add Adopt repository event and handler (#25497) 2 years ago
options Use a general approach to access custom/static/builtin assets (#24022) 2 years ago
packages Add support for different Maven POM encoding (#25873) 2 years ago
paginator Use more specific test methods (#24265) 2 years ago
pprof Implement FSFE REUSE for golang files (#21840) 2 years ago
private Replace `interface{}` with `any` (#25686) 2 years ago
process Less naked returns (#25713) 2 years ago
proxy Use proxy for pull mirror (#22771) 2 years ago
proxyprotocol Implement FSFE REUSE for golang files (#21840) 2 years ago
public Move public asset files to the proper directory (#25907) 2 years ago
queue Update tool dependencies, lock govulncheck and actionlint (#25655) 2 years ago
recaptcha Implement FSFE REUSE for golang files (#21840) 2 years ago
references Use correct captured group range when parsing cross-reference (#22672) 2 years ago
regexplru Upgrade go dependencies (#25819) 2 years ago
repository Support copy protected branch from template repository (#25889) 2 years ago
secret Improve decryption failure message (#24573) 2 years ago
session Replace `interface{}` with `any` (#25686) 2 years ago
setting Fix env config parsing for "GITEA____APP_NAME" (#26001) 2 years ago
sitemap Fix sitemap (#22272) 2 years ago
ssh Refactor path & config system (#25330) 2 years ago
storage Replace `interface{}` with `any` (#25686) 2 years ago
structs Remove commit status running and warning to align GitHub (#25839) 2 years ago
svg Move public asset files to the proper directory (#25907) 2 years ago
sync Implement FSFE REUSE for golang files (#21840) 2 years ago
system Implement FSFE REUSE for golang files (#21840) 2 years ago
templates Replace `interface{}` with `any` (#25686) 2 years ago
test Replace `interface{}` with `any` (#25686) 2 years ago
testlogger Replace `interface{}` with `any` (#25686) 2 years ago
timeutil Fix incorrect webhook time and use relative-time to display it (#24477) 2 years ago
translation Replace `interface{}` with `any` (#25686) 2 years ago
turnstile Add new captcha: cloudflare turnstile (#22369) 2 years ago
typesniffer Do not recognize text files as audio (#23355) 2 years ago
updatechecker Implement FSFE REUSE for golang files (#21840) 2 years ago
upload Implement FSFE REUSE for golang files (#21840) 2 years ago
uri Implement FSFE REUSE for golang files (#21840) 2 years ago
user Implement FSFE REUSE for golang files (#21840) 2 years ago
util Less naked returns (#25713) 2 years ago
validation Replace `interface{}` with `any` (#25686) 2 years ago
web Remove redundant "RouteMethods" method (#26024) 2 years ago
webhook New webhook trigger for receiving Pull Request review requests (#24481) 2 years ago