Added All/Community feed link in sidebars
• Added: - All/Community feed link in sidebars • Removed: - Setting for optionally showing community button in sidebar
This commit is contained in:
parent
02beb533c1
commit
cd159c8f5b
@ -11,7 +11,6 @@ const messages = defineMessages({
|
|||||||
title: { id: 'community_timeline_settings', defaultMessage: 'Community Feed Settings' },
|
title: { id: 'community_timeline_settings', defaultMessage: 'Community Feed Settings' },
|
||||||
saveAndClose: { id: 'saveClose', defaultMessage: 'Save & Close' },
|
saveAndClose: { id: 'saveClose', defaultMessage: 'Save & Close' },
|
||||||
onlyMedia: { id: 'community.column_settings.media_only', defaultMessage: 'Media Only' },
|
onlyMedia: { id: 'community.column_settings.media_only', defaultMessage: 'Media Only' },
|
||||||
showInSidebar: { id: 'show_in_sidebar', defaultMessage: 'Show in Sidebar' },
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const mapStateToProps = (state) => ({
|
const mapStateToProps = (state) => ({
|
||||||
@ -61,14 +60,6 @@ class CommunityTimelineSettingsModal extends ImmutablePureComponent {
|
|||||||
>
|
>
|
||||||
|
|
||||||
<div className={[_s.default, _s.pb10].join(' ')}>
|
<div className={[_s.default, _s.pb10].join(' ')}>
|
||||||
<SettingSwitch
|
|
||||||
prefix='community_timeline'
|
|
||||||
settings={settings}
|
|
||||||
settingPath={['shows', 'inSidebar']}
|
|
||||||
onChange={onChange}
|
|
||||||
label={intl.formatMessage(messages.showInSidebar)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SettingSwitch
|
<SettingSwitch
|
||||||
prefix='community_timeline'
|
prefix='community_timeline'
|
||||||
settings={settings}
|
settings={settings}
|
||||||
|
@ -43,7 +43,6 @@ const mapStateToProps = (state) => ({
|
|||||||
moreOpen: state.getIn(['popover', 'popoverType']) === 'SIDEBAR_MORE',
|
moreOpen: state.getIn(['popover', 'popoverType']) === 'SIDEBAR_MORE',
|
||||||
notificationCount: state.getIn(['notifications', 'unread']),
|
notificationCount: state.getIn(['notifications', 'unread']),
|
||||||
homeItemsQueueCount: state.getIn(['timelines', 'home', 'totalQueuedItemsCount']),
|
homeItemsQueueCount: state.getIn(['timelines', 'home', 'totalQueuedItemsCount']),
|
||||||
showCommunityTimeline: state.getIn(['settings', 'community', 'shows', 'inSidebar']),
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
@ -66,7 +65,6 @@ class Sidebar extends ImmutablePureComponent {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
account: ImmutablePropTypes.map,
|
account: ImmutablePropTypes.map,
|
||||||
showCommunityTimeline: PropTypes.bool,
|
|
||||||
moreOpen: PropTypes.bool,
|
moreOpen: PropTypes.bool,
|
||||||
onClose: PropTypes.func.isRequired,
|
onClose: PropTypes.func.isRequired,
|
||||||
onOpenComposeModal: PropTypes.func.isRequired,
|
onOpenComposeModal: PropTypes.func.isRequired,
|
||||||
@ -100,7 +98,6 @@ class Sidebar extends ImmutablePureComponent {
|
|||||||
account,
|
account,
|
||||||
notificationCount,
|
notificationCount,
|
||||||
homeItemsQueueCount,
|
homeItemsQueueCount,
|
||||||
showCommunityTimeline,
|
|
||||||
moreOpen,
|
moreOpen,
|
||||||
actions,
|
actions,
|
||||||
tabs,
|
tabs,
|
||||||
@ -121,12 +118,6 @@ class Sidebar extends ImmutablePureComponent {
|
|||||||
to: '/home',
|
to: '/home',
|
||||||
count: homeItemsQueueCount,
|
count: homeItemsQueueCount,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Community',
|
|
||||||
icon: 'community',
|
|
||||||
to: '/timeline/all',
|
|
||||||
hidden: !showCommunityTimeline,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Notifications',
|
title: 'Notifications',
|
||||||
icon: 'notifications',
|
icon: 'notifications',
|
||||||
@ -174,6 +165,11 @@ class Sidebar extends ImmutablePureComponent {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const exploreItems = [
|
const exploreItems = [
|
||||||
|
{
|
||||||
|
title: 'All',
|
||||||
|
icon: 'community',
|
||||||
|
to: '/timeline/all',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Chat',
|
title: 'Chat',
|
||||||
icon: 'chat',
|
icon: 'chat',
|
||||||
|
@ -131,6 +131,12 @@ class SidebarXS extends ImmutablePureComponent {
|
|||||||
onClick: this.handleSidebarClose,
|
onClick: this.handleSidebarClose,
|
||||||
title: intl.formatMessage(messages.preferences),
|
title: intl.formatMessage(messages.preferences),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: 'community',
|
||||||
|
to: '/timeline/all',
|
||||||
|
onClick: this.handleSidebarClose,
|
||||||
|
title: 'All'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
icon: 'list',
|
icon: 'list',
|
||||||
to: '/lists',
|
to: '/lists',
|
||||||
|
@ -26,7 +26,6 @@ const initialState = ImmutableMap({
|
|||||||
|
|
||||||
community: ImmutableMap({
|
community: ImmutableMap({
|
||||||
shows: ImmutableMap({
|
shows: ImmutableMap({
|
||||||
inSidebar: false,
|
|
||||||
onlyMedia: false,
|
onlyMedia: false,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user