use prettyLongDate in the eventlog timestamps

This commit is contained in:
Girish Ramakrishnan
2025-10-08 10:54:11 +02:00
parent 90e36c4552
commit 6bc5826c86
4 changed files with 7 additions and 18 deletions

View File

@@ -1,9 +1,8 @@
<script setup>
import { ref, reactive, onMounted, watch } from 'vue';
import moment from 'moment';
import { Button, TextInput, MultiSelect } from '@cloudron/pankow';
import { useDebouncedRef, prettyEmailAddresses } from '@cloudron/pankow/utils';
import { useDebouncedRef, prettyEmailAddresses, prettyLongDate } from '@cloudron/pankow/utils';
import MailModel from '../models/MailModel.js';
const mailModel = MailModel.create();
@@ -22,7 +21,6 @@ const availableTypes = [
const refreshBusy = ref(false);
const eventlogs = ref([]);
const activeId = ref('');
const search = useDebouncedRef('');
const page = ref(1);
const perPage = ref(20);
@@ -79,8 +77,7 @@ onMounted(async () => {
<thead>
<tr>
<th style="width: 5%"><!-- Icon --></th>
<th style="width: 7%">{{ $t('emails.eventlog.time') }}</th>
<th style="width: 7%"></th>
<th style="width: 14%">{{ $t('emails.eventlog.time') }}</th>
<th style="width: 26%">{{ $t('emails.eventlog.mailFrom') }}</th>
<th style="width: 25%">{{ $t('emails.eventlog.rcptTo') }}</th>
<th style="width: 30%">{{ $t('emails.eventlog.details') }}</th>
@@ -101,8 +98,7 @@ onMounted(async () => {
<i class="fas fa-filter" v-if="eventlog.type === 'spam-learn'" v-tooltip="$t('emails.eventlog.type.spamFilterTrained')"></i>
<i class="fas fa-fill-drip" v-if="eventlog.type === 'quota'" v-tooltip="$t('emails.eventlog.type.quota')"></i>
</td>
<td class="no-wrap">{{ moment(eventlog.ts).format('DD.MM.YYYY') }}</td>
<td class="no-wrap">{{ moment(eventlog.ts).format('HH:mm:SS') }}</td>
<td class="no-wrap">{{ prettyLongDate(eventlog.ts) }}</td>
<td class="elide-table-cell">{{ prettyEmailAddresses(eventlog.mailFrom) || '-' }}</td>
<td class="elide-table-cell">{{ prettyEmailAddresses(eventlog.rcptTo) || eventlog.mailbox || '-' }}</td>
<td>