Browse Source

Handle display of GPG key without end date (#1628)

for-closed-social
Antoine GIRARD 7 years ago
committed by Lunny Xiao
parent
commit
431b26f6d7
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +2
    -2
      templates/user/settings/keys_gpg.tmpl

+ 1
- 0
options/locale/locale_en-US.ini View File

@ -377,6 +377,7 @@ ssh_key_deletion_success = SSH key has been deleted successfully!
gpg_key_deletion_success = GPG key has been deleted successfully! gpg_key_deletion_success = GPG key has been deleted successfully!
add_on = Added on add_on = Added on
valid_until = Valid until valid_until = Valid until
never = never
last_used = Last used on last_used = Last used on
no_activity = No recent activity no_activity = No recent activity
key_state_desc = This key is used in last 7 days key_state_desc = This key is used in last 7 days

+ 2
- 2
templates/user/settings/keys_gpg.tmpl View File

@ -16,7 +16,7 @@
{{$.i18n.Tr "settings.delete_key"}} {{$.i18n.Tr "settings.delete_key"}}
</button> </button>
</div> </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"> <div class="content">
{{range .Emails}}<strong>{{.Email}} </strong>{{end}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}
<div class="print meta"> <div class="print meta">
@ -26,7 +26,7 @@
<div class="activity meta"> <div class="activity meta">
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Added}}</span></i> <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> </div>
</div> </div>

Loading…
Cancel
Save