forked from forgejo/forgejo
Pad GPG Key ID with preceding zeroes (#20878)
This commit is contained in:
parent
0ee96da052
commit
11bae50484
4 changed files with 24 additions and 8 deletions
|
@ -222,7 +222,7 @@
|
|||
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||
{{else}}
|
||||
<span class="ui text mr-3">{{.locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||
{{.Verification.SigningKey.KeyID}}
|
||||
{{.Verification.SigningKey.PaddedKeyID}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{svg "octicon-shield-lock" 16 "mr-3"}}
|
||||
|
@ -231,7 +231,7 @@
|
|||
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||
{{else}}
|
||||
<span class="ui text mr-3 tooltip" data-content="{{.locale.Tr "gpg.default_key"}}">{{.locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||
{{.Verification.SigningKey.KeyID}}
|
||||
{{.Verification.SigningKey.PaddedKeyID}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else if .Verification.Warning}}
|
||||
|
@ -241,14 +241,14 @@
|
|||
{{.Verification.SigningSSHKey.Fingerprint}}
|
||||
{{else}}
|
||||
<span class="ui text mr-3">{{.locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||
{{.Verification.SigningKey.KeyID}}
|
||||
{{.Verification.SigningKey.PaddedKeyID}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .Verification.SigningKey}}
|
||||
{{if ne .Verification.SigningKey.KeyID ""}}
|
||||
{{svg "octicon-shield" 16 "mr-3"}}
|
||||
<span class="ui text mr-3">{{.locale.Tr "repo.commits.gpg_key_id"}}:</span>
|
||||
{{.Verification.SigningKey.KeyID}}
|
||||
{{.Verification.SigningKey.PaddedKeyID}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .Verification.SigningSSHKey}}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<input readonly="" value="{{.TokenToSign}}">
|
||||
<div class="help">
|
||||
<p>{{.locale.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" .TokenToSign .KeyID}}</code></p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" .TokenToSign .PaddedKeyID}}</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
@ -64,8 +64,8 @@
|
|||
<span class="tooltip" data-content="{{$.locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
|
||||
{{end}}
|
||||
<div class="print meta">
|
||||
<b>{{$.locale.Tr "settings.key_id"}}:</b> {{.KeyID}}
|
||||
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
|
||||
<b>{{$.locale.Tr "settings.key_id"}}:</b> {{.PaddedKeyID}}
|
||||
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
|
||||
</div>
|
||||
<div class="activity meta">
|
||||
<i>{{$.locale.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<input readonly="" value="{{$.TokenToSign}}">
|
||||
<div class="help">
|
||||
<p>{{$.locale.Tr "settings.gpg_token_help"}}</p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" $.TokenToSign .KeyID}}</code></p>
|
||||
<p><code>{{$.locale.Tr "settings.gpg_token_code" $.TokenToSign .PaddedKeyID}}</code></p>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue