loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(ui): always use primary button color inside modals (#7161)

Followup to https://codeberg.org/forgejo/forgejo/pulls/3002
Related to https://codeberg.org/forgejo/forgejo/pulls/6126

This deimplements `ModalButtonColors`.

Nowhere in the UI except for one devtest page modal dialogs paint this button any other color and we don't want new UIs to do that.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7161
Reviewed-by: Gusted <gusted@noreply.codeberg.org>

0ko 49694242 da2a92fc

+4 -23
+1 -1
templates/admin/repo/unadopted.tmpl
··· 54 54 <input type="hidden" name="action" value="delete"> 55 55 <input type="hidden" name="q" value="{{$.Keyword}}"> 56 56 <input type="hidden" name="page" value="{{$.CurrentPage}}"> 57 - {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "primary")}} 57 + {{template "base/modal_actions_confirm"}} 58 58 </form> 59 59 </div> 60 60 </div>
+1 -8
templates/base/modal_actions_confirm.tmpl
··· 1 1 {{/* 2 2 Two buttons (negative, positive): 3 3 * ModalButtonTypes: "yes" (default) or "confirm" 4 - * ModalButtonColors: "primary" (default) / "blue" / "yellow" 5 4 * ModalButtonCancelText 6 5 * ModalButtonOkText 7 6 ··· 23 22 {{if .ModalButtonCancelText}}{{$textNegitive = .ModalButtonCancelText}}{{end}} 24 23 {{if .ModalButtonOkText}}{{$textPositive = .ModalButtonOkText}}{{end}} 25 24 26 - {{$stylePositive := "primary"}} 27 - {{if eq .ModalButtonColors "blue"}} 28 - {{$stylePositive = "blue"}} 29 - {{else if eq .ModalButtonColors "yellow"}} 30 - {{$stylePositive = "yellow"}} 31 - {{end}} 32 25 <button class="ui cancel button">{{svg "octicon-x"}} {{$textNegitive}}</button> 33 - <button class="ui {{$stylePositive}} ok button">{{svg "octicon-check"}} {{$textPositive}}</button> 26 + <button class="ui primary ok button">{{svg "octicon-check"}} {{$textPositive}}</button> 34 27 {{end}} 35 28 </div>
-12
templates/devtest/fomantic-modal.tmpl
··· 54 54 {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} 55 55 </div> 56 56 57 - <div class="ui g-modal-confirm modal" id="test-modal-blue"> 58 - <div class="header">Blue dialog</div> 59 - <div class="content">hello, this is the modal dialog content</div> 60 - {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "blue")}} 61 - </div> 62 - 63 - <div class="ui g-modal-confirm modal" id="test-modal-yellow"> 64 - <div class="header">yellow dialog</div> 65 - <div class="content">hello, this is the modal dialog content</div> 66 - {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "yellow")}} 67 - </div> 68 - 69 57 <div class="ui g-modal-confirm modal" id="test-modal-danger"> 70 58 {{svg "octicon-x" 16 "inside close"}} 71 59 <div class="header">dangerous action dialog</div>
+1 -1
templates/repo/settings/lfs.tmpl
··· 44 44 </p> 45 45 <form class="ui form" action="{{$.Link}}/delete/{{.Oid}}" method="post"> 46 46 {{$.CsrfTokenHtml}} 47 - {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "primary")}} 47 + {{template "base/modal_actions_confirm"}} 48 48 </form> 49 49 </div> 50 50 </div>
+1 -1
templates/user/settings/applications.tmpl
··· 122 122 <div class="content"> 123 123 <p>{{ctx.Locale.Tr "settings.access_token_deletion_desc"}}</p> 124 124 </div> 125 - {{template "base/modal_actions_confirm" (dict "ModalButtonColors" "primary")}} 125 + {{template "base/modal_actions_confirm"}} 126 126 </div> 127 127 128 128 {{template "user/settings/layout_footer" .}}