Inform about commands not found
This commit is contained in:
parent
7e080f2c99
commit
41d6099d89
9 changed files with 68 additions and 55 deletions
|
@ -34,7 +34,9 @@ export default class TabList extends PureComponent {
|
|||
/>
|
||||
));
|
||||
|
||||
if (privateChats.has(address)) {
|
||||
if (privateChats.has(address) && privateChats.get(address).size > 0) {
|
||||
tabs.push(<div className="tab-label">Private messages</div>);
|
||||
|
||||
privateChats.get(address).forEach(nick => tabs.push(
|
||||
<TabListItem
|
||||
key={address + nick}
|
||||
|
|
|
@ -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