Hotkey m to toggle assignment to self

This commit is contained in:
Jason Zimdars
2025-12-18 16:47:36 -06:00
parent 2356f61f9b
commit fa2b2fb194
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@
<ul class="popup__list" data-filter-target="list">
<%= render "user", card: @card, user: Current.user, user_label: "Me" do %>
<span class="visually-hidden"><%= Current.user.name %></span>
<kbd class="txt-xx-small hide-on-touch">m</kbd>
<% end %>
<%= render collection: @assigned_to, partial: "user", locals: { card: @card } %>
<% @users.each do |user| %>
@@ -12,6 +12,8 @@
</span>
</button>
<%= button_to "Assign to me", card_assignments_path(card, params: { assignee_id: Current.user.id }), method: :post, data: {controller: "hotkey", action: "keydown.m@document->hotkey#click" }, hidden: true %>
<dialog class="popup panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog" data-action="turbo:before-morph-attribute->dialog#preventCloseOnMorphing turbo:submit-end->dialog#close">
<%= yield %>
</dialog>