Improve composer form indentation

This commit is contained in:
Simon Ser 2021-06-22 13:38:05 +02:00
parent 7d15525c7d
commit dc8f95c74d
2 changed files with 12 additions and 2 deletions

View File

@ -44,7 +44,7 @@ function setUserHostMode(app, args, mode) {
} }
function markServerBufferUnread(app) { 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) { if (!activeBuffer || activeBuffer.type === BufferType.SERVER) {
return; return;
} }

View File

@ -83,8 +83,18 @@ export default class Composer extends Component {
} }
render() { render() {
let className = "";
if (this.props.readOnly && !this.state.text) {
className = "read-only";
}
return html` return html`
<form id="composer" class="${this.props.readOnly && !this.state.text ? "read-only" : ""}" onInput=${this.handleInput} onSubmit=${this.handleSubmit}> <form
id="composer"
class=${className}
onInput=${this.handleInput}
onSubmit=${this.handleSubmit}
>
<input <input
type="text" type="text"
name="text" name="text"