mirror of
https://github.com/wassname/talk.git
synced 2026-07-09 21:02:50 +08:00
added support for new system icon
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.action, .system {
|
||||
.action {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import orderBy from 'lodash/orderBy';
|
||||
import has from 'lodash/has';
|
||||
import moment from 'moment';
|
||||
import t from 'coral-framework/services/i18n';
|
||||
import { Icon } from 'coral-ui';
|
||||
|
||||
const buildUserHistory = (userState = {}) => {
|
||||
return orderBy(
|
||||
@@ -56,10 +57,14 @@ const buildActionResponse = (typename, created_at, until, status) => {
|
||||
}
|
||||
};
|
||||
|
||||
const hasUsername = user => has(user, 'username');
|
||||
|
||||
const getModerationValue = assignedBy =>
|
||||
hasUsername(assignedBy) ? assignedBy.username : t('account_history.system');
|
||||
has(assignedBy, 'username') ? (
|
||||
assignedBy.username
|
||||
) : (
|
||||
<span>
|
||||
<Icon name="computer" /> {t('account_history.system')}
|
||||
</span>
|
||||
);
|
||||
|
||||
class AccountHistory extends React.Component {
|
||||
render() {
|
||||
@@ -81,7 +86,7 @@ class AccountHistory extends React.Component {
|
||||
{t('account_history.action')}
|
||||
</div>
|
||||
<div className={styles.headerRowItem}>
|
||||
{t('account_history.actor')}
|
||||
{t('account_history.taken_by')}
|
||||
</div>
|
||||
</div>
|
||||
{userHistory.map(
|
||||
@@ -111,7 +116,6 @@ class AccountHistory extends React.Component {
|
||||
className={cn(
|
||||
styles.item,
|
||||
styles.username,
|
||||
!hasUsername(assigned_by) && styles.system,
|
||||
'talk-admin-account-history-row-assigned-by'
|
||||
)}
|
||||
>
|
||||
|
||||
+2
-2
@@ -442,10 +442,10 @@ en:
|
||||
username_status: "Username {0}"
|
||||
suspended: "Suspended, {0}"
|
||||
suspension_removed: "Suspension removed"
|
||||
system: "SYSTEM"
|
||||
system: "System"
|
||||
date: "Date"
|
||||
action: "Action"
|
||||
actor: "Actor"
|
||||
taken_by: "Taken By"
|
||||
user_impersonating: "This user is impersonating"
|
||||
user_no_comment: "You've never left a comment. Join the conversation!"
|
||||
username_offensive: "This username is offensive"
|
||||
|
||||
Reference in New Issue
Block a user