this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "Test upgrade react-hotkeys-hook for the keys fix"

This reverts commit 9285a0ba9ad7f39b7ef3bc1d8e0a3af6ac97cc95.

+21 -37
+4 -4
package-lock.json
··· 31 31 "p-throttle": "~6.1.0", 32 32 "preact": "~10.20.1", 33 33 "punycode": "~2.3.1", 34 - "react-hotkeys-hook": "~5.0.0-1", 34 + "react-hotkeys-hook": "~4.5.0", 35 35 "react-intersection-observer": "~9.8.1", 36 36 "react-quick-pinch-zoom": "~5.1.0", 37 37 "react-router-dom": "6.6.2", ··· 7221 7221 } 7222 7222 }, 7223 7223 "node_modules/react-hotkeys-hook": { 7224 - "version": "5.0.0-1", 7225 - "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-5.0.0-1.tgz", 7226 - "integrity": "sha512-nb8WD8IBrlEn3O2nlMoaBrWCxg2/vjgK3XFquDMM50qMbRzlOrR/p4PUlvh0rfuOMqEtKTGaL5BwkCh3rZ3T1w==", 7224 + "version": "4.5.0", 7225 + "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-4.5.0.tgz", 7226 + "integrity": "sha512-Samb85GSgAWFQNvVt3PS90LPPGSf9mkH/r4au81ZP1yOIFayLC3QAvqTgGtJ8YEDMXtPmaVBs6NgipHO6h4Mug==", 7227 7227 "peerDependencies": { 7228 7228 "react": ">=16.8.1", 7229 7229 "react-dom": ">=16.8.1"
+1 -1
package.json
··· 33 33 "p-throttle": "~6.1.0", 34 34 "preact": "~10.20.1", 35 35 "punycode": "~2.3.1", 36 - "react-hotkeys-hook": "~5.0.0-1", 36 + "react-hotkeys-hook": "~4.5.0", 37 37 "react-intersection-observer": "~9.8.1", 38 38 "react-quick-pinch-zoom": "~5.1.0", 39 39 "react-router-dom": "6.6.2",
+1 -1
src/components/background-service.jsx
··· 1 1 import { memo } from 'preact/compat'; 2 2 import { useEffect, useRef, useState } from 'preact/hooks'; 3 + import { useHotkeys } from 'react-hotkeys-hook'; 3 4 4 5 import { api } from '../utils/api'; 5 6 import showToast from '../utils/show-toast'; 6 7 import states, { saveStatus } from '../utils/states'; 7 - import useHotkeys from '../utils/useHotkeys'; 8 8 import useInterval from '../utils/useInterval'; 9 9 import usePageVisibility from '../utils/usePageVisibility'; 10 10
+1 -1
src/components/columns.jsx
··· 1 + import { useHotkeys } from 'react-hotkeys-hook'; 1 2 import { useSnapshot } from 'valtio'; 2 3 3 4 import Bookmarks from '../pages/bookmarks'; ··· 11 12 import Search from '../pages/search'; 12 13 import Trending from '../pages/trending'; 13 14 import states from '../utils/states'; 14 - import useHotkeys from '../utils/useHotkeys'; 15 15 import useTitle from '../utils/useTitle'; 16 16 17 17 function Columns() {
+2 -1
src/components/compose-button.jsx
··· 1 + import { useHotkeys } from 'react-hotkeys-hook'; 2 + 1 3 import openCompose from '../utils/open-compose'; 2 4 import openOSK from '../utils/open-osk'; 3 5 import states from '../utils/states'; 4 - import useHotkeys from '../utils/useHotkeys'; 5 6 6 7 import Icon from './icon'; 7 8
+1 -1
src/components/compose.jsx
··· 5 5 import { deepEqual } from 'fast-equals'; 6 6 import { forwardRef } from 'preact/compat'; 7 7 import { useEffect, useMemo, useRef, useState } from 'preact/hooks'; 8 + import { useHotkeys } from 'react-hotkeys-hook'; 8 9 import stringLength from 'string-length'; 9 10 import { uid } from 'uid/single'; 10 11 import { useDebouncedCallback, useThrottledCallback } from 'use-debounce'; ··· 32 33 } from '../utils/store-utils'; 33 34 import supports from '../utils/supports'; 34 35 import useCloseWatcher from '../utils/useCloseWatcher'; 35 - import useHotkeys from '../utils/useHotkeys'; 36 36 import useInterval from '../utils/useInterval'; 37 37 import visibilityIconsMap from '../utils/visibility-icons-map'; 38 38
+1 -1
src/components/keyboard-shortcuts-help.jsx
··· 1 1 import './keyboard-shortcuts-help.css'; 2 2 3 3 import { memo } from 'preact/compat'; 4 + import { useHotkeys } from 'react-hotkeys-hook'; 4 5 import { useSnapshot } from 'valtio'; 5 6 6 7 import states from '../utils/states'; 7 - import useHotkeys from '../utils/useHotkeys'; 8 8 9 9 import Icon from './icon'; 10 10 import Modal from './modal';
+1 -1
src/components/media-modal.jsx
··· 7 7 useRef, 8 8 useState, 9 9 } from 'preact/hooks'; 10 + import { useHotkeys } from 'react-hotkeys-hook'; 10 11 11 12 import { oklab2rgb, rgb2oklab } from '../utils/color-utils'; 12 13 import showToast from '../utils/show-toast'; 13 14 import states from '../utils/states'; 14 - import useHotkeys from '../utils/useHotkeys'; 15 15 16 16 import Icon from './icon'; 17 17 import Link from './link';
+1 -1
src/components/modal.jsx
··· 2 2 3 3 import { createPortal } from 'preact/compat'; 4 4 import { useEffect, useRef } from 'preact/hooks'; 5 + import { useHotkeys } from 'react-hotkeys-hook'; 5 6 6 7 import useCloseWatcher from '../utils/useCloseWatcher'; 7 - import useHotkeys from '../utils/useHotkeys'; 8 8 9 9 const $modalContainer = document.getElementById('modal-container'); 10 10
+1 -2
src/components/search-command.jsx
··· 2 2 3 3 import { memo } from 'preact/compat'; 4 4 import { useRef, useState } from 'preact/hooks'; 5 - 6 - import useHotkeys from '../utils/useHotkeys'; 5 + import { useHotkeys } from 'react-hotkeys-hook'; 7 6 8 7 import SearchForm from './search-form'; 9 8
+1 -1
src/components/shortcuts.jsx
··· 3 3 import { MenuDivider } from '@szhsin/react-menu'; 4 4 import { memo } from 'preact/compat'; 5 5 import { useRef, useState } from 'preact/hooks'; 6 + import { useHotkeys } from 'react-hotkeys-hook'; 6 7 import { useNavigate } from 'react-router-dom'; 7 8 import { useSnapshot } from 'valtio'; 8 9 ··· 10 11 import { api } from '../utils/api'; 11 12 import { getLists } from '../utils/lists'; 12 13 import states from '../utils/states'; 13 - import useHotkeys from '../utils/useHotkeys'; 14 14 15 15 import AsyncText from './AsyncText'; 16 16 import Icon from './icon';
+1 -1
src/components/status.jsx
··· 22 22 useState, 23 23 } from 'preact/hooks'; 24 24 import punycode from 'punycode'; 25 + import { useHotkeys } from 'react-hotkeys-hook'; 25 26 import { useLongPress } from 'use-long-press'; 26 27 import { useSnapshot } from 'valtio'; 27 28 ··· 58 59 import { getCurrentAccountID } from '../utils/store-utils'; 59 60 import supports from '../utils/supports'; 60 61 import unfurlMastodonLink from '../utils/unfurl-link'; 61 - import useHotkeys from '../utils/useHotkeys'; 62 62 import useTruncated from '../utils/useTruncated'; 63 63 import visibilityIconsMap from '../utils/visibility-icons-map'; 64 64
+1 -1
src/components/timeline.jsx
··· 6 6 useRef, 7 7 useState, 8 8 } from 'preact/hooks'; 9 + import { useHotkeys } from 'react-hotkeys-hook'; 9 10 import { InView } from 'react-intersection-observer'; 10 11 import { useDebouncedCallback } from 'use-debounce'; 11 12 import { useSnapshot } from 'valtio'; ··· 16 17 import statusPeek from '../utils/status-peek'; 17 18 import { isMediaFirstInstance } from '../utils/store-utils'; 18 19 import { groupBoosts, groupContext } from '../utils/timeline-utils'; 19 - import useHotkeys from '../utils/useHotkeys'; 20 20 import useInterval from '../utils/useInterval'; 21 21 import usePageVisibility from '../utils/usePageVisibility'; 22 22 import useScroll from '../utils/useScroll';
+1 -1
src/pages/catchup.jsx
··· 14 14 useState, 15 15 } from 'preact/hooks'; 16 16 import punycode from 'punycode'; 17 + import { useHotkeys } from 'react-hotkeys-hook'; 17 18 import { useSearchParams } from 'react-router-dom'; 18 19 import { uid } from 'uid/single'; 19 20 ··· 41 42 import store from '../utils/store'; 42 43 import { getCurrentAccountID, getCurrentAccountNS } from '../utils/store-utils'; 43 44 import { assignFollowedTags } from '../utils/timeline-utils'; 44 - import useHotkeys from '../utils/useHotkeys'; 45 45 import useTitle from '../utils/useTitle'; 46 46 47 47 const FILTER_CONTEXT = 'home';
+1 -1
src/pages/notifications.jsx
··· 3 3 import { Fragment } from 'preact'; 4 4 import { memo } from 'preact/compat'; 5 5 import { useCallback, useEffect, useRef, useState } from 'preact/hooks'; 6 + import { useHotkeys } from 'react-hotkeys-hook'; 6 7 import { InView } from 'react-intersection-observer'; 7 8 import { useSearchParams } from 'react-router-dom'; 8 9 import { useSnapshot } from 'valtio'; ··· 28 29 import states, { saveStatus } from '../utils/states'; 29 30 import { getCurrentInstance } from '../utils/store-utils'; 30 31 import supports from '../utils/supports'; 31 - import useHotkeys from '../utils/useHotkeys'; 32 32 import usePageVisibility from '../utils/usePageVisibility'; 33 33 import useScroll from '../utils/useScroll'; 34 34 import useTitle from '../utils/useTitle';
+1 -1
src/pages/search.jsx
··· 2 2 3 3 import { useAutoAnimate } from '@formkit/auto-animate/preact'; 4 4 import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks'; 5 + import { useHotkeys } from 'react-hotkeys-hook'; 5 6 import { InView } from 'react-intersection-observer'; 6 7 import { useParams, useSearchParams } from 'react-router-dom'; 7 8 ··· 15 16 import { api } from '../utils/api'; 16 17 import { fetchRelationships } from '../utils/relationships'; 17 18 import shortenNumber from '../utils/shorten-number'; 18 - import useHotkeys from '../utils/useHotkeys'; 19 19 import usePageVisibility from '../utils/usePageVisibility'; 20 20 import useTitle from '../utils/useTitle'; 21 21
+1 -1
src/pages/status.jsx
··· 13 13 useState, 14 14 } from 'preact/hooks'; 15 15 import punycode from 'punycode'; 16 + import { useHotkeys } from 'react-hotkeys-hook'; 16 17 import { InView } from 'react-intersection-observer'; 17 18 import { matchPath, useSearchParams } from 'react-router-dom'; 18 19 import { useSnapshot } from 'valtio'; ··· 37 38 } from '../utils/states'; 38 39 import statusPeek from '../utils/status-peek'; 39 40 import { getCurrentAccount } from '../utils/store-utils'; 40 - import useHotkeys from '../utils/useHotkeys'; 41 41 import useScroll from '../utils/useScroll'; 42 42 import useTitle from '../utils/useTitle'; 43 43
-16
src/utils/useHotkeys.js
··· 1 - import { useHotkeys } from 'react-hotkeys-hook'; 2 - 3 - // Patch useHotKeys to add additional option 4 - // E.g. useHotkeys('!', callback, {useKey: true}) 5 - 6 - export default function (keys, callback, options, deps) { 7 - return useHotkeys( 8 - keys, 9 - callback, 10 - { 11 - useKey: true, 12 - ...options, 13 - }, 14 - deps, 15 - ); 16 - }