diff --git a/components/app.js b/components/app.js index 2b98575..55d4087 100644 --- a/components/app.js +++ b/components/app.js @@ -1759,13 +1759,15 @@ export default class App extends Component { } let composerReadOnly = false; - if (activeBuffer && activeBuffer.type === BufferType.SERVER) { - composerReadOnly = true; - } if (activeServer && activeServer.status !== ServerStatus.REGISTERED) { composerReadOnly = true; } + let commandOnly = false + if (activeBuffer && activeBuffer.type === BufferType.SERVER) { + commandOnly = true + } + return html`
${dialog} ${error} diff --git a/components/composer.js b/components/composer.js index b9f5ee8..f029381 100644 --- a/components/composer.js +++ b/components/composer.js @@ -143,7 +143,7 @@ export default class Composer extends Component { return; } - if (this.props.readOnly && event.key !== "/") { + if (this.props.readOnly || (this.props.commandOnly && event.key !== "/")) { return; } @@ -201,6 +201,11 @@ export default class Composer extends Component { className = "read-only"; } + let placeholder = "Type a message"; + if (this.props.commandOnly) { + placeholder = "Type a command (see /help)"; + } + return html`