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) { handleSelect(key) {
if (key === 'addServerButton') {
return;
}
const newKey = (this.props.teams.length + key) % this.props.teams.length; const newKey = (this.props.teams.length + key) % this.props.teams.length;
this.setState({ this.setState({
key: newKey key: newKey

View File

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

View File

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

View File

@@ -42,6 +42,13 @@
padding: 0 15px; 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 .control-label,
.has-error .help-block { .has-error .help-block {