Removed public/community timeline for non-admins
• Removed: - public/community timeline for non-admins - links to the page - web sockets for the page
This commit is contained in:
@@ -51,7 +51,6 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null,
|
||||
}
|
||||
|
||||
export const connectUserStream = () => connectTimelineStream('home', 'user');
|
||||
export const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);
|
||||
export const connectHashtagStream = (id, tag, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag&tag=${tag}`, null, accept);
|
||||
export const connectListStream = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);
|
||||
export const connectGroupStream = id => connectTimelineStream(`group:${id}`, `group&group=${id}`);
|
||||
|
||||
@@ -164,11 +164,6 @@ class Sidebar extends ImmutablePureComponent {
|
||||
]
|
||||
|
||||
const exploreItems = [
|
||||
{
|
||||
title: 'All',
|
||||
icon: 'community',
|
||||
to: '/timeline/all',
|
||||
},
|
||||
{
|
||||
title: 'Chat',
|
||||
icon: 'chat',
|
||||
|
||||
@@ -130,12 +130,6 @@ 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',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { expandCommunityTimeline } from '../actions/timelines'
|
||||
import { connectCommunityStream } from '../actions/streaming'
|
||||
import StatusList from '../components/status_list'
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -30,24 +29,13 @@ class CommunityTimeline extends PureComponent {
|
||||
const { dispatch, onlyMedia } = this.props
|
||||
|
||||
dispatch(expandCommunityTimeline({ onlyMedia }))
|
||||
this.disconnect = dispatch(connectCommunityStream({ onlyMedia }))
|
||||
}
|
||||
|
||||
componentDidUpdate (prevProps) {
|
||||
if (prevProps.onlyMedia !== this.props.onlyMedia) {
|
||||
const { dispatch, onlyMedia } = this.props
|
||||
|
||||
this.disconnect()
|
||||
|
||||
dispatch(expandCommunityTimeline({ onlyMedia }))
|
||||
this.disconnect = dispatch(connectCommunityStream({ onlyMedia }))
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
if (this.disconnect) {
|
||||
this.disconnect()
|
||||
this.disconnect = null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
|
||||
import ProgressPanel from '../components/panel/progress_panel'
|
||||
import TrendsPanel from '../components/panel/trends_panel'
|
||||
import DefaultLayout from '../layouts/default_layout'
|
||||
import TimelineComposeBlock from '../components/timeline_compose_block'
|
||||
import Divider from '../components/divider'
|
||||
|
||||
const messages = defineMessages({
|
||||
community: { 'id': 'column.community', 'defaultMessage': 'Community feed' },
|
||||
@@ -57,8 +55,6 @@ class CommunityPage extends PureComponent {
|
||||
)}
|
||||
>
|
||||
<PageTitle path={title} />
|
||||
<TimelineComposeBlock autoFocus={false} />
|
||||
<Divider />
|
||||
{children}
|
||||
</DefaultLayout>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user