1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

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.
This commit is contained in:
Panagiotis "Ivory" Vasilopoulos
2023-06-24 13:00:52 +00:00
committed by GitHub
parent 8e6a114317
commit 5eeddfde10

View File

@@ -1,3 +1,5 @@
{{/* No account links, no way to add account links: Menu will not be shown. */}}
{{if or .AccountLinks .OrderedOAuth2Names}}
<h4 class="ui top attached header">
{{.locale.Tr "settings.manage_account_links"}}
{{if .OrderedOAuth2Names}}
@@ -23,7 +25,6 @@
<div class="item">
{{.locale.Tr "settings.manage_account_links_desc"}}
</div>
{{if .AccountLinks}}
{{range $loginSource, $provider := .AccountLinks}}
<div class="item gt-df gt-ac">
<div class="gt-f1">
@@ -37,7 +38,6 @@
</button>
</div>
{{end}}
{{end}}
</div>
</div>
@@ -51,3 +51,4 @@
</div>
{{template "base/modal_actions_confirm" .}}
</div>
{{end}}