mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Various improvements (#325)
* Fix missing translation in roadmap * Fix resizing of textareas * Increase line height for small muted texts * Improve collapsed board list style * Fix switch on top of header (z-index) * Fix margin inconsistencies in site settings * Add user count to site settings
This commit is contained in:
committed by
GitHub
parent
f41f9dd082
commit
a11157295d
@@ -6,7 +6,7 @@ import Box from '../../common/Box';
|
||||
import SiteSettingsInfoBox from '../../common/SiteSettingsInfoBox';
|
||||
|
||||
import { UsersState } from '../../../reducers/usersReducer';
|
||||
import { UserRoles, USER_STATUS_ACTIVE, USER_STATUS_BLOCKED } from '../../../interfaces/IUser';
|
||||
import { UserRoles, USER_STATUS_ACTIVE, USER_STATUS_BLOCKED, USER_STATUS_DELETED } from '../../../interfaces/IUser';
|
||||
import HttpStatus from '../../../constants/http_status';
|
||||
import Spinner from '../../common/Spinner';
|
||||
|
||||
@@ -73,11 +73,24 @@ class UsersSiteSettingsP extends React.Component<Props> {
|
||||
currentUserEmail,
|
||||
} = this.props;
|
||||
|
||||
const numberOfUsers = users.items.length;
|
||||
const numberOfActiveUsers = users.items.filter(u => u.status === USER_STATUS_ACTIVE).length;
|
||||
const numberOfBlockedUsers = users.items.filter(u => u.status === USER_STATUS_BLOCKED).length;
|
||||
const numberOfDeletedUsers = users.items.filter(u => u.status === USER_STATUS_DELETED).length;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box>
|
||||
<h2>{ I18n.t('site_settings.users.title') }</h2>
|
||||
|
||||
<p className="userCount">
|
||||
{numberOfUsers} {I18n.t('activerecord.models.user', {count: users.items.length})}
|
||||
(
|
||||
{numberOfActiveUsers} {I18n.t('site_settings.users.status_active')},
|
||||
{numberOfBlockedUsers} {I18n.t('site_settings.users.status_blocked')},
|
||||
{numberOfDeletedUsers} {I18n.t('site_settings.users.status_deleted')})
|
||||
</p>
|
||||
|
||||
<ul className="usersList">
|
||||
{
|
||||
users.areLoading === false ?
|
||||
|
||||
Reference in New Issue
Block a user