mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
Don't show add widget if there are more than one existing widgets
This commit is contained in:
parent
dc4f321707
commit
e9f110a4c5
@ -140,18 +140,21 @@ module.exports = React.createClass({
|
||||
userId={this.props.userId}
|
||||
/>);
|
||||
|
||||
const addWidget = this.state.apps && this.state.apps.length < 2 &&
|
||||
(<div onClick={this.onClickAddWidget}
|
||||
role="button"
|
||||
tabIndex="0"
|
||||
className="mx_AddWidget_button"
|
||||
title="Add a widget">
|
||||
[+] Add a widget
|
||||
</div>);
|
||||
|
||||
return (
|
||||
<div className="mx_AppsDrawer">
|
||||
<div id="apps" className="mx_AppsContainer">
|
||||
{apps}
|
||||
</div>
|
||||
<div onClick={this.onClickAddWidget}
|
||||
role="button"
|
||||
tabIndex="0"
|
||||
className="mx_AddWidget_button"
|
||||
title="Add a widget">
|
||||
[+] Add a widget
|
||||
</div>
|
||||
{addWidget}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user