From 81ef21a0c802f1d905f37a2a818544a8b400793c Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Sat, 25 Feb 2023 14:34:32 +0100 Subject: [Glitch] Rename JSX files with proper `.jsx` extension Port 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 to glitch-soc Signed-off-by: Claire --- .../glitch/features/keyboard_shortcuts/index.jsx | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx (limited to 'app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx') diff --git a/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx new file mode 100644 index 000000000..2bc0116d4 --- /dev/null +++ b/app/javascript/flavours/glitch/features/keyboard_shortcuts/index.jsx @@ -0,0 +1,149 @@ +import React from 'react'; +import Column from 'flavours/glitch/components/column'; +import { connect } from 'react-redux'; +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import PropTypes from 'prop-types'; +import ImmutablePureComponent from 'react-immutable-pure-component'; +import ColumnHeader from 'flavours/glitch/components/column_header'; +import { Helmet } from 'react-helmet'; + +const messages = defineMessages({ + heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' }, +}); + +const mapStateToProps = state => ({ + collapseEnabled: state.getIn(['local_settings', 'collapsed', 'enabled']), +}); + +export default @connect(mapStateToProps) +@injectIntl +class KeyboardShortcuts extends ImmutablePureComponent { + + static propTypes = { + intl: PropTypes.object.isRequired, + multiColumn: PropTypes.bool, + collapseEnabled: PropTypes.bool, + }; + + render () { + const { intl, collapseEnabled, multiColumn } = this.props; + + return ( + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {collapseEnabled && ( + + + + + )} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
r
m
p
f
b
d
enter, o
e
x
h
shift+x
up, k
down, j
1-9
n
alt+n
alt+x
backspace
s
alt+enter
esc
?
+
+ + + + +
+ ); + } + +} -- cgit