Move terminal output outside of the frame so that it doesn't gets erased when reloading the frame
This commit is contained in:
@@ -164,6 +164,7 @@ export default class extends Controller {
|
||||
|
||||
#showOutput(html) {
|
||||
this.element.classList.add(this.outputClass)
|
||||
console.debug("PUT ON ", this.outputTarget);
|
||||
this.outputTarget.innerHTML = html
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
toggle_class_toggle_class: "terminal--open",
|
||||
action: "keydown->terminal#handleKeyPress keydown->navigable-list#navigate focusin->navigable-list#select keydown.esc->toggle-class#remove:stop keydown.esc->terminal#focus keydown.esc->navigable-list#selectLast keydown.esc@document->terminal#hideMenus" } do %>
|
||||
<%= turbo_frame_tag :recent_commands, src: commands_path, data: { terminal_target: "recentCommands" } %>
|
||||
<div class="terminal--output" data-terminal-target="output"></div>
|
||||
|
||||
<%= render "commands/form" %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<%= turbo_frame_tag :recent_commands do %>
|
||||
<ul class="terminal__menu flex-column txt-align-start margin-none margin-block-end unpad" aria-label="Recent commands"><%= render partial: "commands/command", collection: @commands %></ul>
|
||||
|
||||
<div class="terminal--output" data-terminal-target="output"></div>
|
||||
<%= render "commands/help" %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user