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.

Only show 'Manage Account Links' when necessary (#25311)

If it is not possible to add or manage an account link, the menu
will not be shown to the user.

authored by

Panagiotis "Ivory" Vasilopoulos and committed by
GitHub
5eeddfde 8e6a1143

+14 -13
+14 -13
templates/user/settings/security/accountlinks.tmpl
··· 1 + {{/* No account links, no way to add account links: Menu will not be shown. */}} 2 + {{if or .AccountLinks .OrderedOAuth2Names}} 1 3 <h4 class="ui top attached header"> 2 4 {{.locale.Tr "settings.manage_account_links"}} 3 5 {{if .OrderedOAuth2Names}} ··· 23 25 <div class="item"> 24 26 {{.locale.Tr "settings.manage_account_links_desc"}} 25 27 </div> 26 - {{if .AccountLinks}} 27 - {{range $loginSource, $provider := .AccountLinks}} 28 - <div class="item gt-df gt-ac"> 29 - <div class="gt-f1"> 30 - <span data-tooltip-content="{{$provider}}"> 31 - {{$loginSource.Name}} 32 - {{if $loginSource.IsActive}}<span class="text primary">{{$.locale.Tr "repo.settings.active"}}</span>{{end}} 33 - </span> 34 - </div> 35 - <button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}"> 36 - {{$.locale.Tr "settings.delete_key"}} 37 - </button> 28 + {{range $loginSource, $provider := .AccountLinks}} 29 + <div class="item gt-df gt-ac"> 30 + <div class="gt-f1"> 31 + <span data-tooltip-content="{{$provider}}"> 32 + {{$loginSource.Name}} 33 + {{if $loginSource.IsActive}}<span class="text primary">{{$.locale.Tr "repo.settings.active"}}</span>{{end}} 34 + </span> 38 35 </div> 39 - {{end}} 36 + <button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}"> 37 + {{$.locale.Tr "settings.delete_key"}} 38 + </button> 39 + </div> 40 40 {{end}} 41 41 </div> 42 42 </div> ··· 51 51 </div> 52 52 {{template "base/modal_actions_confirm" .}} 53 53 </div> 54 + {{end}}