0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(console): make long text breakable in roles page (#5956)

This commit is contained in:
Xiao Yijun 2024-06-03 10:51:36 +08:00 committed by GitHub
parent ec2df4d3cf
commit 014d7f63c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 12 deletions

View file

@ -1,6 +0,0 @@
@use '@/scss/underscore' as _;
.type,
.description {
@include _.text-ellipsis;
}

View file

@ -12,6 +12,7 @@ import UserRoleIconDark from '@/assets/icons/user-role-dark.svg';
import UserRoleIcon from '@/assets/icons/user-role.svg';
import RolesEmptyDark from '@/assets/images/roles-empty-dark.svg';
import RolesEmpty from '@/assets/images/roles-empty.svg';
import Breakable from '@/components/Breakable';
import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder';
import ItemPreview from '@/components/ItemPreview';
import ListPage from '@/components/ListPage';
@ -28,7 +29,6 @@ import { buildUrl, formatSearchKeyword } from '@/utils/url';
import AssignedEntities from './components/AssignedEntities';
import CreateRoleModal from './components/CreateRoleModal';
import * as styles from './index.module.scss';
const rolesPathname = '/roles';
const createRolePathname = `${rolesPathname}/create`;
@ -107,18 +107,18 @@ function Roles() {
{
title: t('roles.col_type'),
dataIndex: 'type',
colSpan: 5,
colSpan: 4,
render: ({ type }) => (
<div className={styles.type}>
<Breakable>
{type === RoleType.User ? t('roles.type_user') : t('roles.type_machine_to_machine')}
</div>
</Breakable>
),
},
{
title: t('roles.col_description'),
dataIndex: 'description',
colSpan: 5,
render: ({ description }) => <div className={styles.description}>{description}</div>,
colSpan: 6,
render: ({ description }) => <Breakable>{description}</Breakable>,
},
{
title: <span>{t('roles.col_assigned_entities')}</span>,