31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
<%= form_tag commands_path,
|
|
id: "commands_form",
|
|
class: [ "flex align-center gap-half" ],
|
|
data: {
|
|
controller: "form",
|
|
terminal_target: "form",
|
|
action: "
|
|
keydown.enter->terminal#submitCommand
|
|
turbo:submit-start->terminal#commandSubmitted
|
|
turbo:submit-end->terminal#focus
|
|
keydown.meta+k@document->terminal#focus:prevent
|
|
keydown.ctrl+k@document->terminal#focus:prevent
|
|
turbo:submit-end->terminal#handleCommandResponse
|
|
"
|
|
} do %>
|
|
<%= rich_textarea_tag "command", nil,
|
|
toolbar: false,
|
|
class: "terminal__input input hide-focus-ring fill-transparent unpad",
|
|
"single-line": true,
|
|
id: "command",
|
|
attachments: false,
|
|
data: {
|
|
terminal_target: "input"
|
|
},
|
|
placeholder: platform.desktop? ? "Press #{ hotkey_label(["ctrl", "K"]) } to search or type /commands…" : "Search or type /commands…",
|
|
spellcheck: "false" do %>
|
|
<%= global_mentions_prompt %>
|
|
<%= tags_prompt %>
|
|
<% end %>
|
|
<% end %>
|