Merge pull request #442 from jnugh/newServerModalWarnings

New server modal warnings
This commit is contained in:
Yuya Ochiai
2017-03-17 00:25:12 +09:00
committed by GitHub
4 changed files with 29 additions and 13 deletions

View File

@@ -142,6 +142,9 @@ const MainPage = React.createClass({
}
},
handleSelect(key) {
if (key === 'addServerButton') {
return;
}
const newKey = (this.props.teams.length + key) % this.props.teams.length;
this.setState({
key: newKey

View File

@@ -105,8 +105,8 @@ class NewTeamModal extends React.Component {
render() {
const noBottomSpaceing = {
'padding-bottom': 0,
'margin-bottom': 0
paddingBottom: 0,
marginBottom: 0
};
if (this.wasShown !== this.props.show && this.props.show) {
@@ -202,8 +202,8 @@ NewTeamModal.propTypes = {
onClose: React.PropTypes.func,
onSave: React.PropTypes.func,
team: React.PropTypes.object,
editMode: React.PropTypes.boolean,
show: React.PropTypes.boolean
editMode: React.PropTypes.bool,
show: React.PropTypes.bool
};
module.exports = NewTeamModal;

View File

@@ -90,21 +90,27 @@ class TabBar extends React.Component {
width: '40px',
color: '#999',
fontWeight: 'bold',
margin: '6px 0 0',
margin: '0',
borderRadius: '2px 2px 0 0',
outline: 'none'
};
return (
<NavItem
className='buttonTab'
key='addServerButton'
eventKey='addServerButton'
>
<Button
id='tabBarAddNewTeam'
onClick={this.props.onAddServer}
style={tabButton}
bsStyle='tabButton'
className='btn-tabButton'
title='Add new server'
>
{'+'}
</Button>
</NavItem>
);
}
}

View File

@@ -42,6 +42,13 @@
padding: 0 15px;
}
.nav-tabs>li.buttonTab>a {
border: none;
background: transparent;
margin-left: 1px; /*Has no border and would be placed above the last item's border due to it's margin-right: -1px */
padding: 0;
margin-bottom: 1px;
}
.has-error .control-label,
.has-error .help-block {