Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix commit status popover and switch to svg icons
  • Loading branch information
silverwind committed Aug 9, 2022
commit d8196351cadb135652974721f4a89e3782f51963
10 changes: 5 additions & 5 deletions templates/repo/commit_status.tmpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{if eq .State "pending"}}
<i class="commit-status circle icon yellow"></i>
{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
{{end}}
{{if eq .State "success"}}
<i class="commit-status check icon green"></i>
{{svg "octicon-check" 18 "commit-status icon text green"}}
{{end}}
{{if eq .State "error"}}
<i class="commit-status warning icon red"></i>
{{svg "octicon-x" 18 "commit-status icon text red"}}
{{end}}
{{if eq .State "failure"}}
<i class="commit-status remove icon red"></i>
{{svg "octicon-x" 18 "commit-status icon text red"}}
{{end}}
{{if eq .State "warning"}}
<i class="commit-status warning sign icon yellow"></i>
{{svg "octicon-alert" 18 "commit-status icon text yellow"}}
{{end}}
4 changes: 2 additions & 2 deletions templates/repo/commit_statuses.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
{{range .Statuses}}
<div class="ui item singular-status df">
<span>{{template "repo/commit_status" .}}</span>
<span class="ui f1">{{.Context}} <span class="text grey">{{.Description}}</span></span>
<span class="ui ml-2 f1">{{.Context}} <span class="text grey">{{.Description}}</span></span>
{{if .TargetURL}}
<div class="ui"><a href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer">{{$.root.locale.Tr "repo.pulls.status_checks_details"}}</a></div>
<a class="ml-3" href="{{.TargetURL}}" target="_blank" rel="noopener noreferrer">{{$.root.locale.Tr "repo.pulls.status_checks_details"}}</a>
{{end}}
</div>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/features/repo-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function initCommitStatuses() {

createTippy(this, {
trigger: 'click',
content: this.nextSibling,
content: this.nextElementSibling,
placement: positionRight ? 'right' : 'left',
interactive: true,
});
Expand Down