This commit is contained in:
the-djmaze 2023-01-17 14:26:00 +01:00
parent d41f9d8eee
commit 98996ba4b7
3 changed files with 6 additions and 4 deletions

View file

@ -107,7 +107,7 @@ export const
switch (formatStr) {
case 'FROMNOW':
return fromNow(m);
case 'SHORT': {
case 'AUTO': {
// 4 hours
if (14400000 >= now - time)
return fromNow(m);
@ -119,7 +119,9 @@ export const
{TIME: m.format('LT',0,h)}
)
: m.format(
date.getFullYear() === m.getFullYear() ? {day: '2-digit', month: 'short'} : {dateStyle: 'medium'}
date.getFullYear() === m.getFullYear()
? {day: '2-digit', month: 'short', hour: 'numeric', minute: 'numeric'}
: {dateStyle: 'medium', timeStyle: 'short'}
, 0, h);
}
case 'FULL':

View file

@ -153,7 +153,7 @@ export class MailMessageList extends AbstractViewRight {
return SettingsUserStore.listGrouped() && (sort.includes('DATE') || sort.includes('FROM')) && !uid;
},
timeFormat: () => (FolderUserStore.sortMode() || '').includes('FROM') ? 'SHORT' : 'LT',
timeFormat: () => (FolderUserStore.sortMode() || '').includes('FROM') ? 'AUTO' : 'LT',
groupedList: () => {
let list = [], current, sort = FolderUserStore.sortMode() || 'DATE';

View file

@ -165,7 +165,7 @@
</div>
<div class="sizeParent actionHandle" data-bind="text: friendlySize()"></div>
<div class="threads-len" data-bind="visible: 1 < threadsLen(), text: threadsLen"></div>
<time class="actionHandle" data-moment-format="SHORT" data-bind="moment: dateTimeStampInUTC"></time>
<time class="actionHandle" data-moment-format="AUTO" data-bind="moment: dateTimeStampInUTC"></time>
</div>
</div>
</div>