kopia lustrzana https://github.com/nolanlawson/pinafore
c2bd2f306a
* Add support for keyboard shortcuts. This change introduces a Shortcut component for defining global keyboard shortcuts from whichever component makes more sense. This change also adds an initial set of navigation shortcuts: - Backspace to leave a modal dialog or to go back - g t to go to the federated timeline - g f to go to the favorite page - g h to go to the home page - g n to go to the notification page - g c to go to the community page - s to go to the search page These shortcuts are loaded asynchronously from _layout.html In modal dialogs, shortcuts are also modal, to avoid strange or overly complex behavior. This is implemented by grouping shortcuts into scopes, and activating a separate 'modal' scope when entering a modal dialog, so a separate set of shortcuts can be enabled in modal dialog. Modal dialogs can be exited by pressing 'Backspace'. * Navigate up/down lists using keyboard shortcuts. This change introduces keyboard shortcuts for navigating in lists and virtual lists. j or arrow up selects the next element, k or arrow down, the previous element. Selecting an element scrolls the list up and down, as necessary. This change also allows directing keyboard shortcuts to the active element and defines the following shortcuts, for the active status: - f to favorite or unfavorite it - b to boost or unboost it - r to reply to it - o to open its thread - x to toggle the display of a CW - y to toggle the display of sensitive medias This works by defining a keyboard shortcut scope for each list element. A new component, ScrollListShortcuts, keeps track of the active element, based on list or virtual list elements and redirects shortcuts to the active element's scope. ScrollListShortcuts keeps the active element in the current realm of the store, so the active element is restored when going back to the list. * Typing h or ? displays the list of available keyboard shortcuts. This change introduces a new modal dialog that documents the list of available shortcuts. |
||
---|---|---|
.. | ||
001-basic-spec.js | ||
002-login-spec.js | ||
003-basic-timeline-spec.js | ||
004-pinned-statuses.js | ||
005-status-types.js | ||
006-tabindex.js | ||
007-account-profile.js | ||
008-status-media.js | ||
009-threads.js | ||
010-focus.js | ||
011-reblog-favorites-count.js | ||
012-compose.js | ||
013-compose-media.js | ||
014-compose-post-privacy.js | ||
015-compose-content-warnings.js | ||
016-external-links.js | ||
017-compose-reply.js | ||
018-compose-autosuggest.js | ||
019-mention.js | ||
020-themes.js | ||
021-followers-follows.js | ||
022-status-aria-label.js | ||
023-mark-media-as-sensitive.js | ||
024-shortcuts-navigation.js | ||
025-shortcuts-status.js | ||
100-favorite-unfavorite.js | ||
101-reblog-unreblog.js | ||
102-notifications.js | ||
103-compose.js | ||
104-streaming.js | ||
105-deletes.js | ||
106-follow-requests.js | ||
107-streaming-gap.js | ||
108-compose-dialog.js | ||
109-compose-media.js | ||
110-compose-content-warnings.js | ||
111-focus.js | ||
112-status-links.js | ||
113-block-unblock.js | ||
114-mute-unmute.js | ||
115-follow-unfollow.js | ||
116-follow-requests.js | ||
117-pin-unpin.js | ||
118-display-name-custom-emoji.js | ||
119-status-counts-update.js | ||
120-status-aria-label.js | ||
121-delete-and-redraft.js | ||
122-replies-in-thread.js |