Display timestamps in mod log

jsnes
Alex Gleason 2021-03-15 18:17:00 -05:00
rodzic 9156e01862
commit 6ed87aaf89
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 19 dodań i 2 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl, FormattedDate } from 'react-intl';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePureComponent from 'react-immutable-pure-component';
@ -71,7 +71,18 @@ class ModerationLog extends ImmutablePureComponent {
> >
{items.map((item, i) => ( {items.map((item, i) => (
<div className='logentry' key={i}> <div className='logentry' key={i}>
{item.get('message')} <div className='logentry__message'>{item.get('message')}</div>
<div className='logentry__timestamp'>
<FormattedDate
value={new Date(item.get('time') * 1000)}
hour12={false}
year='numeric'
month='short'
day='2-digit'
hour='2-digit'
minute='2-digit'
/>
</div>
</div> </div>
))} ))}
</ScrollableList> </ScrollableList>

Wyświetl plik

@ -214,4 +214,10 @@
.logentry { .logentry {
padding: 15px; padding: 15px;
&__timestamp {
color: var(--primary-text-color--faint);
font-size: 13px;
text-align: right;
}
} }