[GITEA] Improve display of Webauthn keys' creation time

- Unify how the creation time of webauthn keys are shown with GPG and
SSH keys.
- Instead of using the time since, show the date that the key was
created.

(cherry picked from commit 89fb988fdd)
(cherry picked from commit 0a2db6215c)
(cherry picked from commit a39eac2e12)
(cherry picked from commit fa164c9783)
(cherry picked from commit e02dcf0065)
This commit is contained in:
Gusted 2023-11-20 11:16:21 +01:00 committed by Earl Warren
parent 74db46b0f5
commit a515b10137
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -11,7 +11,7 @@
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
<span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
<i class="flex-item-body">{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}</i>
</div>
<div class="flex-item-trailing">
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">