Progress, Deck done
This commit is contained in:
@@ -3,7 +3,9 @@ import PropTypes from 'prop-types'
|
||||
import { connect } from 'react-redux'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { closePopover } from '../../actions/popover'
|
||||
import { openModal } from '../../actions/modal'
|
||||
import { meUsername } from '../../initial_state'
|
||||
import { MODAL_DISPLAY_OPTIONS } from '../../constants'
|
||||
import PopoverLayout from './popover_layout'
|
||||
import List from '../list'
|
||||
|
||||
@@ -13,6 +15,11 @@ class NavSettingsPopover extends React.PureComponent {
|
||||
this.props.onClosePopover()
|
||||
}
|
||||
|
||||
handleOpenDisplayOptions = () => {
|
||||
this.props.onOpenDisplayOptions()
|
||||
this.handleOnClosePopover()
|
||||
}
|
||||
|
||||
render() {
|
||||
const { intl, isXS } = this.props
|
||||
|
||||
@@ -29,6 +36,10 @@ class NavSettingsPopover extends React.PureComponent {
|
||||
to: `/${meUsername}`,
|
||||
onClick: this.handleOnClosePopover,
|
||||
},
|
||||
{
|
||||
title: 'Display options',
|
||||
onClick: this.handleOpenDisplayOptions,
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage(messages.help),
|
||||
href: 'https://help.gab.com',
|
||||
@@ -60,6 +71,9 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
onClosePopover() {
|
||||
dispatch(closePopover())
|
||||
},
|
||||
onOpenDisplayOptions() {
|
||||
dispatch(openModal(MODAL_DISPLAY_OPTIONS))
|
||||
}
|
||||
})
|
||||
|
||||
NavSettingsPopover.propTypes = {
|
||||
|
||||
Reference in New Issue
Block a user