From cd159c8f5bfcc854eed9e6464a553d5c552e3e4a Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Fri, 15 May 2020 17:20:25 -0400 Subject: [PATCH] Added All/Community feed link in sidebars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - All/Community feed link in sidebars • Removed: - Setting for optionally showing community button in sidebar --- .../modal/community_timeline_settings_modal.js | 9 --------- app/javascript/gabsocial/components/sidebar.js | 14 +++++--------- app/javascript/gabsocial/components/sidebar_xs.js | 6 ++++++ app/javascript/gabsocial/reducers/settings.js | 1 - 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js b/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js index e6e13097..05b654d0 100644 --- a/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js +++ b/app/javascript/gabsocial/components/modal/community_timeline_settings_modal.js @@ -11,7 +11,6 @@ const messages = defineMessages({ title: { id: 'community_timeline_settings', defaultMessage: 'Community Feed Settings' }, saveAndClose: { id: 'saveClose', defaultMessage: 'Save & Close' }, onlyMedia: { id: 'community.column_settings.media_only', defaultMessage: 'Media Only' }, - showInSidebar: { id: 'show_in_sidebar', defaultMessage: 'Show in Sidebar' }, }) const mapStateToProps = (state) => ({ @@ -61,14 +60,6 @@ class CommunityTimelineSettingsModal extends ImmutablePureComponent { >
- - ({ moreOpen: state.getIn(['popover', 'popoverType']) === 'SIDEBAR_MORE', notificationCount: state.getIn(['notifications', 'unread']), homeItemsQueueCount: state.getIn(['timelines', 'home', 'totalQueuedItemsCount']), - showCommunityTimeline: state.getIn(['settings', 'community', 'shows', 'inSidebar']), }) const mapDispatchToProps = (dispatch) => ({ @@ -66,7 +65,6 @@ class Sidebar extends ImmutablePureComponent { static propTypes = { intl: PropTypes.object.isRequired, account: ImmutablePropTypes.map, - showCommunityTimeline: PropTypes.bool, moreOpen: PropTypes.bool, onClose: PropTypes.func.isRequired, onOpenComposeModal: PropTypes.func.isRequired, @@ -100,7 +98,6 @@ class Sidebar extends ImmutablePureComponent { account, notificationCount, homeItemsQueueCount, - showCommunityTimeline, moreOpen, actions, tabs, @@ -121,12 +118,6 @@ class Sidebar extends ImmutablePureComponent { to: '/home', count: homeItemsQueueCount, }, - { - title: 'Community', - icon: 'community', - to: '/timeline/all', - hidden: !showCommunityTimeline, - }, { title: 'Notifications', icon: 'notifications', @@ -174,6 +165,11 @@ class Sidebar extends ImmutablePureComponent { ] const exploreItems = [ + { + title: 'All', + icon: 'community', + to: '/timeline/all', + }, { title: 'Chat', icon: 'chat', diff --git a/app/javascript/gabsocial/components/sidebar_xs.js b/app/javascript/gabsocial/components/sidebar_xs.js index 92415856..0bd5dc00 100644 --- a/app/javascript/gabsocial/components/sidebar_xs.js +++ b/app/javascript/gabsocial/components/sidebar_xs.js @@ -131,6 +131,12 @@ class SidebarXS extends ImmutablePureComponent { onClick: this.handleSidebarClose, title: intl.formatMessage(messages.preferences), }, + { + icon: 'community', + to: '/timeline/all', + onClick: this.handleSidebarClose, + title: 'All' + }, { icon: 'list', to: '/lists', diff --git a/app/javascript/gabsocial/reducers/settings.js b/app/javascript/gabsocial/reducers/settings.js index ef4f6a53..5b3da3e3 100644 --- a/app/javascript/gabsocial/reducers/settings.js +++ b/app/javascript/gabsocial/reducers/settings.js @@ -26,7 +26,6 @@ const initialState = ImmutableMap({ community: ImmutableMap({ shows: ImmutableMap({ - inSidebar: false, onlyMedia: false, }), }),