Skip to content

Commit

Permalink
Merge pull request #6076 from Habetdin/staging
Browse files Browse the repository at this point in the history
Only show active protocols on "last login" in mailbox overview
  • Loading branch information
FreddleSpl0it authored Nov 21, 2024
2 parents 6af907c + 6550f0a commit b4e6002
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions data/web/js/site/mailbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,10 @@ jQuery(function($){
item.quota.value = humanFileSize(item.quota_used) + "/" + item.quota.value;

item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox);
item.last_mail_login = item.last_imap_login + '/' + item.last_pop3_login + '/' + item.last_smtp_login + '/' + item.last_sso_login;
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>' : '') +
(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>' : '') +
(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>' : '') +
'<div class="text-start badge bg-info" style="min-width: 70px;">SSO @ ' + unix_time_format(Number(item.last_sso_login)) + '</div>';
/*
if (!item.rl) {
item.rl = '∞';
Expand Down Expand Up @@ -1004,14 +1007,7 @@ jQuery(function($){
data: 'last_mail_login',
searchable: false,
defaultContent: '',
responsivePriority: 7,
render: function (data, type) {
res = data.split("/");
return '<div class="text-start badge bg-info mb-2" style="min-width: 70px;">IMAP @ ' + unix_time_format(Number(res[0])) + '</div><br>' +
'<div class="text-start badge bg-info mb-2" style="min-width: 70px;">POP3 @ ' + unix_time_format(Number(res[1])) + '</div><br>' +
'<div class="text-start badge bg-info mb-2" style="min-width: 70px;">SMTP @ ' + unix_time_format(Number(res[2])) + '</div><br>' +
'<div class="text-start badge bg-info" style="min-width: 70px;">SSO @ ' + unix_time_format(Number(res[3])) + '</div>';
}
responsivePriority: 7
},
{
title: lang.last_pw_change,
Expand Down

0 comments on commit b4e6002

Please sign in to comment.