aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/repo/commit_statuses.tmpl2
-rw-r--r--web_src/js/features/repo-commit.js1
-rw-r--r--web_src/js/modules/tippy.js2
-rw-r--r--web_src/less/_repository.less5
4 files changed, 8 insertions, 2 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}}
diff --git a/web_src/js/features/repo-commit.js b/web_src/js/features/repo-commit.js
index 170284f101..3aba850911 100644
--- a/web_src/js/features/repo-commit.js
+++ b/web_src/js/features/repo-commit.js
@@ -61,7 +61,6 @@ export function initCommitStatuses() {
const top = $('.repository.file.list').length > 0 || $('.repository.diff').length > 0;
createTippy(this, {
- trigger: 'click',
content: this.nextElementSibling,
placement: top ? 'top-start' : 'bottom-start',
interactive: true,
diff --git a/web_src/js/modules/tippy.js b/web_src/js/modules/tippy.js
index 7fc273d1cc..045df6f0a0 100644
--- a/web_src/js/modules/tippy.js
+++ b/web_src/js/modules/tippy.js
@@ -6,6 +6,8 @@ export function createTippy(target, opts = {}) {
placement: target.getAttribute('data-placement') || 'top-start',
animation: false,
allowHTML: false,
+ interactiveBorder: 30,
+ ignoreAttributes: true,
maxWidth: 500, // increase over default 350px
arrow: `<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>`,
...(opts?.role && {theme: opts.role}),
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index 473d6f9dc7..219597190d 100644
--- a/web_src/less/_repository.less
+++ b/web_src/less/_repository.less
@@ -2827,6 +2827,11 @@ tbody.commit-list {
vertical-align: middle;
}
+// in the commit list, messages can wrap so we can use inline
+.commit-list .message-wrapper {
+ display: inline;
+}
+
@media @mediaSm {
tr.commit-list {
width: 100%;