mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 03:43:42 +01:00
Treat the App Setting link as a proper link (fixes #375)
This commit is contained in:
parent
88b7ccc2ca
commit
3eb3c21327
2 changed files with 23 additions and 10 deletions
|
@ -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)}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue