diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-03 00:05:38 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-08-03 00:05:38 +0800 |
commit | 85c9f1301f989b3a774ee8f72123dac7603a3ada (patch) | |
tree | 761b16b394a51df06e3180e3c818ea98ebbf93c5 /src/client/util/GroupMemberView.tsx | |
parent | 1987cf9c4585fce9fe897c5146ebed1bf45ecd64 (diff) | |
parent | 63fd10d0940331d68a9ce58b4b77734b11e393f5 (diff) |
Merge branch 'master' into presentation_updates
Diffstat (limited to 'src/client/util/GroupMemberView.tsx')
-rw-r--r-- | src/client/util/GroupMemberView.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/util/GroupMemberView.tsx b/src/client/util/GroupMemberView.tsx index f20670c4e..531ef988a 100644 --- a/src/client/util/GroupMemberView.tsx +++ b/src/client/util/GroupMemberView.tsx @@ -29,13 +29,17 @@ export default class GroupMemberView extends React.Component<GroupMemberViewProp const options: UserOptions[] = this.props.group ? GroupManager.Instance.options.filter(option => !(JSON.parse(StrCast(this.props.group.members)) as string[]).includes(option.value)) : []; + const hasEditAccess = GroupManager.Instance.hasEditAccess(this.props.group); + return (!this.props.group ? null : <div className="editing-interface"> <div className="editing-header"> <input className="group-title" + style={{ marginLeft: !hasEditAccess ? "-14%" : 0 }} value={StrCast(this.props.group.groupName)} onChange={e => this.props.group.groupName = e.currentTarget.value} + disabled={!hasEditAccess} > </input> <div className={"memberView-closeButton"} onClick={action(this.props.onCloseButtonClick)}> @@ -65,12 +69,15 @@ export default class GroupMemberView extends React.Component<GroupMemberViewProp null} <div className="sort-emails" + style={{ paddingTop: hasEditAccess ? 0 : 35 }} onClick={action(() => this.memberSort = this.memberSort === "ascending" ? "descending" : this.memberSort === "descending" ? "none" : "ascending")}> Emails {this.memberSort === "ascending" ? "↑" : this.memberSort === "descending" ? "↓" : ""} {/* → */} </div> </div> <hr /> - <div className="editing-contents"> + <div className="editing-contents" + style={{ height: hasEditAccess ? "62%" : "85%" }} + > {members.map(member => ( <div className="editing-row" @@ -79,7 +86,7 @@ export default class GroupMemberView extends React.Component<GroupMemberViewProp <div className="user-email"> {member} </div> - {GroupManager.Instance.hasEditAccess(this.props.group) ? + {hasEditAccess ? <div className={"remove-button"} onClick={() => GroupManager.Instance.removeMemberFromGroup(this.props.group, member)}> <FontAwesomeIcon icon={fa.faTrashAlt} size={"sm"} /> </div> |