wire up view_group_grid action from community context menu to new view
This commit is contained in:
parent
d4748c91df
commit
399d3c5c24
4 changed files with 34 additions and 1 deletions
|
@ -34,6 +34,7 @@ export default class TagTileContextMenu extends React.Component {
|
|||
|
||||
this._onViewCommunityClick = this._onViewCommunityClick.bind(this);
|
||||
this._onRemoveClick = this._onRemoveClick.bind(this);
|
||||
this._onViewAsGridClick = this._onViewAsGridClick.bind(this);
|
||||
}
|
||||
|
||||
_onViewCommunityClick() {
|
||||
|
@ -53,6 +54,14 @@ export default class TagTileContextMenu extends React.Component {
|
|||
this.props.onFinished();
|
||||
}
|
||||
|
||||
_onViewAsGridClick() {
|
||||
dis.dispatch({
|
||||
action: 'view_group_grid',
|
||||
group_id: this.props.tag,
|
||||
});
|
||||
this.props.onFinished();
|
||||
}
|
||||
|
||||
render() {
|
||||
const TintableSvg = sdk.getComponent("elements.TintableSvg");
|
||||
return <div>
|
||||
|
@ -65,6 +74,9 @@ export default class TagTileContextMenu extends React.Component {
|
|||
/>
|
||||
{ _t('View Community') }
|
||||
</div>
|
||||
<div className="mx_TagTileContextMenu_item" onClick={this._onViewAsGridClick} >
|
||||
{ _t('View as grid') }
|
||||
</div>
|
||||
<hr className="mx_TagTileContextMenu_separator" />
|
||||
<div className="mx_TagTileContextMenu_item" onClick={this._onRemoveClick} >
|
||||
<img className="mx_TagTileContextMenu_item_icon" src="img/icon_context_delete.svg" width="15" height="15" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue