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/templates/repo
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 Restructure issue list template, styles (#25750) 2 years ago
branch Fix wrong usage of PathEscapeSegments in branch list page (#25864) 2 years ago
cite Button and color enhancements (#24989) 2 years ago
code Newly pushed branches hints on repository home page (#25715) 2 years ago
diff Make `add line comment` buttons focusable (#25894) 2 years ago
editor Enable H014 and H023 djlint rules (#25786) 2 years ago
find Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
graph Improve commit date in commit graph (#24399) 2 years ago
issue move issue filters to shared template (#25729) 2 years ago
migrate Clarify "text-align" CSS helpers, fix clone button padding (#25763) 2 years ago
projects Fix inconsistent user profile layout across tabs (#25625) 2 years ago
pulls Don't stack PR tab menu on small screens (#25789) 2 years ago
release Replace fomantic divider module with our own (#25539) 2 years ago
settings Enable H014 and H023 djlint rules (#25786) 2 years ago
tag Enable H014 and H023 djlint rules (#25786) 2 years ago
wiki Enable H014 and H023 djlint rules (#25786) 2 years ago
activity.tmpl Replace fomantic divider module with our own (#25539) 2 years ago
blame.tmpl Add template linting via djlint (#25212) 2 years ago
branch_dropdown.tmpl Use frontend fetch for branch dropdown component (#25719) 2 years ago
clone_buttons.tmpl Clarify "text-align" CSS helpers, fix clone button padding (#25763) 2 years ago
clone_script.tmpl Rework button coloring, add focus and active colors (#24507) 2 years ago
commit_page.tmpl Clarify "text-align" CSS helpers, fix clone button padding (#25763) 2 years ago
commit_status.tmpl Remove commit status running and warning from the dashboard repo list (#26036) 2 years ago
commit_statuses.tmpl Button and color enhancements (#24989) 2 years ago
commits.tmpl Fix some UI alignments (#25277) 2 years ago
commits_list.tmpl Several fixes for mobile UI (#25634) 2 years ago
commits_list_small.tmpl Use flex to align SVG and text (#25163) 2 years ago
commits_table.tmpl Several fixes for mobile UI (#25634) 2 years ago
create.tmpl Support copy protected branch from template repository (#25889) 2 years ago
create_helper.tmpl Add templates to customize text when creating and migrating repositories 2 years ago
empty.tmpl Repository Archived text title center align (#25767) 2 years ago
file_info.tmpl Show if File is Executable (#25287) 2 years ago
forks.tmpl Remove fomantic ".link" selector and styles (#23888) 2 years ago
graph.tmpl Replace remaining fontawesome dropdown icons with SVG (#24455) 2 years ago
header.tmpl Clarify "text-align" CSS helpers, fix clone button padding (#25763) 2 years ago
home.tmpl Tweak repo topics bar (#25769) 2 years ago
icon.tmpl Move helpers to be prefixed with `gt-` (#22879) 2 years ago
packages.tmpl Fix inconsistent user profile layout across tabs (#25625) 2 years ago
release_tag_header.tmpl Fix incorrect release count (#25879) 2 years ago
search.tmpl Use data-tooltip-content for tippy tooltip (#23649) 2 years ago
search_name.tmpl Clean template/helper.go (#23922) 2 years ago
shabox_badge.tmpl Fix shabox regression (#22924) 2 years ago
sub_menu.tmpl Fix tags header and pretty format numbers (#25624) 2 years ago
unicode_escape_prompt.tmpl Clarify "text-align" CSS helpers, fix clone button padding (#25763) 2 years ago
upload.tmpl Refactor `i18n` to `locale` (#20153) 3 years ago
user_cards.tmpl Change `join_on` translation to `joined_on` and include placeholder for the date (#24550) 2 years ago
view_file.tmpl Button and color enhancements (#24989) 2 years ago
view_list.tmpl Various UI fixes (#25264) 2 years ago
watchers.tmpl Fix user-cards format (#24428) 2 years ago