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
+2 -2
View File
@@ -48,7 +48,7 @@
{{ctx.Locale.Tr "repo.projects.close"}}
</button>
{{end}}
<button type="button" class="item btn link-action" data-url="{{.Link}}/delete?id={{.Project.ID}}"
<button type="button" class="item btn link-action negative" data-url="{{.Link}}/delete?id={{.Project.ID}}"
data-modal-confirm-header="{{ctx.Locale.Tr "repo.projects.deletion"}}"
data-modal-confirm-content="{{ctx.Locale.Tr "repo.projects.deletion_desc"}}"
>
@@ -108,7 +108,7 @@
>
{{svg "octicon-star"}} {{ctx.Locale.Tr "repo.projects.column.set_default"}}
</a>
<a class="item button link-action" data-url="{{$.Link}}/{{.ID}}" data-fetch-method="DELETE"
<a class="item button link-action negative" data-url="{{$.Link}}/{{.ID}}" data-fetch-method="DELETE"
data-modal-confirm-header="{{ctx.Locale.Tr "repo.projects.column.delete"}}"
data-modal-confirm-content="{{ctx.Locale.Tr "repo.projects.column.deletion_desc"}}"
>