diff options
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/features/drawer/header/index.js | 3 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/drawer/index.js | 30 |
2 files changed, 23 insertions, 10 deletions
diff --git a/app/javascript/flavours/glitch/features/drawer/header/index.js b/app/javascript/flavours/glitch/features/drawer/header/index.js index 6949cd028..deec42435 100644 --- a/app/javascript/flavours/glitch/features/drawer/header/index.js +++ b/app/javascript/flavours/glitch/features/drawer/header/index.js @@ -96,9 +96,8 @@ export default function DrawerHeader ({ <a aria-label={intl.formatMessage(messages.settings)} onClick={onSettingsClick} - role='button' + href='#' title={intl.formatMessage(messages.settings)} - tabIndex='0' ><Icon icon='cogs' /></a> <a aria-label={intl.formatMessage(messages.logout)} diff --git a/app/javascript/flavours/glitch/features/drawer/index.js b/app/javascript/flavours/glitch/features/drawer/index.js index e6a689575..1679e9a4b 100644 --- a/app/javascript/flavours/glitch/features/drawer/index.js +++ b/app/javascript/flavours/glitch/features/drawer/index.js @@ -37,14 +37,28 @@ const mapStateToProps = state => ({ }); // Dispatch mapping. -const mapDispatchToProps = { - onChange: changeSearch, - onClear: clearSearch, - onClickElefriend: cycleElefriendCompose, - onShow: showSearch, - onSubmit: submitSearch, - onOpenSettings: openModal.bind(null, 'SETTINGS', {}), -}; +const mapDispatchToProps = (dispatch, { intl }) => ({ + onChange (value) { + dispatch(changeSearch(value)); + }, + onClear () { + dispatch(clearSearch()); + }, + onClickElefriend () { + dispatch(cycleElefriendCompose()); + }, + onShow () { + dispatch(showSearch()); + }, + onSubmit () { + dispatch(submitSearch()); + }, + onOpenSettings (e) { + e.preventDefault(); + e.stopPropagation(); + dispatch(openModal('SETTINGS', {})); + }, +}); // The component. class Drawer extends React.Component { |