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

@@ -45,6 +45,11 @@ const SettingsPage = React.createClass({
});
});
}
ipcRenderer.on('add-server', () => {
this.setState({
showAddTeamForm: true
});
});
},
handleTeamsChange(teams) {
this.setState({
@@ -161,7 +166,7 @@ const SettingsPage = React.createClass({
});
},
addTeam(team) {
addServer(team) {
var teams = this.state.teams;
teams.push(team);
this.setState({
@@ -179,7 +184,7 @@ const SettingsPage = React.createClass({
toggleAddTeamForm={this.toggleShowTeamForm}
onTeamsChange={this.handleTeamsChange}
updateTeam={this.updateTeam}
addTeam={this.addTeam}
addServer={this.addServer}
/>
</Col>
</Row>