mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Allow keyboard shortcuts help appear when modals are opened
Except Catch-up because it has its own Help.
This commit is contained in:
parent
d0862cecb6
commit
b1cad570ad
2 changed files with 39 additions and 37 deletions
|
@ -26,8 +26,10 @@ export default memo(function KeyboardShortcutsHelp() {
|
|||
},
|
||||
{
|
||||
ignoreEventWhen: (e) => {
|
||||
const hasModal = !!document.querySelector('#modal-container > *');
|
||||
return hasModal;
|
||||
const isCatchUpPage = /\/catchup/i.test(location.hash);
|
||||
return isCatchUpPage;
|
||||
// const hasModal = !!document.querySelector('#modal-container > *');
|
||||
// return hasModal;
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
70
src/locales/en.po
generated
70
src/locales/en.po
generated
|
@ -426,7 +426,7 @@ msgstr ""
|
|||
#: src/components/drafts.jsx:59
|
||||
#: src/components/embed-modal.jsx:13
|
||||
#: src/components/generic-accounts.jsx:143
|
||||
#: src/components/keyboard-shortcuts-help.jsx:40
|
||||
#: src/components/keyboard-shortcuts-help.jsx:42
|
||||
#: src/components/list-add-edit.jsx:36
|
||||
#: src/components/media-alt-modal.jsx:34
|
||||
#: src/components/media-modal.jsx:322
|
||||
|
@ -713,7 +713,7 @@ msgid "Add"
|
|||
msgstr ""
|
||||
|
||||
#: src/components/compose.jsx:1555
|
||||
#: src/components/keyboard-shortcuts-help.jsx:152
|
||||
#: src/components/keyboard-shortcuts-help.jsx:154
|
||||
#: src/components/status.jsx:948
|
||||
#: src/components/status.jsx:1714
|
||||
#: src/components/status.jsx:1715
|
||||
|
@ -1033,104 +1033,104 @@ msgstr ""
|
|||
msgid "Nothing to show"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:44
|
||||
#: src/components/keyboard-shortcuts-help.jsx:46
|
||||
#: src/components/nav-menu.jsx:357
|
||||
#: src/pages/catchup.jsx:1619
|
||||
msgid "Keyboard shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:52
|
||||
#: src/components/keyboard-shortcuts-help.jsx:54
|
||||
msgid "Keyboard shortcuts help"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:56
|
||||
#: src/components/keyboard-shortcuts-help.jsx:58
|
||||
#: src/pages/catchup.jsx:1644
|
||||
msgid "Next post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:60
|
||||
#: src/components/keyboard-shortcuts-help.jsx:62
|
||||
#: src/pages/catchup.jsx:1652
|
||||
msgid "Previous post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:64
|
||||
#: src/components/keyboard-shortcuts-help.jsx:66
|
||||
msgid "Skip carousel to next post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:66
|
||||
#: src/components/keyboard-shortcuts-help.jsx:68
|
||||
msgid "<0>Shift</0> + <1>j</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:72
|
||||
#: src/components/keyboard-shortcuts-help.jsx:74
|
||||
msgid "Skip carousel to previous post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:74
|
||||
#: src/components/keyboard-shortcuts-help.jsx:76
|
||||
msgid "<0>Shift</0> + <1>k</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:80
|
||||
#: src/components/keyboard-shortcuts-help.jsx:82
|
||||
msgid "Load new posts"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:84
|
||||
#: src/components/keyboard-shortcuts-help.jsx:86
|
||||
#: src/pages/catchup.jsx:1676
|
||||
msgid "Open post details"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:86
|
||||
#: src/components/keyboard-shortcuts-help.jsx:88
|
||||
msgid "<0>Enter</0> or <1>o</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:93
|
||||
#: src/components/keyboard-shortcuts-help.jsx:95
|
||||
msgid "Expand content warning or<0/>toggle expanded/collapsed thread"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:102
|
||||
#: src/components/keyboard-shortcuts-help.jsx:104
|
||||
msgid "Close post or dialogs"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:104
|
||||
#: src/components/keyboard-shortcuts-help.jsx:106
|
||||
msgid "<0>Esc</0> or <1>Backspace</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:110
|
||||
#: src/components/keyboard-shortcuts-help.jsx:112
|
||||
msgid "Focus column in multi-column mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:112
|
||||
#: src/components/keyboard-shortcuts-help.jsx:114
|
||||
msgid "<0>1</0> to <1>9</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:118
|
||||
#: src/components/keyboard-shortcuts-help.jsx:120
|
||||
msgid "Focus next column in multi-column mode"
|
||||
msgstr "Focus next column in multi-column mode"
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:122
|
||||
#: src/components/keyboard-shortcuts-help.jsx:124
|
||||
msgid "Focus previous column in multi-column mode"
|
||||
msgstr "Focus previous column in multi-column mode"
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:126
|
||||
#: src/components/keyboard-shortcuts-help.jsx:128
|
||||
msgid "Compose new post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:130
|
||||
#: src/components/keyboard-shortcuts-help.jsx:132
|
||||
msgid "Compose new post (new window)"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:133
|
||||
#: src/components/keyboard-shortcuts-help.jsx:135
|
||||
msgid "<0>Shift</0> + <1>c</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:139
|
||||
#: src/components/keyboard-shortcuts-help.jsx:141
|
||||
msgid "Send post"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:141
|
||||
#: src/components/keyboard-shortcuts-help.jsx:143
|
||||
msgid "<0>Ctrl</0> + <1>Enter</1> or <2>⌘</2> + <3>Enter</3>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:148
|
||||
#: src/components/keyboard-shortcuts-help.jsx:150
|
||||
#: src/components/nav-menu.jsx:326
|
||||
#: src/components/search-form.jsx:73
|
||||
#: src/components/shortcuts-settings.jsx:52
|
||||
|
@ -1140,23 +1140,23 @@ msgstr ""
|
|||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:156
|
||||
#: src/components/keyboard-shortcuts-help.jsx:158
|
||||
msgid "Reply (new window)"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:159
|
||||
#: src/components/keyboard-shortcuts-help.jsx:161
|
||||
msgid "<0>Shift</0> + <1>r</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:165
|
||||
#: src/components/keyboard-shortcuts-help.jsx:167
|
||||
msgid "Like (favourite)"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:167
|
||||
#: src/components/keyboard-shortcuts-help.jsx:169
|
||||
msgid "<0>l</0> or <1>f</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:173
|
||||
#: src/components/keyboard-shortcuts-help.jsx:175
|
||||
#: src/components/status.jsx:956
|
||||
#: src/components/status.jsx:2410
|
||||
#: src/components/status.jsx:2433
|
||||
|
@ -1164,22 +1164,22 @@ msgstr ""
|
|||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:175
|
||||
#: src/components/keyboard-shortcuts-help.jsx:177
|
||||
msgid "<0>Shift</0> + <1>b</1>"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:181
|
||||
#: src/components/keyboard-shortcuts-help.jsx:183
|
||||
#: src/components/status.jsx:1019
|
||||
#: src/components/status.jsx:2458
|
||||
#: src/components/status.jsx:2459
|
||||
msgid "Bookmark"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:185
|
||||
#: src/components/keyboard-shortcuts-help.jsx:187
|
||||
msgid "Toggle Cloak mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/components/keyboard-shortcuts-help.jsx:187
|
||||
#: src/components/keyboard-shortcuts-help.jsx:189
|
||||
msgid "<0>Shift</0> + <1>Alt</1> + <2>k</2>"
|
||||
msgstr ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue