mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 18:04:14 +01:00
e3897148f9
Some minor UI improvements together (then no need to review 3 small PRs) # The Map for auth sources Close #24826 Now the LDAP and OAuth2 both have multiple line editor for the map (and it can be resized by the handler) <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/7eed1618-0d71-4df2-84bd-ca20a06c02db) ![image](https://github.com/go-gitea/gitea/assets/2114189/a94dc6dc-0e3b-4185-bac1-8d16561b8e62) </details> # The account link display Before, the UI is misaligned This PR fixes the misalignment, remove "float right", and show the auth source name and auth type (in the tooltip). And the "active" color is changed from dark red to primary color. Before: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/3bb4a8f2-2f66-4d62-ac96-096f14aeb819) </details> After: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/05ca46ae-7769-422d-a52a-b7402679cd05) </details> # The UI logo alignment Changed file: `css/base.css`. Before, there were some "fine tunes", these "fine tunes" only causes misalignment. <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/395b03c2-6e8c-4742-abf9-8d548dab908d) </details> After this PR: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/3339acdc-7391-45bc-b6ec-a5b3bc7830a6) ![image](https://github.com/go-gitea/gitea/assets/2114189/656a7bee-cdfb-4232-aee9-25b76cae8e00) </details>
53 lines
1.7 KiB
Handlebars
53 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 width="20" height="20" src="{{AppSubUrl}}{{$provider.Image}}" 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>
|