Files
fizzy/app/views/commands/_command.html.erb
T
2025-07-10 14:44:22 -05:00

14 lines
864 B
Plaintext

<%= tag.li class: "min-width full-width flex gap-half terminal__item justify-start", tabindex: 0, data: {
action: "keydown.enter->terminal#restoreCommand:prevent keydown.enter->toggle-class#remove:prevent",
navigable_list_target: "item" } do %>
<%= button_tag type: "button", class: "btn btn--plain terminal__command flex-item-grow justify-start",
data: { action: "toggle-class#remove terminal#restoreCommand", line: command.line }, tabindex: -1 do %>
<span class="overflow-ellipsis"><%= command.title %></span>
<% end %>
<% if command.undoable? %>
<%= button_to "Undo", command_undo_path(command), class: "btn btn--plain terminal__button flex-item-justify-end",
data: { action: "toggle-class#remove", turbo_confirm: "Are you sure you want to undo '#{command.title}'?", turbo_frame: "_top" } %>
<% end %>
<% end %>