Continuing updating the reformatting of propTypes and set redux, intl functions to end of component
Continuing updating the reformatting of propTypes and set redux, intl functions to end of component
This commit is contained in:
@@ -6,47 +6,8 @@ import ModalLayout from './modal_layout'
|
||||
import Text from '../text'
|
||||
import Heading from '../heading'
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' },
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
hotkey: { id: 'keyboard_shortcuts.hotkey', defaultMessage: 'Hotkey' },
|
||||
reply: { id: 'keyboard_shortcuts.reply', defaultMessage: 'reply' },
|
||||
mention: { id: 'keyboard_shortcuts.mention', defaultMessage: 'mention author' },
|
||||
profile: { id: 'keyboard_shortcuts.profile', defaultMessage: 'open author\'s profile' },
|
||||
favorite: { id: 'keyboard_shortcuts.favorite', defaultMessage: 'favorite' },
|
||||
boost: { id: 'keyboard_shortcuts.boost', defaultMessage: 'repost' },
|
||||
enter: { id: 'keyboard_shortcuts.enter', defaultMessage: 'open status' },
|
||||
toggle_hidden: { id: 'keyboard_shortcuts.toggle_hidden', defaultMessage: 'show/hide text behind CW' },
|
||||
toggle_sensitivity: { id: 'keyboard_shortcuts.toggle_sensitivity', defaultMessage: 'show/hide media' },
|
||||
up: { id: 'keyboard_shortcuts.up', defaultMessage: 'move up in the list' },
|
||||
down: { id: 'keyboard_shortcuts.down', defaultMessage: 'move down in the list' },
|
||||
column: { id: 'keyboard_shortcuts.column', defaultMessage: 'focus a status in one of the columns' },
|
||||
compose: { id: 'keyboard_shortcuts.compose', defaultMessage: 'focus the compose textarea' },
|
||||
gab: { id: 'keyboard_shortcuts.toot', defaultMessage: 'start a brand new gab' },
|
||||
back: { id: 'keyboard_shortcuts.back', defaultMessage: 'navigate back' },
|
||||
search: { id: 'keyboard_shortcuts.search', defaultMessage: 'focus search' },
|
||||
unfocus: { id: 'keyboard_shortcuts.unfocus', defaultMessage: 'un-focus compose textarea/search' },
|
||||
home: { id: 'keyboard_shortcuts.home', defaultMessage: 'open home timeline' },
|
||||
notifications: { id: 'keyboard_shortcuts.notifications', defaultMessage: 'open notifications column' },
|
||||
start: { id: 'keyboard_shortcuts.start', defaultMessage: 'open "get started" column' },
|
||||
favorites: { id: 'keyboard_shortcuts.favorites', defaultMessage: 'open favorites list' },
|
||||
pinned: { id: 'keyboard_shortcuts.pinned', defaultMessage: 'open pinned gabs list' },
|
||||
my_profile: { id: 'keyboard_shortcuts.my_profile', defaultMessage: 'open your profile' },
|
||||
blocked: { id: 'keyboard_shortcuts.blocked', defaultMessage: 'open blocked users list' },
|
||||
muted: { id: 'keyboard_shortcuts.muted', defaultMessage: 'open muted users list' },
|
||||
requests: { id: 'keyboard_shortcuts.requests', defaultMessage: 'open follow requests list' },
|
||||
legend: { id: 'keyboard_shortcuts.legend', defaultMessage: 'display this legend' },
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class HotkeysModal extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { intl, onClose } = this.props
|
||||
|
||||
@@ -129,10 +90,6 @@ class HotkeysModal extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
class HotKeysModalRow extends React.PureComponent {
|
||||
static propTypes = {
|
||||
hotkey: PropTypes.string.isRequired,
|
||||
action: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { hotkey, action } = this.props
|
||||
@@ -154,4 +111,48 @@ class HotKeysModalRow extends React.PureComponent {
|
||||
</tr>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HotKeysModalRow.propTypes = {
|
||||
hotkey: PropTypes.string.isRequired,
|
||||
action: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'keyboard_shortcuts.heading', defaultMessage: 'Keyboard Shortcuts' },
|
||||
close: { id: 'lightbox.close', defaultMessage: 'Close' },
|
||||
hotkey: { id: 'keyboard_shortcuts.hotkey', defaultMessage: 'Hotkey' },
|
||||
reply: { id: 'keyboard_shortcuts.reply', defaultMessage: 'reply' },
|
||||
mention: { id: 'keyboard_shortcuts.mention', defaultMessage: 'mention author' },
|
||||
profile: { id: 'keyboard_shortcuts.profile', defaultMessage: 'open author\'s profile' },
|
||||
favorite: { id: 'keyboard_shortcuts.favorite', defaultMessage: 'favorite' },
|
||||
boost: { id: 'keyboard_shortcuts.boost', defaultMessage: 'repost' },
|
||||
enter: { id: 'keyboard_shortcuts.enter', defaultMessage: 'open status' },
|
||||
toggle_hidden: { id: 'keyboard_shortcuts.toggle_hidden', defaultMessage: 'show/hide text behind CW' },
|
||||
toggle_sensitivity: { id: 'keyboard_shortcuts.toggle_sensitivity', defaultMessage: 'show/hide media' },
|
||||
up: { id: 'keyboard_shortcuts.up', defaultMessage: 'move up in the list' },
|
||||
down: { id: 'keyboard_shortcuts.down', defaultMessage: 'move down in the list' },
|
||||
column: { id: 'keyboard_shortcuts.column', defaultMessage: 'focus a status in one of the columns' },
|
||||
compose: { id: 'keyboard_shortcuts.compose', defaultMessage: 'focus the compose textarea' },
|
||||
gab: { id: 'keyboard_shortcuts.toot', defaultMessage: 'start a brand new gab' },
|
||||
back: { id: 'keyboard_shortcuts.back', defaultMessage: 'navigate back' },
|
||||
search: { id: 'keyboard_shortcuts.search', defaultMessage: 'focus search' },
|
||||
unfocus: { id: 'keyboard_shortcuts.unfocus', defaultMessage: 'un-focus compose textarea/search' },
|
||||
home: { id: 'keyboard_shortcuts.home', defaultMessage: 'open home timeline' },
|
||||
notifications: { id: 'keyboard_shortcuts.notifications', defaultMessage: 'open notifications column' },
|
||||
start: { id: 'keyboard_shortcuts.start', defaultMessage: 'open "get started" column' },
|
||||
favorites: { id: 'keyboard_shortcuts.favorites', defaultMessage: 'open favorites list' },
|
||||
pinned: { id: 'keyboard_shortcuts.pinned', defaultMessage: 'open pinned gabs list' },
|
||||
my_profile: { id: 'keyboard_shortcuts.my_profile', defaultMessage: 'open your profile' },
|
||||
blocked: { id: 'keyboard_shortcuts.blocked', defaultMessage: 'open blocked users list' },
|
||||
muted: { id: 'keyboard_shortcuts.muted', defaultMessage: 'open muted users list' },
|
||||
requests: { id: 'keyboard_shortcuts.requests', defaultMessage: 'open follow requests list' },
|
||||
legend: { id: 'keyboard_shortcuts.legend', defaultMessage: 'display this legend' },
|
||||
})
|
||||
|
||||
HotkeysModal.propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
onClose: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
export default injectIntl(HotkeysModal)
|
||||
Reference in New Issue
Block a user