From 17c2390a5c00dcf7dd1bd996cf8768faa58ff232 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 3 May 2025 09:36:00 +0800 Subject: [PATCH] Apply more useKey: true --- src/components/compose.jsx | 5 + src/components/media-modal.jsx | 1 + src/components/modal.jsx | 1 + src/components/search-command.jsx | 1 + src/components/timeline.jsx | 4 +- src/locales/en.po | 418 +++++++++++++++--------------- src/pages/catchup.jsx | 1 + src/pages/status.jsx | 13 +- 8 files changed, 231 insertions(+), 213 deletions(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index b30c3314..d773bad0 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -519,6 +519,7 @@ function Compose({ { enabled: !supportsCloseWatcher, enableOnFormTags: true, + useKey: true, }, ); useHotkeys( @@ -541,6 +542,7 @@ function Compose({ modals.length === 1 && modals[0].querySelector('#compose-container'); return hasModal && !hasOnlyComposer; }, + useKey: true, }, ); useCloseWatcher(() => { @@ -3141,6 +3143,7 @@ function MentionModal({ { preventDefault: true, enableOnFormTags: ['input'], + useKey: true, }, ); @@ -3167,6 +3170,7 @@ function MentionModal({ { preventDefault: true, enableOnFormTags: ['input'], + useKey: true, }, ); @@ -3192,6 +3196,7 @@ function MentionModal({ { preventDefault: true, enableOnFormTags: ['input'], + useKey: true, }, ); diff --git a/src/components/media-modal.jsx b/src/components/media-modal.jsx index e300e1f9..e2dc958a 100644 --- a/src/components/media-modal.jsx +++ b/src/components/media-modal.jsx @@ -88,6 +88,7 @@ function MediaModal({ const hasModal = !!document.querySelector('#modal-container > *'); return hasModal; }, + useKey: true, }, [onClose], ); diff --git a/src/components/modal.jsx b/src/components/modal.jsx index df88d648..0f02f625 100644 --- a/src/components/modal.jsx +++ b/src/components/modal.jsx @@ -43,6 +43,7 @@ function Modal({ children, onClose, onClick, class: className, minimized }) { // This will run "later" to prevent clash with esc handlers from other components keydown: false, keyup: true, + useKey: true, }, [onClose], ); diff --git a/src/components/search-command.jsx b/src/components/search-command.jsx index 5ac65bca..709dfa1b 100644 --- a/src/components/search-command.jsx +++ b/src/components/search-command.jsx @@ -45,6 +45,7 @@ export default memo(function SearchCommand({ onClose = () => {} }) { enabled: showSearch, enableOnFormTags: true, preventDefault: true, + useKey: true, }, ); diff --git a/src/components/timeline.jsx b/src/components/timeline.jsx index 5da5967f..0537707d 100644 --- a/src/components/timeline.jsx +++ b/src/components/timeline.jsx @@ -262,7 +262,9 @@ function Timeline({ behavior: 'smooth', }); }, [loadItems, showNewPostsIndicator]); - const dotRef = useHotkeys('.', handleLoadNewPosts); + const dotRef = useHotkeys('.', handleLoadNewPosts, { + useKey: true, + }); // const { // scrollDirection, diff --git a/src/locales/en.po b/src/locales/en.po index 9f38443d..08e9fd53 100644 --- a/src/locales/en.po +++ b/src/locales/en.po @@ -108,9 +108,9 @@ msgstr "" #: src/components/account-info.jsx:444 #: src/components/account-info.jsx:1202 -#: src/components/compose.jsx:2772 +#: src/components/compose.jsx:2774 #: src/components/media-alt-modal.jsx:46 -#: src/components/media-modal.jsx:358 +#: src/components/media-modal.jsx:359 #: src/components/status.jsx:1826 #: src/components/status.jsx:1843 #: src/components/status.jsx:1968 @@ -122,7 +122,7 @@ msgstr "" #: src/pages/list.jsx:158 #: src/pages/public.jsx:115 #: src/pages/scheduled-posts.jsx:87 -#: src/pages/status.jsx:1232 +#: src/pages/status.jsx:1239 #: src/pages/trending.jsx:469 msgid "More" msgstr "" @@ -205,17 +205,17 @@ msgstr "" #: src/components/account-info.jsx:928 #: src/components/status.jsx:2372 #: src/pages/catchup.jsx:72 -#: src/pages/catchup.jsx:1447 -#: src/pages/catchup.jsx:2062 -#: src/pages/status.jsx:955 -#: src/pages/status.jsx:1578 +#: src/pages/catchup.jsx:1448 +#: src/pages/catchup.jsx:2063 +#: src/pages/status.jsx:962 +#: src/pages/status.jsx:1585 msgid "Replies" msgstr "" #: src/components/account-info.jsx:932 #: src/pages/catchup.jsx:73 -#: src/pages/catchup.jsx:1449 -#: src/pages/catchup.jsx:2074 +#: src/pages/catchup.jsx:1450 +#: src/pages/catchup.jsx:2075 #: src/pages/settings.jsx:1159 msgid "Boosts" msgstr "" @@ -420,18 +420,18 @@ msgstr "" #: src/components/account-info.jsx:2064 #: src/components/account-info.jsx:2184 #: src/components/account-sheet.jsx:38 -#: src/components/compose.jsx:881 -#: src/components/compose.jsx:2728 -#: src/components/compose.jsx:3202 -#: src/components/compose.jsx:3411 -#: src/components/compose.jsx:3641 +#: src/components/compose.jsx:883 +#: src/components/compose.jsx:2730 +#: src/components/compose.jsx:3207 +#: src/components/compose.jsx:3416 +#: src/components/compose.jsx:3646 #: src/components/drafts.jsx:59 #: src/components/embed-modal.jsx:13 #: src/components/generic-accounts.jsx:143 #: src/components/keyboard-shortcuts-help.jsx:43 #: src/components/list-add-edit.jsx:36 #: src/components/media-alt-modal.jsx:34 -#: src/components/media-modal.jsx:322 +#: src/components/media-modal.jsx:323 #: src/components/notification-service.jsx:157 #: src/components/report-modal.jsx:75 #: src/components/shortcuts-settings.jsx:230 @@ -441,13 +441,13 @@ msgstr "" #: src/components/status.jsx:3323 #: src/components/status.jsx:3832 #: src/pages/accounts.jsx:37 -#: src/pages/catchup.jsx:1583 +#: src/pages/catchup.jsx:1584 #: src/pages/filters.jsx:225 #: src/pages/list.jsx:276 #: src/pages/notifications.jsx:934 #: src/pages/scheduled-posts.jsx:257 #: src/pages/settings.jsx:87 -#: src/pages/status.jsx:1319 +#: src/pages/status.jsx:1326 msgid "Close" msgstr "" @@ -556,8 +556,8 @@ msgstr "" #: src/components/columns.jsx:27 #: src/components/nav-menu.jsx:176 #: src/components/shortcuts-settings.jsx:139 -#: src/components/timeline.jsx:463 -#: src/pages/catchup.jsx:882 +#: src/components/timeline.jsx:465 +#: src/pages/catchup.jsx:883 #: src/pages/filters.jsx:90 #: src/pages/followed-hashtags.jsx:41 #: src/pages/home.jsx:54 @@ -613,145 +613,145 @@ msgstr "You have unsaved changes. Discard this post?" #. placeholder {0}: unsupportedFiles.length #. placeholder {1}: unsupportedFiles[0].name #. placeholder {2}: lf.format( unsupportedFiles.map((f) => f.name), ) -#: src/components/compose.jsx:644 +#: src/components/compose.jsx:646 msgid "{0, plural, one {File {1} is not supported.} other {Files {2} are not supported.}}" msgstr "{0, plural, one {File {1} is not supported.} other {Files {2} are not supported.}}" -#: src/components/compose.jsx:654 -#: src/components/compose.jsx:672 -#: src/components/compose.jsx:1777 -#: src/components/compose.jsx:1902 +#: src/components/compose.jsx:656 +#: src/components/compose.jsx:674 +#: src/components/compose.jsx:1779 +#: src/components/compose.jsx:1904 msgid "{maxMediaAttachments, plural, one {You can only attach up to 1 file.} other {You can only attach up to # files.}}" msgstr "" -#: src/components/compose.jsx:862 +#: src/components/compose.jsx:864 msgid "Pop out" msgstr "Pop out" -#: src/components/compose.jsx:869 +#: src/components/compose.jsx:871 msgid "Minimize" msgstr "Minimize" -#: src/components/compose.jsx:905 +#: src/components/compose.jsx:907 msgid "Looks like you closed the parent window." msgstr "Looks like you closed the parent window." -#: src/components/compose.jsx:912 +#: src/components/compose.jsx:914 msgid "Looks like you already have a compose field open in the parent window and currently publishing. Please wait for it to be done and try again later." msgstr "Looks like you already have a compose field open in the parent window and currently publishing. Please wait for it to be done and try again later." -#: src/components/compose.jsx:917 +#: src/components/compose.jsx:919 msgid "Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?" msgstr "Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?" -#: src/components/compose.jsx:960 +#: src/components/compose.jsx:962 msgid "Pop in" msgstr "Pop in" #. placeholder {0}: replyToStatus.account.acct || replyToStatus.account.username #. placeholder {1}: rtf.format(-replyToStatusMonthsAgo, 'month') -#: src/components/compose.jsx:970 +#: src/components/compose.jsx:972 msgid "Replying to @{0}’s post (<0>{1})" msgstr "" #. placeholder {0}: replyToStatus.account.acct || replyToStatus.account.username -#: src/components/compose.jsx:980 +#: src/components/compose.jsx:982 msgid "Replying to @{0}’s post" msgstr "" -#: src/components/compose.jsx:993 +#: src/components/compose.jsx:995 msgid "Editing source post" msgstr "" -#: src/components/compose.jsx:1046 +#: src/components/compose.jsx:1048 msgid "Poll must have at least 2 options" msgstr "Poll must have at least 2 options" -#: src/components/compose.jsx:1050 +#: src/components/compose.jsx:1052 msgid "Some poll choices are empty" msgstr "Some poll choices are empty" -#: src/components/compose.jsx:1063 +#: src/components/compose.jsx:1065 msgid "Some media have no descriptions. Continue?" msgstr "Some media have no descriptions. Continue?" -#: src/components/compose.jsx:1115 +#: src/components/compose.jsx:1117 msgid "Attachment #{i} failed" msgstr "Attachment #{i} failed" -#: src/components/compose.jsx:1211 +#: src/components/compose.jsx:1213 #: src/components/status.jsx:2156 -#: src/components/timeline.jsx:1017 +#: src/components/timeline.jsx:1019 msgid "Content warning" msgstr "" -#: src/components/compose.jsx:1227 +#: src/components/compose.jsx:1229 msgid "Content warning or sensitive media" msgstr "Content warning or sensitive media" -#: src/components/compose.jsx:1263 +#: src/components/compose.jsx:1265 #: src/components/status.jsx:96 #: src/pages/settings.jsx:315 msgid "Public" msgstr "" -#: src/components/compose.jsx:1268 +#: src/components/compose.jsx:1270 #: src/components/nav-menu.jsx:344 #: src/components/shortcuts-settings.jsx:165 #: src/components/status.jsx:97 msgid "Local" msgstr "" -#: src/components/compose.jsx:1272 +#: src/components/compose.jsx:1274 #: src/components/status.jsx:98 #: src/pages/settings.jsx:318 msgid "Unlisted" msgstr "" -#: src/components/compose.jsx:1275 +#: src/components/compose.jsx:1277 #: src/components/status.jsx:99 #: src/pages/settings.jsx:321 msgid "Followers only" msgstr "" -#: src/components/compose.jsx:1278 +#: src/components/compose.jsx:1280 #: src/components/status.jsx:100 #: src/components/status.jsx:2032 msgid "Private mention" msgstr "" -#: src/components/compose.jsx:1287 +#: src/components/compose.jsx:1289 msgid "Post your reply" msgstr "Post your reply" -#: src/components/compose.jsx:1289 +#: src/components/compose.jsx:1291 msgid "Edit your post" msgstr "Edit your post" -#: src/components/compose.jsx:1290 +#: src/components/compose.jsx:1292 msgid "What are you doing?" msgstr "What are you doing?" -#: src/components/compose.jsx:1368 +#: src/components/compose.jsx:1370 msgid "Mark media as sensitive" msgstr "" -#: src/components/compose.jsx:1405 +#: src/components/compose.jsx:1407 msgid "Posting on <0/>" msgstr "Posting on <0/>" -#: src/components/compose.jsx:1436 -#: src/components/compose.jsx:3260 +#: src/components/compose.jsx:1438 +#: src/components/compose.jsx:3265 #: src/components/shortcuts-settings.jsx:715 #: src/pages/list.jsx:362 msgid "Add" msgstr "" -#: src/components/compose.jsx:1662 +#: src/components/compose.jsx:1664 msgid "Schedule" msgstr "Schedule" -#: src/components/compose.jsx:1664 +#: src/components/compose.jsx:1666 #: src/components/keyboard-shortcuts-help.jsx:155 #: src/components/status.jsx:1025 #: src/components/status.jsx:1806 @@ -760,42 +760,42 @@ msgstr "Schedule" msgid "Reply" msgstr "" -#: src/components/compose.jsx:1666 +#: src/components/compose.jsx:1668 msgid "Update" msgstr "Update" -#: src/components/compose.jsx:1667 +#: src/components/compose.jsx:1669 msgctxt "Submit button in composer" msgid "Post" msgstr "Post" -#: src/components/compose.jsx:1789 +#: src/components/compose.jsx:1791 msgid "Downloading GIF…" msgstr "Downloading GIF…" -#: src/components/compose.jsx:1817 +#: src/components/compose.jsx:1819 msgid "Failed to download GIF" msgstr "Failed to download GIF" -#: src/components/compose.jsx:2032 -#: src/components/compose.jsx:2109 +#: src/components/compose.jsx:2034 +#: src/components/compose.jsx:2111 #: src/components/nav-menu.jsx:239 msgid "More…" msgstr "" -#: src/components/compose.jsx:2541 +#: src/components/compose.jsx:2543 msgid "Uploaded" msgstr "" -#: src/components/compose.jsx:2554 +#: src/components/compose.jsx:2556 msgid "Image description" msgstr "Image description" -#: src/components/compose.jsx:2555 +#: src/components/compose.jsx:2557 msgid "Video description" msgstr "Video description" -#: src/components/compose.jsx:2556 +#: src/components/compose.jsx:2558 msgid "Audio description" msgstr "Audio description" @@ -803,8 +803,8 @@ msgstr "Audio description" #. placeholder {0}: prettyBytes( videoSize, ) #. placeholder {1}: prettyBytes(imageSizeLimit) #. placeholder {1}: prettyBytes(videoSizeLimit) -#: src/components/compose.jsx:2592 -#: src/components/compose.jsx:2612 +#: src/components/compose.jsx:2594 +#: src/components/compose.jsx:2614 msgid "File size too large. Uploading might encounter issues. Try reduce the file size from {0} to {1} or lower." msgstr "File size too large. Uploading might encounter issues. Try reduce the file size from {0} to {1} or lower." @@ -812,150 +812,150 @@ msgstr "File size too large. Uploading might encounter issues. Try reduce the fi #. placeholder {1}: i18n.number(height) #. placeholder {2}: i18n.number(newWidth) #. placeholder {3}: i18n.number( newHeight, ) -#: src/components/compose.jsx:2604 -#: src/components/compose.jsx:2624 +#: src/components/compose.jsx:2606 +#: src/components/compose.jsx:2626 msgid "Dimension too large. Uploading might encounter issues. Try reduce dimension from {0}×{1}px to {2}×{3}px." msgstr "Dimension too large. Uploading might encounter issues. Try reduce dimension from {0}×{1}px to {2}×{3}px." -#: src/components/compose.jsx:2632 +#: src/components/compose.jsx:2634 msgid "Frame rate too high. Uploading might encounter issues." msgstr "Frame rate too high. Uploading might encounter issues." -#: src/components/compose.jsx:2692 -#: src/components/compose.jsx:2942 +#: src/components/compose.jsx:2694 +#: src/components/compose.jsx:2944 #: src/components/shortcuts-settings.jsx:726 -#: src/pages/catchup.jsx:1080 +#: src/pages/catchup.jsx:1081 #: src/pages/filters.jsx:413 msgid "Remove" msgstr "" -#: src/components/compose.jsx:2709 +#: src/components/compose.jsx:2711 #: src/compose.jsx:84 msgid "Error" msgstr "" -#: src/components/compose.jsx:2734 +#: src/components/compose.jsx:2736 msgid "Edit image description" msgstr "Edit image description" -#: src/components/compose.jsx:2735 +#: src/components/compose.jsx:2737 msgid "Edit video description" msgstr "Edit video description" -#: src/components/compose.jsx:2736 +#: src/components/compose.jsx:2738 msgid "Edit audio description" msgstr "Edit audio description" -#: src/components/compose.jsx:2781 -#: src/components/compose.jsx:2830 +#: src/components/compose.jsx:2783 +#: src/components/compose.jsx:2832 msgid "Generating description. Please wait…" msgstr "Generating description. Please wait…" #. placeholder {0}: e.message -#: src/components/compose.jsx:2801 +#: src/components/compose.jsx:2803 msgid "Failed to generate description: {0}" msgstr "Failed to generate description: {0}" -#: src/components/compose.jsx:2802 +#: src/components/compose.jsx:2804 msgid "Failed to generate description" msgstr "Failed to generate description" -#: src/components/compose.jsx:2814 -#: src/components/compose.jsx:2820 -#: src/components/compose.jsx:2866 +#: src/components/compose.jsx:2816 +#: src/components/compose.jsx:2822 +#: src/components/compose.jsx:2868 msgid "Generate description…" msgstr "" #. placeholder {0}: e?.message ? `: ${e.message}` : '' -#: src/components/compose.jsx:2853 +#: src/components/compose.jsx:2855 msgid "Failed to generate description{0}" msgstr "Failed to generate description{0}" #. placeholder {0}: localeCode2Text(lang) -#: src/components/compose.jsx:2868 +#: src/components/compose.jsx:2870 msgid "({0}) <0>— experimental" msgstr "" -#: src/components/compose.jsx:2887 +#: src/components/compose.jsx:2889 msgid "Done" msgstr "" #. placeholder {0}: i + 1 -#: src/components/compose.jsx:2923 +#: src/components/compose.jsx:2925 msgid "Choice {0}" msgstr "Choice {0}" -#: src/components/compose.jsx:2970 +#: src/components/compose.jsx:2972 msgid "Multiple choices" msgstr "" -#: src/components/compose.jsx:2973 +#: src/components/compose.jsx:2975 msgid "Duration" msgstr "" -#: src/components/compose.jsx:3004 +#: src/components/compose.jsx:3006 msgid "Remove poll" msgstr "" -#: src/components/compose.jsx:3219 +#: src/components/compose.jsx:3224 msgid "Search accounts" msgstr "Search accounts" -#: src/components/compose.jsx:3273 +#: src/components/compose.jsx:3278 #: src/components/generic-accounts.jsx:228 msgid "Error loading accounts" msgstr "" -#: src/components/compose.jsx:3417 +#: src/components/compose.jsx:3422 msgid "Custom emojis" msgstr "" -#: src/components/compose.jsx:3437 +#: src/components/compose.jsx:3442 msgid "Search emoji" msgstr "Search emoji" -#: src/components/compose.jsx:3468 +#: src/components/compose.jsx:3473 msgid "Error loading custom emojis" msgstr "" -#: src/components/compose.jsx:3479 +#: src/components/compose.jsx:3484 msgid "Recently used" msgstr "Recently used" -#: src/components/compose.jsx:3480 +#: src/components/compose.jsx:3485 msgid "Others" msgstr "Others" #. placeholder {0}: i18n.number(emojis.length - max) -#: src/components/compose.jsx:3518 +#: src/components/compose.jsx:3523 msgid "{0} more…" msgstr "" -#: src/components/compose.jsx:3656 +#: src/components/compose.jsx:3661 msgid "Search GIFs" msgstr "Search GIFs" -#: src/components/compose.jsx:3671 +#: src/components/compose.jsx:3676 msgid "Powered by GIPHY" msgstr "Powered by GIPHY" -#: src/components/compose.jsx:3679 +#: src/components/compose.jsx:3684 msgid "Type to search GIFs" msgstr "" -#: src/components/compose.jsx:3777 -#: src/components/media-modal.jsx:464 -#: src/components/timeline.jsx:921 +#: src/components/compose.jsx:3782 +#: src/components/media-modal.jsx:465 +#: src/components/timeline.jsx:923 msgid "Previous" msgstr "" -#: src/components/compose.jsx:3795 -#: src/components/media-modal.jsx:483 -#: src/components/timeline.jsx:938 +#: src/components/compose.jsx:3800 +#: src/components/media-modal.jsx:484 +#: src/components/timeline.jsx:940 msgid "Next" msgstr "" -#: src/components/compose.jsx:3812 +#: src/components/compose.jsx:3817 msgid "Error loading GIFs" msgstr "" @@ -1005,7 +1005,7 @@ msgid "No drafts found." msgstr "" #: src/components/drafts.jsx:247 -#: src/pages/catchup.jsx:1933 +#: src/pages/catchup.jsx:1934 msgid "Poll" msgstr "" @@ -1045,16 +1045,16 @@ msgid "Accounts" msgstr "" #: src/components/generic-accounts.jsx:206 -#: src/components/timeline.jsx:545 +#: src/components/timeline.jsx:547 #: src/pages/list.jsx:295 #: src/pages/notifications.jsx:914 #: src/pages/search.jsx:558 -#: src/pages/status.jsx:1352 +#: src/pages/status.jsx:1359 msgid "Show more…" msgstr "" #: src/components/generic-accounts.jsx:211 -#: src/components/timeline.jsx:550 +#: src/components/timeline.jsx:552 #: src/pages/search.jsx:563 msgid "The end." msgstr "" @@ -1065,7 +1065,7 @@ msgstr "" #: src/components/keyboard-shortcuts-help.jsx:47 #: src/components/nav-menu.jsx:363 -#: src/pages/catchup.jsx:1621 +#: src/pages/catchup.jsx:1622 msgid "Keyboard shortcuts" msgstr "" @@ -1074,12 +1074,12 @@ msgid "Keyboard shortcuts help" msgstr "" #: src/components/keyboard-shortcuts-help.jsx:59 -#: src/pages/catchup.jsx:1646 +#: src/pages/catchup.jsx:1647 msgid "Next post" msgstr "" #: src/components/keyboard-shortcuts-help.jsx:63 -#: src/pages/catchup.jsx:1654 +#: src/pages/catchup.jsx:1655 msgid "Previous post" msgstr "" @@ -1104,7 +1104,7 @@ msgid "Load new posts" msgstr "" #: src/components/keyboard-shortcuts-help.jsx:87 -#: src/pages/catchup.jsx:1678 +#: src/pages/catchup.jsx:1679 msgid "Open post details" msgstr "" @@ -1271,27 +1271,27 @@ msgstr "" msgid "Speak" msgstr "" -#: src/components/media-modal.jsx:369 +#: src/components/media-modal.jsx:370 msgid "Open original media in new window" msgstr "" -#: src/components/media-modal.jsx:373 +#: src/components/media-modal.jsx:374 msgid "Open original media" msgstr "" -#: src/components/media-modal.jsx:389 +#: src/components/media-modal.jsx:390 msgid "Attempting to describe image. Please wait…" msgstr "" -#: src/components/media-modal.jsx:404 +#: src/components/media-modal.jsx:405 msgid "Failed to describe image" msgstr "" -#: src/components/media-modal.jsx:414 +#: src/components/media-modal.jsx:415 msgid "Describe image…" msgstr "" -#: src/components/media-modal.jsx:438 +#: src/components/media-modal.jsx:439 msgid "View post" msgstr "" @@ -1307,9 +1307,9 @@ msgstr "" #: src/components/status.jsx:3662 #: src/components/status.jsx:3758 #: src/components/status.jsx:3836 -#: src/components/timeline.jsx:1006 +#: src/components/timeline.jsx:1008 #: src/pages/catchup.jsx:76 -#: src/pages/catchup.jsx:1881 +#: src/pages/catchup.jsx:1882 msgid "Filtered" msgstr "" @@ -1358,7 +1358,7 @@ msgid "following.title" msgstr "Following" #: src/components/nav-menu.jsx:192 -#: src/pages/catchup.jsx:877 +#: src/pages/catchup.jsx:878 msgid "Catch-up" msgstr "" @@ -1403,8 +1403,8 @@ msgstr "" #: src/components/nav-menu.jsx:248 #: src/components/shortcuts-settings.jsx:55 #: src/components/shortcuts-settings.jsx:201 -#: src/pages/catchup.jsx:1448 -#: src/pages/catchup.jsx:2068 +#: src/pages/catchup.jsx:1449 +#: src/pages/catchup.jsx:2069 #: src/pages/favourites.jsx:12 #: src/pages/favourites.jsx:24 #: src/pages/settings.jsx:1155 @@ -1448,7 +1448,7 @@ msgstr "" #: src/components/nav-menu.jsx:321 #: src/pages/login.jsx:27 #: src/pages/login.jsx:190 -#: src/pages/status.jsx:855 +#: src/pages/status.jsx:862 #: src/pages/welcome.jsx:65 msgid "Log in" msgstr "" @@ -1670,8 +1670,8 @@ msgstr "" #: src/components/poll.jsx:208 #: src/components/poll.jsx:210 #: src/pages/scheduled-posts.jsx:98 -#: src/pages/status.jsx:1221 -#: src/pages/status.jsx:1244 +#: src/pages/status.jsx:1228 +#: src/pages/status.jsx:1251 msgid "Refresh" msgstr "" @@ -2372,7 +2372,7 @@ msgstr "" #. placeholder {0}: filterInfo.titlesStr #. placeholder {0}: filterInfo?.titlesStr #: src/components/status.jsx:2272 -#: src/pages/catchup.jsx:1880 +#: src/pages/catchup.jsx:1881 msgid "Filtered: {0}" msgstr "Filtered: {0}" @@ -2468,36 +2468,36 @@ msgstr "" msgid "<0/> <1/> boosted" msgstr "" -#: src/components/timeline.jsx:479 +#: src/components/timeline.jsx:481 #: src/pages/settings.jsx:1179 msgid "New posts" msgstr "" -#: src/components/timeline.jsx:580 +#: src/components/timeline.jsx:582 #: src/pages/home.jsx:216 #: src/pages/notifications.jsx:890 -#: src/pages/status.jsx:1008 -#: src/pages/status.jsx:1381 +#: src/pages/status.jsx:1015 +#: src/pages/status.jsx:1388 msgid "Try again" msgstr "" #. placeholder {0}: fItems.length -#: src/components/timeline.jsx:615 +#: src/components/timeline.jsx:617 msgid "{0, plural, one {# Boost} other {# Boosts}}" msgstr "{0, plural, one {# Boost} other {# Boosts}}" -#: src/components/timeline.jsx:620 +#: src/components/timeline.jsx:622 msgid "Pinned posts" msgstr "Pinned posts" -#: src/components/timeline.jsx:979 -#: src/components/timeline.jsx:986 -#: src/pages/catchup.jsx:1898 +#: src/components/timeline.jsx:981 +#: src/components/timeline.jsx:988 +#: src/pages/catchup.jsx:1899 msgid "Thread" msgstr "" #. placeholder {0}: filterInfo.titlesStr -#: src/components/timeline.jsx:1001 +#: src/components/timeline.jsx:1003 msgid "<0>Filtered: <1>{0}" msgstr "" @@ -2757,191 +2757,191 @@ msgstr "" msgid "Showing {selectedFilterCategory, select, all {all posts} original {original posts} replies {replies} boosts {boosts} followedTags {followed tags} groups {groups} filtered {filtered posts}}, {sortBy, select, createdAt {{sortOrder, select, asc {oldest} desc {latest}}} reblogsCount {{sortOrder, select, asc {fewest boosts} desc {most boosts}}} favouritesCount {{sortOrder, select, asc {fewest likes} desc {most likes}}} repliesCount {{sortOrder, select, asc {fewest replies} desc {most replies}}} density {{sortOrder, select, asc {least dense} desc {most dense}}}} first{groupBy, select, account {, grouped by authors} other {}}" msgstr "Showing {selectedFilterCategory, select, all {all posts} original {original posts} replies {replies} boosts {boosts} followedTags {followed tags} groups {groups} filtered {filtered posts}}, {sortBy, select, createdAt {{sortOrder, select, asc {oldest} desc {latest}}} reblogsCount {{sortOrder, select, asc {fewest boosts} desc {most boosts}}} favouritesCount {{sortOrder, select, asc {fewest likes} desc {most likes}}} repliesCount {{sortOrder, select, asc {fewest replies} desc {most replies}}} density {{sortOrder, select, asc {least dense} desc {most dense}}}} first{groupBy, select, account {, grouped by authors} other {}}" -#: src/pages/catchup.jsx:888 -#: src/pages/catchup.jsx:912 +#: src/pages/catchup.jsx:889 +#: src/pages/catchup.jsx:913 msgid "Catch-up <0>beta" msgstr "" -#: src/pages/catchup.jsx:902 -#: src/pages/catchup.jsx:1587 +#: src/pages/catchup.jsx:903 +#: src/pages/catchup.jsx:1588 msgid "Help" msgstr "" -#: src/pages/catchup.jsx:918 +#: src/pages/catchup.jsx:919 msgid "What is this?" msgstr "" -#: src/pages/catchup.jsx:921 +#: src/pages/catchup.jsx:922 msgid "Catch-up is a separate timeline for your followings, offering a high-level view at a glance, with a simple, email-inspired interface to effortlessly sort and filter through posts." msgstr "" -#: src/pages/catchup.jsx:932 +#: src/pages/catchup.jsx:933 msgid "Preview of Catch-up UI" msgstr "Preview of Catch-up UI" -#: src/pages/catchup.jsx:941 +#: src/pages/catchup.jsx:942 msgid "Let's catch up" msgstr "" -#: src/pages/catchup.jsx:946 +#: src/pages/catchup.jsx:947 msgid "Let's catch up on the posts from your followings." msgstr "" -#: src/pages/catchup.jsx:950 +#: src/pages/catchup.jsx:951 msgid "Show me all posts from…" msgstr "" -#: src/pages/catchup.jsx:973 +#: src/pages/catchup.jsx:974 msgid "until the max" msgstr "until the max" -#: src/pages/catchup.jsx:1003 +#: src/pages/catchup.jsx:1004 msgid "Catch up" msgstr "" -#: src/pages/catchup.jsx:1009 +#: src/pages/catchup.jsx:1010 msgid "Overlaps with your last catch-up" msgstr "" #. placeholder {0}: dtf.format(new Date(lastCatchupEndAt)) -#: src/pages/catchup.jsx:1021 +#: src/pages/catchup.jsx:1022 msgid "Until the last catch-up ({0})" msgstr "" -#: src/pages/catchup.jsx:1030 +#: src/pages/catchup.jsx:1031 msgid "Note: your instance might only show a maximum of 800 posts in the Home timeline regardless of the time range. Could be less or more." msgstr "" -#: src/pages/catchup.jsx:1040 +#: src/pages/catchup.jsx:1041 msgid "Previously…" msgstr "" #. placeholder {0}: pc.count -#: src/pages/catchup.jsx:1058 +#: src/pages/catchup.jsx:1059 msgid "{0, plural, one {# post} other {# posts}}" msgstr "" -#: src/pages/catchup.jsx:1068 +#: src/pages/catchup.jsx:1069 msgid "Remove this catch-up?" msgstr "Remove this catch-up?" #. placeholder {0}: pc.id -#: src/pages/catchup.jsx:1071 +#: src/pages/catchup.jsx:1072 msgid "Removing Catch-up {0}" msgstr "Removing Catch-up {0}" #. placeholder {0}: pc.id -#: src/pages/catchup.jsx:1075 +#: src/pages/catchup.jsx:1076 msgid "Catch-up {0} removed" msgstr "Catch-up {0} removed" -#: src/pages/catchup.jsx:1089 +#: src/pages/catchup.jsx:1090 msgid "Note: Only max 3 will be stored. The rest will be automatically removed." msgstr "" -#: src/pages/catchup.jsx:1104 +#: src/pages/catchup.jsx:1105 msgid "Fetching posts…" msgstr "" -#: src/pages/catchup.jsx:1107 +#: src/pages/catchup.jsx:1108 msgid "This might take a while." msgstr "" -#: src/pages/catchup.jsx:1142 +#: src/pages/catchup.jsx:1143 msgid "Reset filters" msgstr "" -#: src/pages/catchup.jsx:1150 -#: src/pages/catchup.jsx:1593 +#: src/pages/catchup.jsx:1151 +#: src/pages/catchup.jsx:1594 msgid "Top links" msgstr "" #. placeholder {0}: sharers.map((s) => { const { avatarStatic, displayName } = s; return ( ); }) -#: src/pages/catchup.jsx:1263 +#: src/pages/catchup.jsx:1264 msgid "Shared by {0}" msgstr "" -#: src/pages/catchup.jsx:1318 +#: src/pages/catchup.jsx:1319 #: src/pages/mentions.jsx:148 #: src/pages/search.jsx:326 msgid "All" msgstr "" #. placeholder {0}: authorCountsList.length -#: src/pages/catchup.jsx:1403 +#: src/pages/catchup.jsx:1404 msgid "{0, plural, one {# author} other {# authors}}" msgstr "" -#: src/pages/catchup.jsx:1415 +#: src/pages/catchup.jsx:1416 msgid "Sort" msgstr "" -#: src/pages/catchup.jsx:1446 +#: src/pages/catchup.jsx:1447 msgid "Date" msgstr "Date" -#: src/pages/catchup.jsx:1450 +#: src/pages/catchup.jsx:1451 msgid "Density" msgstr "Density" #. js-lingui-explicit-id -#: src/pages/catchup.jsx:1473 +#: src/pages/catchup.jsx:1474 msgid "group.filter" msgstr "Group" -#: src/pages/catchup.jsx:1488 +#: src/pages/catchup.jsx:1489 msgid "Authors" msgstr "Authors" -#: src/pages/catchup.jsx:1489 +#: src/pages/catchup.jsx:1490 msgid "None" msgstr "None" -#: src/pages/catchup.jsx:1505 +#: src/pages/catchup.jsx:1506 msgid "Show all authors" msgstr "" -#: src/pages/catchup.jsx:1556 +#: src/pages/catchup.jsx:1557 msgid "You don't have to read everything." msgstr "You don't have to read everything." -#: src/pages/catchup.jsx:1557 +#: src/pages/catchup.jsx:1558 msgid "That's all." msgstr "That's all." -#: src/pages/catchup.jsx:1565 +#: src/pages/catchup.jsx:1566 msgid "Back to top" msgstr "" -#: src/pages/catchup.jsx:1596 +#: src/pages/catchup.jsx:1597 msgid "Links shared by followings, sorted by shared counts, boosts and likes." msgstr "" -#: src/pages/catchup.jsx:1602 +#: src/pages/catchup.jsx:1603 msgid "Sort: Density" msgstr "" -#: src/pages/catchup.jsx:1605 +#: src/pages/catchup.jsx:1606 msgid "Posts are sorted by information density or depth. Shorter posts are \"lighter\" while longer posts are \"heavier\". Posts with photos are \"heavier\" than posts without photos." msgstr "" -#: src/pages/catchup.jsx:1612 +#: src/pages/catchup.jsx:1613 msgid "Group: Authors" msgstr "" -#: src/pages/catchup.jsx:1615 +#: src/pages/catchup.jsx:1616 msgid "Posts are grouped by authors, sorted by posts count per author." msgstr "" -#: src/pages/catchup.jsx:1662 +#: src/pages/catchup.jsx:1663 msgid "Next author" msgstr "" -#: src/pages/catchup.jsx:1670 +#: src/pages/catchup.jsx:1671 msgid "Previous author" msgstr "" -#: src/pages/catchup.jsx:1686 +#: src/pages/catchup.jsx:1687 msgid "Scroll to top" msgstr "" @@ -3802,89 +3802,89 @@ msgstr "" #. js-lingui-explicit-id #: src/pages/status.jsx:599 -#: src/pages/status.jsx:1151 +#: src/pages/status.jsx:1158 msgid "post.title" msgstr "Post" -#: src/pages/status.jsx:842 +#: src/pages/status.jsx:849 msgid "You're not logged in. Interactions (reply, boost, etc) are not possible." msgstr "" -#: src/pages/status.jsx:862 +#: src/pages/status.jsx:869 msgid "This post is from another instance (<0>{instance}). Interactions (reply, boost, etc) are not possible." msgstr "" -#: src/pages/status.jsx:890 +#: src/pages/status.jsx:897 msgid "Error: {e}" msgstr "" -#: src/pages/status.jsx:897 +#: src/pages/status.jsx:904 msgid "Switch to my instance to enable interactions" msgstr "" -#: src/pages/status.jsx:999 +#: src/pages/status.jsx:1006 msgid "Unable to load replies." msgstr "" -#: src/pages/status.jsx:1111 +#: src/pages/status.jsx:1118 msgid "Back" msgstr "" -#: src/pages/status.jsx:1142 +#: src/pages/status.jsx:1149 msgid "Go to main post" msgstr "" #. placeholder {0}: ancestors.length -#: src/pages/status.jsx:1165 +#: src/pages/status.jsx:1172 msgid "{0} posts above ‒ Go to top" msgstr "" -#: src/pages/status.jsx:1208 -#: src/pages/status.jsx:1271 +#: src/pages/status.jsx:1215 +#: src/pages/status.jsx:1278 msgid "Switch to Side Peek view" msgstr "" -#: src/pages/status.jsx:1272 +#: src/pages/status.jsx:1279 msgid "Switch to Full view" msgstr "" -#: src/pages/status.jsx:1290 +#: src/pages/status.jsx:1297 msgid "Show all sensitive content" msgstr "" -#: src/pages/status.jsx:1295 +#: src/pages/status.jsx:1302 msgid "Experimental" msgstr "" -#: src/pages/status.jsx:1304 +#: src/pages/status.jsx:1311 msgid "Unable to switch" msgstr "" #. placeholder {0}: punycode.toUnicode( postInstance, ) -#: src/pages/status.jsx:1311 +#: src/pages/status.jsx:1318 msgid "Switch to post's instance ({0})" msgstr "Switch to post's instance ({0})" -#: src/pages/status.jsx:1314 +#: src/pages/status.jsx:1321 msgid "Switch to post's instance" msgstr "" -#: src/pages/status.jsx:1372 +#: src/pages/status.jsx:1379 msgid "Unable to load post" msgstr "" #. placeholder {0}: replies.length #. placeholder {1}: shortenNumber(replies.length) -#: src/pages/status.jsx:1508 +#: src/pages/status.jsx:1515 msgid "{0, plural, one {# reply} other {<0>{1} replies}}" msgstr "" #. placeholder {0}: shortenNumber(totalComments) -#: src/pages/status.jsx:1526 +#: src/pages/status.jsx:1533 msgid "{totalComments, plural, one {# comment} other {<0>{0} comments}}" msgstr "" -#: src/pages/status.jsx:1548 +#: src/pages/status.jsx:1555 msgid "View post with its replies" msgstr "" diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index c0b11a99..1ab62205 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -808,6 +808,7 @@ function Catchup() { preventDefault: true, ignoreModifiers: true, enableOnFormTags: ['input'], + useKey: true, }, ); diff --git a/src/pages/status.jsx b/src/pages/status.jsx index aa099578..5dec5668 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -644,12 +644,19 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) { const hasModal = !!document.querySelector('#modal-container > *'); return hasModal; }, + useKey: true, }, ); // For backspace, will always close both media and status page - useHotkeys('backspace', () => { - location.hash = closeLink; - }); + useHotkeys( + 'backspace', + () => { + location.hash = closeLink; + }, + { + useKey: true, + }, + ); useHotkeys( 'j',