mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
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`
|
||||
<section
|
||||
id="buffer-list"
|
||||
|
@ -1373,7 +1381,7 @@ export default class App extends Component {
|
|||
${memberList}
|
||||
<${Composer}
|
||||
ref=${this.composer}
|
||||
readOnly=${activeBuffer && activeBuffer.type == BufferType.SERVER}
|
||||
readOnly=${composerReadOnly}
|
||||
onSubmit=${this.handleComposerSubmit}
|
||||
autocomplete=${this.autocomplete}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue