mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-20 11:43:40 +09:00
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:
co-authored by
silverwind
parent
fce7b9d531
commit
3296046b4a
@@ -20,7 +20,7 @@ export function createConfirmModal({header = '', content = '', confirmButtonColo
|
||||
<div class="content">${content}</div>
|
||||
<div class="actions">
|
||||
<button class="ui cancel button">${htmlRaw(svg('octicon-x'))} ${i18n.modal_cancel}</button>
|
||||
<button class="ui ${confirmButtonColor} ok button">${htmlRaw(svg('octicon-check'))} ${i18n.modal_confirm}</button>
|
||||
<button class="ui ${confirmButtonColor} ok button" autofocus>${htmlRaw(svg('octicon-check'))} ${i18n.modal_confirm}</button>
|
||||
</div>
|
||||
</div>
|
||||
`.trim());
|
||||
|
||||
Reference in New Issue
Block a user