forked from forgejo/forgejo
Improve some modal action buttons (#24289)
Follow #24097 and #24285 And add a devtest page for modal action button testing. http://localhost:3000/devtest/fomantic-modal Now the `modal_actions_confirm.tmpl` could support: green / blue / yellow positive buttons, the negative button is "secondary". ps: this PR is only a small improvement, there are still a lot of buttons not having proper colors. In the future these buttons could be improved by this approach. These buttons could also be improved according to the conclusion of #24285 in the future.  And add GitHub-like single danger button (context: https://github.com/go-gitea/gitea/issues/24285#issuecomment-1519100312)  --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
47748df9b3
commit
75c62054a6
58 changed files with 173 additions and 129 deletions
|
@ -157,7 +157,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-email">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-email">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.email_deletion"}}
|
||||
|
@ -168,7 +168,7 @@
|
|||
{{template "base/modal_actions_confirm" .}}
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-account">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-account">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.delete_account_title"}}
|
||||
|
|
|
@ -264,7 +264,7 @@
|
|||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-token">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-token">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.access_token_deletion"}}
|
||||
|
@ -272,17 +272,7 @@
|
|||
<div class="content">
|
||||
<p>{{.locale.Tr "settings.access_token_deletion_desc"}}</p>
|
||||
</div>
|
||||
|
||||
<div class="actions">{{/* TODO: Convert to base/modal_actions_confirm.tmpl */}}
|
||||
<button class="ui green basic inverted cancel button">
|
||||
{{svg "octicon-x"}}
|
||||
{{.locale.Tr "settings.access_token_deletion_cancel_action"}}
|
||||
</button>
|
||||
<button class="ui red basic inverted ok button">
|
||||
{{svg "octicon-check"}}
|
||||
{{.locale.Tr "settings.access_token_deletion_confirm_action"}}
|
||||
</button>
|
||||
</div>
|
||||
{{template "base/modal_actions_confirm" (dict "locale" $.locale "ModalButtonColors" "yellow")}}
|
||||
</div>
|
||||
|
||||
{{template "user/settings/layout_footer" .}}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="remove-gitea-oauth2-application">
|
||||
<div class="ui g-modal-confirm delete modal" id="remove-gitea-oauth2-application">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.remove_oauth2_application"}}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="revoke-gitea-oauth2-grant">
|
||||
<div class="ui g-modal-confirm delete modal" id="revoke-gitea-oauth2-grant">
|
||||
<div class="header">
|
||||
{{svg "octicon-shield" 16 "gt-mr-2"}}
|
||||
{{.locale.Tr "settings.revoke_oauth2_grant"}}
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<br>
|
||||
<p>{{.locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}</p>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-gpg">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-gpg">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.gpg_key_deletion"}}
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-principal">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-principal">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.ssh_principal_deletion"}}
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
<br>
|
||||
<p>{{.locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}}</p>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-ssh">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-ssh">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.ssh_key_deletion"}}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="leave-organization">
|
||||
<div class="ui g-modal-confirm delete modal" id="leave-organization">
|
||||
<div class="header">
|
||||
{{$.locale.Tr "org.members.leave"}}
|
||||
</div>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<div class="right floated content">
|
||||
{{if $.allowAdopt}}
|
||||
<button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
|
||||
<div class="ui gitea-confirm-modal modal" id="adopt-unadopted-modal-{{$dirI}}">
|
||||
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}">
|
||||
<div class="header">
|
||||
<span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
|
||||
</div>
|
||||
|
@ -46,22 +46,13 @@
|
|||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{$dir}}">
|
||||
<input type="hidden" name="action" value="adopt">
|
||||
<div class="actions">{{/* TODO: Convert to base/modal_actions_confirm */}}
|
||||
<button class="ui red basic inverted cancel button">
|
||||
{{svg "octicon-x"}}
|
||||
{{$.locale.Tr "modal.no"}}
|
||||
</button>
|
||||
<button class="ui green basic inverted ok button">
|
||||
{{svg "octicon-check"}}
|
||||
{{$.locale.Tr "modal.yes"}}
|
||||
</button>
|
||||
</div>
|
||||
{{template "base/modal_actions_confirm" .}}
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if $.allowDelete}}
|
||||
<button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
|
||||
<div class="ui gitea-confirm-modal modal" id="delete-unadopted-modal-{{$dirI}}">
|
||||
<div class="ui g-modal-confirm modal" id="delete-unadopted-modal-{{$dirI}}">
|
||||
<div class="header">
|
||||
<span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
|
||||
</div>
|
||||
|
@ -125,7 +116,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal">
|
||||
<div class="ui g-modal-confirm delete modal">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.remove_account_link"}}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-account-link">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-account-link">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.remove_account_link"}}
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-openid">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-openid">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.openid_deletion"}}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="disable-twofa">
|
||||
<div class="ui g-modal-confirm delete modal" id="disable-twofa">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.twofa_disable"}}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
{{template "user/auth/webauthn_error" .}}
|
||||
|
||||
<div class="ui gitea-confirm-modal delete modal" id="delete-registration">
|
||||
<div class="ui g-modal-confirm delete modal" id="delete-registration">
|
||||
<div class="header">
|
||||
{{svg "octicon-trash"}}
|
||||
{{.locale.Tr "settings.webauthn_delete_key"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue