sforkowany z mirror/soapbox
Display timestamps in mod log
rodzic
9156e01862
commit
6ed87aaf89
|
@ -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>
|
||||||
|
|
|
@ -214,4 +214,10 @@
|
||||||
|
|
||||||
.logentry {
|
.logentry {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
||||||
|
&__timestamp {
|
||||||
|
color: var(--primary-text-color--faint);
|
||||||
|
font-size: 13px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue