Added invite option to room's context menu
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
This commit is contained in:
parent
a87e637666
commit
f420c85985
2 changed files with 20 additions and 1 deletions
|
@ -188,6 +188,10 @@ limitations under the License.
|
||||||
.mx_RoomTile_iconSettings::before {
|
.mx_RoomTile_iconSettings::before {
|
||||||
mask-image: url('$(res)/img/element-icons/settings.svg');
|
mask-image: url('$(res)/img/element-icons/settings.svg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mx_RoomTile_iconInvite::before {
|
||||||
|
mask-image: url('$(res)/img/element-icons/room/invite.svg');
|
||||||
|
}
|
||||||
|
|
||||||
.mx_RoomTile_iconSignOut::before {
|
.mx_RoomTile_iconSignOut::before {
|
||||||
mask-image: url('$(res)/img/element-icons/leave.svg');
|
mask-image: url('$(res)/img/element-icons/leave.svg');
|
||||||
|
|
|
@ -331,6 +331,17 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
||||||
this.setState({generalMenuPosition: null}); // hide the menu
|
this.setState({generalMenuPosition: null}); // hide the menu
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private onInviteClick = (ev: ButtonEvent) => {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
|
||||||
|
dis.dispatch({
|
||||||
|
action: 'view_invite',
|
||||||
|
roomId: this.props.room.roomId,
|
||||||
|
});
|
||||||
|
this.setState({generalMenuPosition: null}); // hide the menu
|
||||||
|
};
|
||||||
|
|
||||||
private async saveNotifState(ev: ButtonEvent, newState: Volume) {
|
private async saveNotifState(ev: ButtonEvent, newState: Volume) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
@ -470,7 +481,11 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
||||||
label={lowPriorityLabel}
|
label={lowPriorityLabel}
|
||||||
iconClassName="mx_RoomTile_iconArrowDown"
|
iconClassName="mx_RoomTile_iconArrowDown"
|
||||||
/>
|
/>
|
||||||
|
<IconizedContextMenuOption
|
||||||
|
onClick={this.onInviteClick}
|
||||||
|
label={_t("Invite to this room")}
|
||||||
|
iconClassName="mx_RoomTile_iconInvite"
|
||||||
|
/>
|
||||||
<IconizedContextMenuOption
|
<IconizedContextMenuOption
|
||||||
onClick={this.onOpenRoomSettings}
|
onClick={this.onOpenRoomSettings}
|
||||||
label={_t("Settings")}
|
label={_t("Settings")}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue