mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
This commit is contained in:
parent
06f59e3ed3
commit
ba08844ff8
|
@ -8,13 +8,15 @@ import { CProps } from '../props';
|
||||||
interface InfoUsersProps extends CProps.Styling {
|
interface InfoUsersProps extends CProps.Styling {
|
||||||
items: UserID[];
|
items: UserID[];
|
||||||
prefix: string;
|
prefix: string;
|
||||||
|
header?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
function InfoUsers({ items, className, prefix, ...restProps }: InfoUsersProps) {
|
function InfoUsers({ items, className, prefix, header, ...restProps }: InfoUsersProps) {
|
||||||
const { getUserLabel } = useUsers();
|
const { getUserLabel } = useUsers();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx('flex flex-col dense', className)} {...restProps}>
|
<div className={clsx('flex flex-col dense', className)} {...restProps}>
|
||||||
|
{header ? <h2>{header}</h2> : null}
|
||||||
{items.map((user, index) => (
|
{items.map((user, index) => (
|
||||||
<div key={`${prefix}${index}`}>{getUserLabel(user)}</div>
|
<div key={`${prefix}${index}`}>{getUserLabel(user)}</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -124,7 +124,7 @@ function EditorLibraryItem({ item, isModified, controller }: EditorLibraryItemPr
|
||||||
disabled={isModified || controller.isProcessing || accessLevel < UserLevel.OWNER}
|
disabled={isModified || controller.isProcessing || accessLevel < UserLevel.OWNER}
|
||||||
/>
|
/>
|
||||||
<Tooltip anchorSelect='#editor_stats' layer='z-modalTooltip'>
|
<Tooltip anchorSelect='#editor_stats' layer='z-modalTooltip'>
|
||||||
<InfoUsers items={item?.editors ?? []} prefix={prefixes.user_editors} />
|
<InfoUsers items={item?.editors ?? []} prefix={prefixes.user_editors} header='Редакторы' />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
<ValueIcon
|
<ValueIcon
|
||||||
|
|
Loading…
Reference in New Issue
Block a user