Inform about commands not found
This commit is contained in:
parent
7e080f2c99
commit
41d6099d89
9 changed files with 68 additions and 55 deletions
|
@ -7,34 +7,27 @@ export default class TabListItem extends PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { target, content, selected } = this.props;
|
||||
const { target, content, selected, connected } = this.props;
|
||||
const classes = [];
|
||||
const style = {};
|
||||
|
||||
if (!target) {
|
||||
classes.push('tab-server');
|
||||
|
||||
if (connected) {
|
||||
style.color = '#6BB758';
|
||||
} else {
|
||||
style.color = '#F6546A';
|
||||
}
|
||||
}
|
||||
|
||||
if (selected) {
|
||||
classes.push('selected');
|
||||
}
|
||||
|
||||
let indicator = null;
|
||||
if (this.props.connected !== undefined) {
|
||||
const style = {};
|
||||
|
||||
if (this.props.connected) {
|
||||
style.background = '#6BB758';
|
||||
} else {
|
||||
style.background = '#F6546A';
|
||||
}
|
||||
|
||||
indicator = <i className="tab-indicator" style={style} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<p className={classes.join(' ')} onClick={this.handleClick}>
|
||||
<p className={classes.join(' ')} style={style} onClick={this.handleClick}>
|
||||
<span className="tab-content">{content}</span>
|
||||
{indicator}
|
||||
</p>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue