mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-07 23:24:03 +02:00
Add an optional Name field to webhooks so users can give them human-readable labels instead of relying only on URLs. The webhook overview page now displays names when available, or falls back to the URL for unnamed webhooks. Fixes #37025 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
29 lines
1.1 KiB
Handlebars
29 lines
1.1 KiB
Handlebars
<h4 class="ui top attached header">
|
|
{{.Title}}
|
|
<div class="ui right">
|
|
<div class="ui jump dropdown">
|
|
<div class="ui primary tiny button">{{ctx.Locale.Tr "repo.settings.add_webhook"}}</div>
|
|
{{template "repo/settings/webhook/link_menu" .}}
|
|
</div>
|
|
</div>
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<div class="ui list flex-items-block">
|
|
<div class="item"><span>{{.Description}}</span></div>
|
|
{{range .Webhooks}}
|
|
<div class="item">
|
|
<span class="{{if eq .LastStatus 1}}tw-text-green{{else if eq .LastStatus 2}}tw-text-red{{else}}tw-text-text-light{{end}}">{{svg "octicon-dot-fill" 22}}</span>
|
|
<div class="gt-ellipsis tw-flex-1">
|
|
<a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{or .Name (ctx.Locale.Tr "repo.settings.webhook.name_empty")}}</a>
|
|
<span class="tw-ml-2 tw-text-grey-light">{{.URL}}</span>
|
|
</div>
|
|
<a class="muted tw-p-2" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
|
<a class="tw-text-red tw-p-2 link-action"
|
|
data-url="{{$.Link}}/delete?id={{.ID}}"
|
|
data-modal-confirm="{{ctx.Locale.Tr "repo.settings.webhook_deletion_desc"}}"
|
|
>{{svg "octicon-trash"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|