Add Menu bar option to add a new team

This commit is contained in:
Jonas Schwabe
2017-01-30 22:16:16 +01:00
parent 872959af97
commit d63fdccb00
5 changed files with 34 additions and 14 deletions

View File

@@ -130,6 +130,10 @@ const MainPage = React.createClass({
mattermost.goForward();
}
});
ipcRenderer.on('add-server', () => {
this.addServer();
});
},
componentDidUpdate(prevProps, prevState) {
if (prevState.key !== this.state.key) { // i.e. When tab has been changed
@@ -240,7 +244,7 @@ const MainPage = React.createClass({
this.setState({targetURL});
}
},
addTeam() {
addServer() {
this.setState({
showNewTeamModal: true
});
@@ -261,7 +265,7 @@ const MainPage = React.createClass({
mentionAtActiveCounts={this.state.mentionAtActiveCounts}
activeKey={this.state.key}
onSelect={this.handleSelect}
onAddTeam={this.addTeam}
onAddServer={this.addServer}
/>
</Row>
);