Hide composer when disconnected from server
This commit is contained in:
parent
68753afb8e
commit
b3d825c9d1
1 changed files with 9 additions and 1 deletions
|
@ -1338,6 +1338,14 @@ export default class App extends Component {
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var composerReadOnly = false;
|
||||||
|
if (activeBuffer && activeBuffer.type === BufferType.SERVER) {
|
||||||
|
composerReadOnly = true;
|
||||||
|
}
|
||||||
|
if (activeNetwork && activeNetwork.status !== NetworkStatus.REGISTERED) {
|
||||||
|
composerReadOnly = true;
|
||||||
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<section
|
<section
|
||||||
id="buffer-list"
|
id="buffer-list"
|
||||||
|
@ -1373,7 +1381,7 @@ export default class App extends Component {
|
||||||
${memberList}
|
${memberList}
|
||||||
<${Composer}
|
<${Composer}
|
||||||
ref=${this.composer}
|
ref=${this.composer}
|
||||||
readOnly=${activeBuffer && activeBuffer.type == BufferType.SERVER}
|
readOnly=${composerReadOnly}
|
||||||
onSubmit=${this.handleComposerSubmit}
|
onSubmit=${this.handleComposerSubmit}
|
||||||
autocomplete=${this.autocomplete}
|
autocomplete=${this.autocomplete}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue