summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/locale/locale_en-US.ini1
-rw-r--r--templates/user/settings/keys_gpg.tmpl4
2 files changed, 3 insertions, 2 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 160f8e7ab1..f1f6925bb5 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -377,6 +377,7 @@ ssh_key_deletion_success = SSH key has been deleted successfully!
gpg_key_deletion_success = GPG key has been deleted successfully!
add_on = Added on
valid_until = Valid until
+never = never
last_used = Last used on
no_activity = No recent activity
key_state_desc = This key is used in last 7 days
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl
index b0c3e1bda7..a20bc8e140 100644
--- a/templates/user/settings/keys_gpg.tmpl
+++ b/templates/user/settings/keys_gpg.tmpl
@@ -16,7 +16,7 @@
{{$.i18n.Tr "settings.delete_key"}}
</button>
</div>
- <i class="mega-octicon octicon-key {{if .Expired.After $.PageStartTime}}green{{end}}"></i>
+ <i class="mega-octicon octicon-key {{if or .Expired.IsZero (.Expired.After $.PageStartTime)}}green{{end}}"></i>
<div class="content">
{{range .Emails}}<strong>{{.Email}} </strong>{{end}}
<div class="print meta">
@@ -26,7 +26,7 @@
<div class="activity meta">
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Added}}</span></i>
-
- <i>{{$.i18n.Tr "settings.valid_until"}} <span>{{DateFmtShort .Expired}}</span></i>
+ <i>{{$.i18n.Tr "settings.valid_until"}} <span>{{if not .Expired.IsZero }}{{DateFmtShort .Expired}}{{else}}{{$.i18n.Tr "settings.never"}}{{end}}</span></i>
</div>
</div>
</div>