mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +01:00
Hide composer when disconnected from server
This commit is contained in:
parent
68753afb8e
commit
b3d825c9d1
@ -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…
x
Reference in New Issue
Block a user