Skip to content

Commit b4e6002

Browse files
Merge pull request #6076 from Habetdin/staging
Only show active protocols on "last login" in mailbox overview
2 parents 6af907c + 6550f0a commit b4e6002

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

data/web/js/site/mailbox.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,10 @@ jQuery(function($){
888888
item.quota.value = humanFileSize(item.quota_used) + "/" + item.quota.value;
889889

890890
item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox);
891-
item.last_mail_login = item.last_imap_login + '/' + item.last_pop3_login + '/' + item.last_smtp_login + '/' + item.last_sso_login;
891+
item.last_mail_login = (item.attributes.imap_access == 1 ? '<div class="text-start badge bg-info mb-2" style="min-width: 70px;">IMAP @ ' + unix_time_format(Number(item.last_imap_login)) + '</div><br>' : '') +
892+
(item.attributes.pop3_access == 1 ? '<div class="text-start badge bg-info mb-2" style="min-width: 70px;">POP3 @ ' + unix_time_format(Number(item.last_pop3_login)) + '</div><br>' : '') +
893+
(item.attributes.smtp_access == 1 ? '<div class="text-start badge bg-info mb-2" style="min-width: 70px;">SMTP @ ' + unix_time_format(Number(item.last_smtp_login)) + '</div><br>' : '') +
894+
'<div class="text-start badge bg-info" style="min-width: 70px;">SSO @ ' + unix_time_format(Number(item.last_sso_login)) + '</div>';
892895
/*
893896
if (!item.rl) {
894897
item.rl = '∞';
@@ -1004,14 +1007,7 @@ jQuery(function($){
10041007
data: 'last_mail_login',
10051008
searchable: false,
10061009
defaultContent: '',
1007-
responsivePriority: 7,
1008-
render: function (data, type) {
1009-
res = data.split("/");
1010-
return '<div class="text-start badge bg-info mb-2" style="min-width: 70px;">IMAP @ ' + unix_time_format(Number(res[0])) + '</div><br>' +
1011-
'<div class="text-start badge bg-info mb-2" style="min-width: 70px;">POP3 @ ' + unix_time_format(Number(res[1])) + '</div><br>' +
1012-
'<div class="text-start badge bg-info mb-2" style="min-width: 70px;">SMTP @ ' + unix_time_format(Number(res[2])) + '</div><br>' +
1013-
'<div class="text-start badge bg-info" style="min-width: 70px;">SSO @ ' + unix_time_format(Number(res[3])) + '</div>';
1014-
}
1010+
responsivePriority: 7
10151011
},
10161012
{
10171013
title: lang.last_pw_change,

0 commit comments

Comments
 (0)