diff --git a/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx b/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx index b95c9410e..c1a094440 100644 --- a/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx +++ b/app/javascript/mastodon/components/hotkeys/hotkeys.stories.tsx @@ -139,24 +139,24 @@ export const Default = { Last pressed hotkey:
- Click within the dashed border and press the "n - " or "/" key. Press " - Backspace" to clear the displayed hotkey. + Click within the dashed border and press the n + or / key. Press + Backspace to clear the displayed hotkey.
- Try typing a sequence, like "g" shortly - followed by "h", "n", or - "f" + Try typing a sequence, like g shortly followed by{' '} + h, n, or + f
Note that this playground doesn't support all hotkeys we use in the app.
- When a is focused, " + When a is focused, Enter - " should not trigger "open", but "o - " should. + should not trigger open, but o + should.
When an input element is focused, hotkeys should not interfere with diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss index fe3265f35..665271c53 100644 --- a/app/javascript/styles/mastodon-light/diff.scss +++ b/app/javascript/styles/mastodon-light/diff.scss @@ -524,3 +524,7 @@ a.sparkline { opacity: 0.25; } } + +kbd { + background-color: color.change($ui-highlight-color, $alpha: 0.1); +} diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss index cf0e18675..6a5008909 100644 --- a/app/javascript/styles/mastodon/admin.scss +++ b/app/javascript/styles/mastodon/admin.scss @@ -488,6 +488,14 @@ body, } } +kbd { + font-family: Courier, monospace; + background-color: color.change($ui-secondary-color, $alpha: 0.1); + padding: 4px; + padding-bottom: 2px; + border-radius: 5px; +} + .filters { display: flex; flex-wrap: wrap; diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss index 650081d1e..57f3d1694 100644 --- a/app/javascript/styles/mastodon/forms.scss +++ b/app/javascript/styles/mastodon/forms.scss @@ -755,6 +755,12 @@ code { display: none; } + &.hidden-on-touch-devices { + @media screen and (pointer: coarse) { + display: none; + } + } + a { display: inline-block; color: $darker-text-color; diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index 3dc60697a..cca587526 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -72,6 +72,7 @@ .fields-group = ff.input :'web.reblog_modal', wrapper: :with_label, hint: I18n.t('simple_form.hints.defaults.setting_boost_modal'), label: I18n.t('simple_form.labels.defaults.setting_boost_modal') + .flash-message.hidden-on-touch-devices= t('appearance.boosting_preferences_info_html', icon: material_symbol('repeat')) %h4= t 'appearance.sensitive_content' diff --git a/config/locales/en.yml b/config/locales/en.yml index 538f2d65d..34f7069d0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1191,6 +1191,7 @@ en: advanced_settings: Advanced settings animations_and_accessibility: Animations and accessibility boosting_preferences: Boosting preferences + boosting_preferences_info_html: "Tip: Regardless of settings, Shift + Click on the %{icon} Boost icon will immediately boost." discovery: Discovery localization: body: Mastodon is translated by volunteers.