mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Extract error message popup
This commit is contained in:
parent
194168c062
commit
996d7d06d4
1 changed files with 8 additions and 3 deletions
|
@ -947,6 +947,13 @@ export default class App extends Component {
|
|||
`;
|
||||
}
|
||||
|
||||
var error = null;
|
||||
if (this.state.error) {
|
||||
error = html`
|
||||
<p id="error-msg">${this.state.error} <a href="#" onClick=${this.dismissError}>×</a></p>
|
||||
`;
|
||||
}
|
||||
|
||||
return html`
|
||||
<section id="buffer-list">
|
||||
<${BufferList} buffers=${this.state.buffers} networks=${this.state.networks} activeBuffer=${this.state.activeBuffer} onBufferClick=${this.handleBufferListClick}/>
|
||||
|
@ -959,9 +966,7 @@ export default class App extends Component {
|
|||
</>
|
||||
${memberList}
|
||||
<${Composer} ref=${this.composer} readOnly=${activeBuffer && activeBuffer.type == BufferType.SERVER} onSubmit=${this.handleComposerSubmit} autocomplete=${this.autocomplete}/>
|
||||
${this.state.error ? html`
|
||||
<p id="error-msg">${this.state.error} <a href="#" onClick=${this.dismissError}>×</a></p>
|
||||
` : null}
|
||||
${error}
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue