]> source.dussan.org Git - gitea.git/commit
Rework repo buttons (#20602, #20718) (#20719)
authorsilverwind <me@silverwind.io>
Sat, 20 Aug 2022 14:49:16 +0000 (16:49 +0200)
committerGitHub <noreply@github.com>
Sat, 20 Aug 2022 14:49:16 +0000 (15:49 +0100)
commitc61ed6fad4605982f45c85831ba529c70c66d1e1
tree1cc0e5649d9552810766af2151dad719ab2e76f0
parentb88a4b48548c72f52ebfa00740fc84987a7fd00f
Rework repo buttons (#20602, #20718) (#20719)

* Rework repo buttons (#20602)

* Rework repo buttons

- Replace "New PR" and "Go to File" button with Icon Button
- Move all "Add File" actions into a dropdown button
- Remove most custom styling of clone buttons
- Margin and wiki tweaks

Buttons are now all equal height, mobile layout wraps gracefully.

Fixes: https://github.com/go-gitea/gitea/issues/13671
Replaces: https://github.com/go-gitea/gitea/pull/20375

* Restore history button and hide add button when unable to add (#20718)

Fix two regressions from #20602:

- Restore the 'History' button that was previously unable to render
  because it's show condition was never hit
- Hide the 'Add File' button when there would be no items in the
  dropdown.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
options/locale/locale_en-US.ini
templates/repo/branch_dropdown.tmpl
templates/repo/clone_buttons.tmpl
templates/repo/commits.tmpl
templates/repo/home.tmpl
templates/repo/sub_menu.tmpl
templates/repo/view_list.tmpl
templates/repo/wiki/view.tmpl
web_src/js/features/repo-common.js
web_src/less/_repository.less
web_src/less/helpers.less