Show last IRC connection error in status tab, log IRC connection errors
This commit is contained in:
parent
786d8013b9
commit
18aff3ded6
19 changed files with 294 additions and 189 deletions
|
@ -55,6 +55,7 @@ export default class Chat extends Component {
|
|||
nick,
|
||||
search,
|
||||
showUserList,
|
||||
status,
|
||||
tab,
|
||||
title,
|
||||
users,
|
||||
|
@ -81,6 +82,7 @@ export default class Chat extends Component {
|
|||
<div className={chatClass}>
|
||||
<ChatTitle
|
||||
channel={channel}
|
||||
status={status}
|
||||
tab={tab}
|
||||
title={title}
|
||||
onCloseClick={this.handleCloseClick}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { linkify } from 'util';
|
|||
|
||||
export default class ChatTitle extends PureComponent {
|
||||
render() {
|
||||
const { title, tab, channel, onTitleChange,
|
||||
const { status, title, tab, channel, onTitleChange,
|
||||
onToggleSearch, onToggleUserList, onCloseClick } = this.props;
|
||||
|
||||
let closeTitle;
|
||||
|
@ -19,6 +19,11 @@ export default class ChatTitle extends PureComponent {
|
|||
closeTitle = 'Disconnect';
|
||||
}
|
||||
|
||||
let serverError = null;
|
||||
if (!tab.name && status.error) {
|
||||
serverError = <span className="error">Error! {status.error}</span>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="chat-title-bar">
|
||||
|
@ -34,6 +39,7 @@ export default class ChatTitle extends PureComponent {
|
|||
</Editable>
|
||||
<div className="chat-topic-wrap">
|
||||
<span className="chat-topic">{linkify(channel.get('topic')) || null}</span>
|
||||
{serverError}
|
||||
</div>
|
||||
<i className="icon-search" title="Search" onClick={onToggleSearch} />
|
||||
<i
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue