Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions packages/console/src/pages/Roles/index.module.scss

This file was deleted.

12 changes: 6 additions & 6 deletions packages/console/src/pages/Roles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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`;
Expand Down Expand Up @@ -107,18 +107,18 @@ function Roles() {
{
title: t('roles.col_type'),
dataIndex: 'type',
colSpan: 5,
colSpan: 4,
render: ({ type }) => (
<div className={styles.type}>
xiaoyijun marked this conversation as resolved.
Show resolved Hide resolved
<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>,
xiaoyijun marked this conversation as resolved.
Show resolved Hide resolved
colSpan: 6,
render: ({ description }) => <Breakable>{description}</Breakable>,
},
{
title: <span>{t('roles.col_assigned_entities')}</span>,
Expand Down
Loading