mirror of
https://github.com/go-gitea/gitea
synced 2024-12-26 05:06:06 +01:00
0058453fd9
Backport #25030 by @HesterG Close #24808 Co-Authour @wxiaoguang @silverwind 1. Most svgs are found from https://worldvectorlogo.com/ , and some are from conversion of png to svg. (facebook and nextcloud). And also changed `templates/user/settings/security/accountlinks.tmpl`. 2. Fixed display name and iconurl related logic # After <img width="1436" alt="Screen Shot 2023-06-05 at 14 09 05" src="https://github.com/go-gitea/gitea/assets/17645053/a5db39d8-1ab0-4676-82a4-fba60a1d1f84"> On mobile <img width="378" alt="Screen Shot 2023-06-05 at 14 09 46" src="https://github.com/go-gitea/gitea/assets/17645053/71d0f51b-baac-4f48-8ca2-ae0e013bd62e"> user/settings/security/accountlinks (The dropdown might be improved later) <img width="973" alt="Screen Shot 2023-06-01 at 10 01 44" src="https://github.com/go-gitea/gitea/assets/17645053/27010e7e-2785-4fc5-8c49-b06621898f37"> Co-authored-by: HesterG <hestergong@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
54 lines
1.7 KiB
Handlebars
54 lines
1.7 KiB
Handlebars
<h4 class="ui top attached header">
|
|
{{.locale.Tr "settings.manage_account_links"}}
|
|
{{if .OrderedOAuth2Names}}
|
|
<div class="ui right">
|
|
<div class="ui dropdown">
|
|
<div class="ui primary tiny button">{{.locale.Tr "settings.link_account"}}</div>
|
|
<div class="menu">
|
|
{{range $key := .OrderedOAuth2Names}}
|
|
{{$provider := index $.OAuth2Providers $key}}
|
|
<a class="item" href="{{AppSubUrl}}/user/oauth2/{{$key}}">
|
|
<img class="gt-mr-3" width="20" height="20" src="{{$provider.IconURL}}" alt="{{$provider.DisplayName}}">
|
|
{{$provider.DisplayName}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</h4>
|
|
|
|
<div class="ui attached segment">
|
|
<div class="ui key list">
|
|
<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">
|
|
<span data-tooltip-content="{{$provider}}">
|
|
{{$loginSource.Name}}
|
|
{{if $loginSource.IsActive}}<span class="text primary">{{$.locale.Tr "repo.settings.active"}}</span>{{end}}
|
|
</span>
|
|
</div>
|
|
<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}}">
|
|
{{$.locale.Tr "settings.delete_key"}}
|
|
</button>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ui g-modal-confirm delete modal" id="delete-account-link">
|
|
<div class="header">
|
|
{{svg "octicon-trash"}}
|
|
{{.locale.Tr "settings.remove_account_link"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|