Display persistant command input on server buffer
This commit changes the composer to not be read-only on the server buffer, which tells the user that they can send commands from that view. On the server buffer, the placeholder is changed to "Type a command (see /help)", which indicates to the user that this buffer only accepts commands, and gives them a hint for how to learn what commands are available. Implements: https://todo.sr.ht/~emersion/gamja/38
This commit is contained in:
parent
b11f58b975
commit
0b59cf92b9
2 changed files with 13 additions and 5 deletions
|
@ -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`
|
||||
<section
|
||||
id="buffer-list"
|
||||
|
@ -1813,6 +1815,7 @@ export default class App extends Component {
|
|||
readOnly=${composerReadOnly}
|
||||
onSubmit=${this.handleComposerSubmit}
|
||||
autocomplete=${this.autocomplete}
|
||||
commandOnly=${commandOnly}
|
||||
/>
|
||||
${dialog}
|
||||
${error}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue