@@ -5,7 +5,7 @@ module HotkeysHelper
|
||||
if key == "ctrl" && platform.mac?
|
||||
"⌘"
|
||||
elsif key == "enter"
|
||||
"⏎"
|
||||
platform.mac? ? "return" : "enter"
|
||||
elsif key == "shift"
|
||||
"⇧"
|
||||
else
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<% content_for :header do %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to account_join_code_path, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<%= link_to account_join_code_path, class: "btn btn--back borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis flex align-center">
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<strong>Back to Invite link</strong>
|
||||
<kbd class="txt-x-small margin-inline-start hide-on-touch">←</kbd>
|
||||
</span>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<% content_for :header do %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to account_settings_path, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<%= link_to account_settings_path, class: "btn btn--back borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis flex align-center">
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<strong>Back to Account Settings</strong>
|
||||
<kbd class="txt-x-small margin-inline-start hide-on-touch">←</kbd>
|
||||
</span>
|
||||
@@ -30,7 +31,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="center flex align-center gap">
|
||||
<div class="center flex flex-wrap justify-center align-center gap">
|
||||
<%= tag.button class: "btn btn--link", data: {
|
||||
controller: "copy-to-clipboard", action: "copy-to-clipboard#copy",
|
||||
copy_to_clipboard_success_class: "btn--success", copy_to_clipboard_content_value: url } do %>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<%= form.button class: "comment__submit btn btn--reversed",
|
||||
data: { form_target: "submit" }, disabled: true do %>
|
||||
<span>Post</span>
|
||||
<kbd class="txt-x-small hide-on-touch"><%= hotkey_label([ "ctrl", "enter" ]) %></kbd>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<%= form.rich_textarea :body, required: true, autofocus: true, placeholder: new_comment_placeholder(@card) do %>
|
||||
<%= general_prompts(@card.board) %>
|
||||
<% end %>
|
||||
<div class="flex gap-half justify-start">
|
||||
<div class="flex gap-half justify-start align-center">
|
||||
<%= form.button class: "btn btn--reversed", type: :submit do %>
|
||||
<span>Save changes</span>
|
||||
<span>Save</span>
|
||||
<% end %>
|
||||
<%= link_to card_comment_path(@card, @comment), class: "btn", data: { form_target: "cancel" } do %>
|
||||
<span>Cancel</span>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
form: { data: { controller: "form" } },
|
||||
data: { form_target: "submit", controller: "clicker", action: "keydown.ctrl+enter@document->clicker#click keydown.meta+enter@document->clicker#click" } do %>
|
||||
<span>Create card</span>
|
||||
<kbd class="txt-x-small hide-on-touch"><%= hotkey_label([ "ctrl", "enter" ]) %></kbd>
|
||||
<% end %>
|
||||
|
||||
<%= button_to card_publish_path(card), method: :post, class: "btn btn--reversed", name: "creation_type", value: "add_another",
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<% content_for :header do %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to user_path(@user), class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<%= link_to user_path(@user), class: "btn btn--back borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis flex align-center">
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<strong>Back to profile</strong>
|
||||
<kbd class="txt-x-small margin-inline-start hide-on-touch">←</kbd>
|
||||
</span>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<% content_for :header do %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to edit_user_path(@user, script_name: @user.account.slug), class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<%= link_to edit_user_path(@user, script_name: @user.account.slug), class: "btn btn--back borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis flex align-center">
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<strong>Back to My profile</strong>
|
||||
<kbd class="txt-x-small margin-inline-start hide-on-touch">←</kbd>
|
||||
</span>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
<% content_for :header do %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to board_webhooks_path, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<%= link_to board_webhooks_path, class: "btn btn--back borderless txt-medium", data: { controller: "hotkey", action: "keydown.left@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis flex align-center">
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<strong>Back to Webhooks</strong>
|
||||
<kbd class="txt-x-small margin-inline-start hide-on-touch">←</kbd>
|
||||
</span>
|
||||
|
||||
@@ -18,13 +18,13 @@ class HotkeysHelperTest < ActionView::TestCase
|
||||
test "mac enter" do
|
||||
emulate_mac
|
||||
|
||||
assert_equal "⏎+J", hotkey_label([ "enter", "J" ])
|
||||
assert_equal "Return+J", hotkey_label([ "enter", "J" ])
|
||||
end
|
||||
|
||||
test "linux enter" do
|
||||
emulate_linux
|
||||
|
||||
assert_equal "⏎+J", hotkey_label([ "enter", "J" ])
|
||||
assert_equal "Enter+J", hotkey_label([ "enter", "J" ])
|
||||
end
|
||||
|
||||
test "mac hyper" do
|
||||
|
||||
Reference in New Issue
Block a user