mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-30 08:50:51 +01:00
Group changes
This commit is contained in:
parent
f9714c066f
commit
10e0c92100
@ -105,49 +105,47 @@ export const GroupInformationView: FC<GroupInformationViewProps> = props =>
|
|||||||
if(!groupInformation) return null;
|
if(!groupInformation) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Grid overflow="hidden">
|
||||||
<Grid overflow="hidden">
|
<Column center size={ 3 } overflow="hidden">
|
||||||
<Column center size={ 3 } overflow="hidden">
|
<Flex alignItems="center" overflow="hidden" className="group-badge">
|
||||||
<Flex alignItems="center" overflow="hidden" className="group-badge">
|
<BadgeImageView badgeCode={ groupInformation.badge } isGroup={ true } scale={ 2 } />
|
||||||
<BadgeImageView badgeCode={ groupInformation.badge } isGroup={ true } scale={ 2 } />
|
</Flex>
|
||||||
</Flex>
|
<Column alignItems="center" gap={ 1 }>
|
||||||
<Column alignItems="center" gap={ 1 }>
|
<Text small underline pointer onClick={ () => handleAction('members') }>{ LocalizeText('group.membercount', [ 'totalMembers' ], [ groupInformation.membersCount.toString() ]) }</Text>
|
||||||
<Text small underline pointer onClick={ () => handleAction('members') }>{ LocalizeText('group.membercount', [ 'totalMembers' ], [ groupInformation.membersCount.toString() ]) }</Text>
|
{ (groupInformation.pendingRequestsCount > 0) &&
|
||||||
{ (groupInformation.pendingRequestsCount > 0) &&
|
<Text small underline pointer onClick={ () => handleAction('members_pending') }>{ LocalizeText('group.pendingmembercount', [ 'amount' ], [ groupInformation.pendingRequestsCount.toString() ]) }</Text> }
|
||||||
<Text small underline pointer onClick={ () => handleAction('members_pending') }>{ LocalizeText('group.pendingmembercount', [ 'amount' ], [ groupInformation.pendingRequestsCount.toString() ]) }</Text> }
|
{ groupInformation.isOwner &&
|
||||||
{ groupInformation.isOwner &&
|
<Text small underline pointer onClick={ () => handleAction('manage') }>{ LocalizeText('group.manage') }</Text> }
|
||||||
<Text small underline pointer onClick={ () => handleAction('manage') }>{ LocalizeText('group.manage') }</Text> }
|
|
||||||
</Column>
|
|
||||||
{ getRoleIcon() }
|
|
||||||
</Column>
|
</Column>
|
||||||
<Column size={ 9 } justifyContent="between" overflow="auto">
|
{ getRoleIcon() }
|
||||||
<Column overflow="hidden">
|
</Column>
|
||||||
<Column gap={ 1 }>
|
<Column size={ 9 } justifyContent="between" overflow="auto">
|
||||||
<Flex alignItems="center" gap={ 2 }>
|
<Column overflow="hidden">
|
||||||
<Text bold>{ groupInformation.title }</Text>
|
<Column gap={ 1 }>
|
||||||
<Flex gap={ 1 }>
|
<Flex alignItems="center" gap={ 2 }>
|
||||||
<i className={ 'icon icon-group-type-' + groupInformation.type } />
|
<Text bold>{ groupInformation.title }</Text>
|
||||||
{ groupInformation.canMembersDecorate &&
|
<Flex gap={ 1 }>
|
||||||
<i className="icon icon-group-decorate" /> }
|
<i className={ 'icon icon-group-type-' + groupInformation.type } />
|
||||||
</Flex>
|
{ groupInformation.canMembersDecorate &&
|
||||||
|
<i className="icon icon-group-decorate" /> }
|
||||||
</Flex>
|
</Flex>
|
||||||
<Text small>{ LocalizeText('group.created', ['date', 'owner'], [groupInformation.createdAt, groupInformation.ownerName]) }</Text>
|
</Flex>
|
||||||
</Column>
|
<Text small>{ LocalizeText('group.created', ['date', 'owner'], [groupInformation.createdAt, groupInformation.ownerName]) }</Text>
|
||||||
<Text small overflow="auto" className="group-description">{ groupInformation.description }</Text>
|
|
||||||
</Column>
|
|
||||||
<Column>
|
|
||||||
<Column gap={ 1 }>
|
|
||||||
<Text small underline pointer onClick={ () => handleAction('homeroom') }>{ LocalizeText('group.linktobase') }</Text>
|
|
||||||
<Text small underline pointer onClick={ () => handleAction('furniture') }>{ LocalizeText('group.buyfurni') }</Text>
|
|
||||||
<Text small underline pointer>{ LocalizeText('group.showgroups') }</Text>
|
|
||||||
</Column>
|
|
||||||
{ (groupInformation.type !== GroupType.PRIVATE) &&
|
|
||||||
<Button disabled={ (groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) || isRealOwner() } onClick={ handleButtonClick }>
|
|
||||||
{ LocalizeText(getButtonText()) }
|
|
||||||
</Button> }
|
|
||||||
</Column>
|
</Column>
|
||||||
|
<Text small overflow="auto" className="group-description">{ groupInformation.description }</Text>
|
||||||
</Column>
|
</Column>
|
||||||
</Grid>
|
<Column>
|
||||||
</>
|
<Column gap={ 1 }>
|
||||||
|
<Text small underline pointer onClick={ () => handleAction('homeroom') }>{ LocalizeText('group.linktobase') }</Text>
|
||||||
|
<Text small underline pointer onClick={ () => handleAction('furniture') }>{ LocalizeText('group.buyfurni') }</Text>
|
||||||
|
<Text small underline pointer>{ LocalizeText('group.showgroups') }</Text>
|
||||||
|
</Column>
|
||||||
|
{ (groupInformation.type !== GroupType.PRIVATE) &&
|
||||||
|
<Button disabled={ (groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) || isRealOwner() } onClick={ handleButtonClick }>
|
||||||
|
{ LocalizeText(getButtonText()) }
|
||||||
|
</Button> }
|
||||||
|
</Column>
|
||||||
|
</Column>
|
||||||
|
</Grid>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user