summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-01-03 03:09:18 +0800
committerGitHub <noreply@github.com>2024-01-02 20:09:18 +0100
commit91aa263225083d3de6d68fca08b253b685bc7e4b (patch)
treea18a1c9bc56762526d8b5e6f28fb4f3657bdc6a6 /templates/user
parentcdc33b29a012e61b42f192d79f9486fa8e21b2ed (diff)
downloadgitea-91aa263225083d3de6d68fca08b253b685bc7e4b.tar.gz
gitea-91aa263225083d3de6d68fca08b253b685bc7e4b.zip
Make template `DateTime` show proper tooltip (#28677)
There was a question about "how to improve the datetime display for SSH/PGP/WebAuthn" https://github.com/go-gitea/gitea/pull/28262#issuecomment-1831141611 The root problem is that `DateTime` misses the "data-tooltip-content" attribute, which should be used to make the tooltip popup smoothly. Now the UI is consistent and the end users could see the detailed hour/minute/second easily by hovering the element. ![image](https://github.com/go-gitea/gitea/assets/2114189/2211336f-d59d-4f64-a83b-099f8ef6d29b) ![image](https://github.com/go-gitea/gitea/assets/2114189/f02a9c86-476d-48d6-aece-85a800235fbd)
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/settings/security/webauthn.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl
index dd8b8a4e59..da6e5977c6 100644
--- a/templates/user/settings/security/webauthn.tmpl
+++ b/templates/user/settings/security/webauthn.tmpl
@@ -11,7 +11,9 @@
</div>
<div class="flex-item-main">
<div class="flex-item-title">{{.Name}}</div>
- <span class="flex-item-body time">{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span>
+ <div class="flex-item-body">
+ <i>{{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}}</i>
+ </div>
</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}}">