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:
Riccardo Graziosi
2024-04-10 23:28:58 +02:00
committed by GitHub
parent f41f9dd082
commit a11157295d
16 changed files with 57 additions and 11 deletions

View File

@@ -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})}
&nbsp;(
{numberOfActiveUsers} {I18n.t('site_settings.users.status_active')},&nbsp;
{numberOfBlockedUsers} {I18n.t('site_settings.users.status_blocked')},&nbsp;
{numberOfDeletedUsers} {I18n.t('site_settings.users.status_deleted')})
</p>
<ul className="usersList">
{
users.areLoading === false ?