From 7fd8797d20a2170c80049b2dabb448cbf003b9f7 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 12 Jun 2019 15:45:00 +0200 Subject: [PATCH] Add app settings link to single-column mode --- .../ui/components/navigation_panel.js | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js index a4bc57206..ddcd07aaa 100644 --- a/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js +++ b/app/javascript/flavours/glitch/features/ui/components/navigation_panel.js @@ -1,30 +1,50 @@ import React from 'react'; +import ImmutablePureComponent from 'react-immutable-pure-component'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import Icon from 'flavours/glitch/components/icon'; import NotificationsCounterIcon from './notifications_counter_icon'; import FollowRequestsNavLink from './follow_requests_nav_link'; import ListPanel from './list_panel'; +import { openModal } from 'flavours/glitch/actions/modal'; +import { connect } from 'react-redux'; -const NavigationPanel = () => ( -
- - - - - - - - +const mapStateToProps = () => {}; - +const mapDispatchToProps = dispatch => ({ + openSettings (e) { + e.preventDefault(); + e.stopPropagation(); + dispatch(openModal('SETTINGS', {})); + }, +}); -
+export default @connect(mapStateToProps, mapDispatchToProps) +@withRouter +class NavigationPanel extends ImmutablePureComponent { + render() { + const { openSettings } = this.props; - - - -
-); + return ( +
+ + + + + + + + -export default withRouter(NavigationPanel); + + +
+ + + + + +
+ ); + }; +};