diff options
author | silverwind <me@silverwind.io> | 2022-09-09 23:03:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 17:03:18 -0400 |
commit | 52cbe2bdbce6cd5a4fc0738ab4a25fafe9aa6d48 (patch) | |
tree | 9d90488e05c3062195488f37e74b04aaf7356bcd /templates | |
parent | 0bd59381adb9864f25c1b7c59fbde45cfa9d807b (diff) | |
download | gitea-52cbe2bdbce6cd5a4fc0738ab4a25fafe9aa6d48.tar.gz gitea-52cbe2bdbce6cd5a4fc0738ab4a25fafe9aa6d48.zip |
Improve commit status icons (#21124)
- Show popover on hover/focus (tippy default) instead of click
- If there is only one status, add href to trigger element
- Increase tippy
[interactiveBorder](https://atomiks.github.io/tippyjs/v6/all-props/#interactiveborder),
making it easier to keep interactive tooltips open with sloppy mouse
movement
- Fix a overflow issue in the commit list
Commit list before:
<img width="459" alt="Screen Shot 2022-09-09 at 19 00 01"
src="https://user-images.githubusercontent.com/115237/189405517-68de5a69-e312-4ea2-ab81-87629db6064b.png">
Commit List after:
<img width="475" alt="Screen Shot 2022-09-09 at 19 01 43"
src="https://user-images.githubusercontent.com/115237/189405574-13e84885-9073-4f86-9eeb-d008c1639647.png">
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/commit_statuses.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index d45d8a1df6..d682709082 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,4 +1,4 @@ -<a class="ui link commit-statuses-trigger vm">{{template "repo/commit_status" .Status}}</a> +<a class="ui link commit-statuses-trigger vm"{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}} href="{{$status.TargetURL}}"{{end}}{{end}}>{{template "repo/commit_status" .Status}}</a> <div class="ui commit-statuses-popup commit-statuses tippy-target"> <div class="ui relaxed list divided"> {{range .Statuses}} |