From dc8f95c74d4ce7ccfd88f4843b97dfd0e6bddc0c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 22 Jun 2021 13:38:05 +0200 Subject: [PATCH] Improve composer form indentation --- commands.js | 2 +- components/composer.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/commands.js b/commands.js index 119c42d..688033b 100644 --- a/commands.js +++ b/commands.js @@ -44,7 +44,7 @@ function setUserHostMode(app, args, mode) { } function markServerBufferUnread(app) { - var activeBuffer = app.state.buffers.get(app.state.activeBuffer); + let activeBuffer = app.state.buffers.get(app.state.activeBuffer); if (!activeBuffer || activeBuffer.type === BufferType.SERVER) { return; } diff --git a/components/composer.js b/components/composer.js index a6d89a6..4528d43 100644 --- a/components/composer.js +++ b/components/composer.js @@ -83,8 +83,18 @@ export default class Composer extends Component { } render() { + let className = ""; + if (this.props.readOnly && !this.state.text) { + className = "read-only"; + } + return html` -
+