[v10.0/forgejo] fix(ui): display verified icon for default gpg key (#6833)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/6803 ## Description Thank you for this amazing project! I recently noticed that the icon next to the GPG key reference appears to be incorrect for commits signed by the default GPG key: | Default GPG Key | User GPG Key | |---------|---------| |  |  | Looking into the commit history of the template file, I noticed that Forgejo-signed commits originally had a distinct icon: [gitea-unlock-cog](b918609acc
) --> [octicon-shield-lock](12ddc48c5c
) --> octicon-unverified (current) Since `octicon-unverified` is also used when a commit cannot be verified (.Verification.Warning), I find it misleading for successfully signed commits. This PR changes the icon to the verified variant for better clarity. ### Tests 1. Set up automatic commit signing by Forgejo ([guide](https://forgejo.org/docs/latest/admin/signing/#automatic-signing)) 2. Trigger automatic commit signing in any of the following scenarios: - Repository Initialisation (should be the easiest) - Wiki Changes - CRUD actions using the editor or the API - Merges from Pull Requests 3. Open the commit signed by Forgejo 4. Verify that the icon next to the GPG key id is `octicon-verified`:  ### Documentation - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] I want the title to show in the release notes with a link to this pull request. <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - User Interface bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/6803): <!--number 6803 --><!--line 0 --><!--description Zml4KHVpKTogZGlzcGxheSB2ZXJpZmllZCBpY29uIGZvciBkZWZhdWx0IGdwZyBrZXk=-->fix(ui): display verified icon for default gpg key<!--description--> <!--end release-notes-assistant--> Co-authored-by: shgew <shgew@noreply.codeberg.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6833 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
parent
d260013a51
commit
34d2a8531c
|
@ -217,8 +217,8 @@
|
|||
</div>
|
||||
<div class="tw-flex tw-items-center">
|
||||
{{if .Verification.Verified}}
|
||||
{{if ne .Verification.SigningUser.ID 0}}
|
||||
{{svg "octicon-verified" 16 "tw-mr-2"}}
|
||||
{{if ne .Verification.SigningUser.ID 0}}
|
||||
{{if .Verification.SigningSSHKey}}
|
||||
<span class="ui text tw-mr-2">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||
|
@ -227,7 +227,6 @@
|
|||
{{.Verification.SigningKey.PaddedKeyID}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{svg "octicon-unverified" 16 "tw-mr-2"}}
|
||||
{{if .Verification.SigningSSHKey}}
|
||||
<span class="ui text tw-mr-2" data-tooltip-content="{{ctx.Locale.Tr "gpg.default_key"}}">{{ctx.Locale.Tr "repo.commits.ssh_key_fingerprint"}}:</span>
|
||||
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||
|
|
Loading…
Reference in New Issue