fix: focus confirm button and use red for delete confirmations (#39350)

Fixes https://github.com/go-gitea/gitea/issues/39347

1. Focus the confirm button in generic confirm modals so `Enter` runs
the highlighted action.
2. Delete actions that lacked the risky flag now get it, so their
confirm button is red.

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Abhay Pratap Singh
2026-09-18 19:42:22 +00:00
committed by GitHub
co-authored by silverwind
parent fce7b9d531
commit 3296046b4a
8 changed files with 9 additions and 9 deletions
@@ -19,7 +19,7 @@
<span class="tw-ml-2 tw-text-grey-light">{{.URL}}</span>
</div>
<a class="muted" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
<a class="tw-text-red tw-pr-2 link-action"
<a class="tw-text-red tw-pr-2 link-action negative"
data-url="{{$.Link}}/delete?id={{.ID}}"
data-modal-confirm="{{ctx.Locale.Tr "repo.settings.webhook_deletion_desc"}}"
>{{svg "octicon-trash"}}</a>