M: Small UI fix
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run

This commit is contained in:
Ivan 2024-10-30 21:48:17 +03:00
parent 06f59e3ed3
commit ba08844ff8
2 changed files with 4 additions and 2 deletions

View File

@ -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>
))} ))}

View File

@ -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