Progress
This commit is contained in:
@@ -41,7 +41,7 @@ class AccountGallery extends ImmutablePureComponent {
|
||||
componentDidMount() {
|
||||
const { accountId } = this.props
|
||||
|
||||
if (accountId) {
|
||||
if (accountId && accountId !== -1) {
|
||||
this.props.dispatch(expandAccountMediaTimeline(accountId))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import debounce from 'lodash.debounce'
|
||||
import { fetchBlocks, expandBlocks } from '../actions/blocks'
|
||||
import AccountContainer from '../containers/account_container'
|
||||
import Account from '../components/account'
|
||||
import ColumnIndicator from '../components/column_indicator'
|
||||
import ScrollableList from '../components/scrollable_list'
|
||||
|
||||
@@ -11,7 +11,7 @@ const messages = defineMessages({
|
||||
empty: { id: 'empty_column.blocks', defaultMessage: 'You haven\'t blocked any users yet.' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
accountIds: state.getIn(['user_lists', 'blocks', 'items']),
|
||||
hasMore: !!state.getIn(['user_lists', 'blocks', 'next']),
|
||||
})
|
||||
@@ -59,7 +59,7 @@ class Blocks extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
accountIds.map(id =>
|
||||
<AccountContainer key={`blocked-${id}`} id={id} compact />
|
||||
<Account key={`blocked-${id}`} id={id} compact />
|
||||
)
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -26,7 +26,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
},
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
domains: state.getIn(['domain_lists', 'blocks', 'items']),
|
||||
hasMore: !!state.getIn(['domain_lists', 'blocks', 'next']),
|
||||
})
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { expandCommunityTimeline } from '../actions/timelines'
|
||||
import { connectCommunityStream } from '../actions/streaming'
|
||||
import StatusListContainer from '../containers/status_list_container'
|
||||
import StatusList from '../components/status_list'
|
||||
|
||||
const messages = defineMessages({
|
||||
empty: { id: 'empty_column.community', defaultMessage: 'The community timeline is empty. Write something publicly to get the ball rolling!' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const onlyMedia = state.getIn(['settings', 'community', 'other', 'onlyMedia'])
|
||||
|
||||
return {
|
||||
onlyMedia,
|
||||
}
|
||||
}
|
||||
const mapStateToProps = (state) => ({
|
||||
onlyMedia: state.getIn(['settings', 'community', 'other', 'onlyMedia'])
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps)
|
||||
@@ -67,7 +63,7 @@ class CommunityTimeline extends PureComponent {
|
||||
const emptyMessage = intl.formatMessage(messages.empty)
|
||||
|
||||
return (
|
||||
<StatusListContainer
|
||||
<StatusList
|
||||
scrollKey='community_timeline'
|
||||
timelineId={`community${onlyMedia ? ':media' : ''}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
||||
@@ -270,7 +270,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
{
|
||||
shouldCondense &&
|
||||
<div className={[_s.default, _s.mr10, _s.mt5].join(' ')}>
|
||||
<Avatar account={account} size='28' />
|
||||
<Avatar account={account} size={28} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ const messages = defineMessages({
|
||||
emoji: { id: 'emoji_button.label', defaultMessage: 'Insert emoji' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['popover', 'popoverType']) === 'EMOJI_PICKER',
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick(targetRef) {
|
||||
dispatch(openPopover('EMOJI_PICKER', {
|
||||
|
||||
@@ -10,7 +10,7 @@ const messages = defineMessages({
|
||||
})
|
||||
|
||||
const makeMapStateToProps = () => {
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
acceptContentTypes: state.getIn(['media_attachments', 'accept_content_types']),
|
||||
disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => m.get('type') === 'video')),
|
||||
unavailable: state.getIn(['compose', 'poll']) !== null,
|
||||
@@ -20,10 +20,8 @@ const makeMapStateToProps = () => {
|
||||
return mapStateToProps
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
onSelectFile(files) {
|
||||
dispatch(uploadCompose(files))
|
||||
},
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onSelectFile: (files) => dispatch(uploadCompose(files)),
|
||||
})
|
||||
|
||||
export default
|
||||
|
||||
@@ -22,7 +22,7 @@ const mapStateToProps = (state, { id, otherProps }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onUndo: id => {
|
||||
dispatch(undoUploadCompose(id));
|
||||
|
||||
@@ -5,11 +5,9 @@ import Avatar from '../../../../components/avatar';
|
||||
import Button from '../../../../components/button'
|
||||
import { me } from '../../../../initial_state';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
account: state.getIn(['accounts', me]),
|
||||
};
|
||||
};
|
||||
const mapStateToProps = (state) => ({
|
||||
account: state.getIn(['accounts', me]),
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(mapStateToProps)
|
||||
|
||||
@@ -8,12 +8,12 @@ const messages = defineMessages({
|
||||
remove_poll: { id: 'poll_button.remove_poll', defaultMessage: 'Remove poll' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
unavailable: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 0),
|
||||
active: state.getIn(['compose', 'poll']) !== null,
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick() {
|
||||
dispatch((_, getState) => {
|
||||
|
||||
@@ -12,7 +12,7 @@ const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'rte_controls_visible']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick (status) {
|
||||
dispatch(changeRichTextEditorControlsVisibility(status))
|
||||
|
||||
@@ -10,11 +10,11 @@ const messages = defineMessages({
|
||||
schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
isPro: state.getIn(['accounts', me, 'is_pro']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onOpenDatePickerPopover(targetRef) {
|
||||
dispatch(openPopover('DATE_PICKER', {
|
||||
targetRef,
|
||||
|
||||
@@ -10,8 +10,7 @@ import Block from '../../../../components/block'
|
||||
import Heading from '../../../../components/heading'
|
||||
import Button from '../../../../components/button'
|
||||
import Text from '../../../../components/text'
|
||||
|
||||
import AccountContainer from '../../../../containers/account_container'
|
||||
import Account from '../../../../components/account'
|
||||
|
||||
export default class SearchResults extends ImmutablePureComponent {
|
||||
|
||||
@@ -65,7 +64,7 @@ export default class SearchResults extends ImmutablePureComponent {
|
||||
</div>
|
||||
|
||||
{
|
||||
results.get('accounts').slice(0, size).map(accountId => <AccountContainer expanded key={accountId} id={accountId} />)
|
||||
results.get('accounts').slice(0, size).map(accountId => <Account expanded key={accountId} id={accountId} />)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -6,12 +6,12 @@ const messages = defineMessages({
|
||||
markAsSensitive: { id: 'compose_form.sensitive.hide', defaultMessage: 'Mark media as sensitive' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'sensitive']),
|
||||
disabled: state.getIn(['compose', 'spoiler']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick () {
|
||||
dispatch(changeComposeSensitivity())
|
||||
|
||||
@@ -12,7 +12,7 @@ const mapStateToProps = (state) => ({
|
||||
active: state.getIn(['compose', 'spoiler']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onClick () {
|
||||
dispatch(changeComposeSpoilerness())
|
||||
|
||||
@@ -4,7 +4,7 @@ import ProgressBar from '../../../../components/progress_bar'
|
||||
import Upload from '../media_upload_item'
|
||||
import SensitiveMediaButton from '../sensitive_media_button'
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
mediaIds: state.getIn(['compose', 'media_attachments']).map(item => item.get('id')),
|
||||
isUploading: state.getIn(['compose', 'is_uploading']),
|
||||
uploadProgress: state.getIn(['compose', 'progress']),
|
||||
|
||||
@@ -20,7 +20,7 @@ const messages = defineMessages({
|
||||
home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },
|
||||
notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' },
|
||||
public: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },
|
||||
community: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },
|
||||
community: { id: 'navigation_bar.community_timeline', defaultMessage: 'Community timeline' },
|
||||
preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
|
||||
logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
|
||||
compose: { id: 'navigation_bar.compose', defaultMessage: 'Compose new gab' },
|
||||
|
||||
@@ -6,14 +6,14 @@ import {
|
||||
selectComposeSuggestion,
|
||||
} from '../../../actions/compose';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
suggestions: state.getIn(['compose', 'suggestions']),
|
||||
options: state.getIn(['compose', 'poll', 'options']),
|
||||
expiresIn: state.getIn(['compose', 'poll', 'expires_in']),
|
||||
isMultiple: state.getIn(['compose', 'poll', 'multiple']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onAddOption(title) {
|
||||
dispatch(addPollOption(title));
|
||||
},
|
||||
|
||||
@@ -2,12 +2,12 @@ import SearchResults from '../components/search_results';
|
||||
import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
results: state.getIn(['search', 'results']),
|
||||
suggestions: state.getIn(['suggestions', 'items']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchSuggestions: () => dispatch(fetchSuggestions()),
|
||||
dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { fetchReposts } from '../actions/interactions';
|
||||
import { fetchStatus } from '../actions/statuses';
|
||||
import { makeGetStatus } from '../selectors';
|
||||
import AccountContainer from '../containers/account_container';
|
||||
import Account from '../components/account';
|
||||
import ColumnIndicator from '../components/column_indicator';
|
||||
import ScrollableList from '../components/scrollable_list';
|
||||
|
||||
@@ -60,7 +60,7 @@ class Favorites extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
accountIds.map(id =>
|
||||
<AccountContainer key={id} id={id} />
|
||||
<Account key={id} id={id} />
|
||||
)
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -11,7 +11,7 @@ const messages = defineMessages({
|
||||
heading: { id: 'column.follow_requests', defaultMessage: 'Follow requests' },
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
accountIds: state.getIn(['user_lists', 'follow_requests', 'items']),
|
||||
hasMore: !!state.getIn(['user_lists', 'follow_requests', 'next']),
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
fetchFollowers,
|
||||
expandFollowers,
|
||||
} from '../actions/accounts'
|
||||
import AccountContainer from '../containers/account_container'
|
||||
import Account from '../components/account'
|
||||
import ScrollableList from '../components/scrollable_list'
|
||||
import Block from '../components/block'
|
||||
import Heading from '../components/heading'
|
||||
@@ -88,7 +88,7 @@ class Followers extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
!!accountIds && accountIds.map((id) => (
|
||||
<AccountContainer key={`follower-${id}`} id={id} compact />
|
||||
<Account key={`follower-${id}`} id={id} compact />
|
||||
))
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
fetchFollowing,
|
||||
expandFollowing,
|
||||
} from '../actions/accounts'
|
||||
import AccountContainer from '../containers/account_container'
|
||||
import Account from '../components/account'
|
||||
import ScrollableList from '../components/scrollable_list'
|
||||
import Block from '../components/block'
|
||||
import Heading from '../components/heading'
|
||||
@@ -88,7 +88,7 @@ class Following extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
!!accountIds && accountIds.map((id) => (
|
||||
<AccountContainer key={`following-${id}`} id={id} compact />
|
||||
<Account key={`following-${id}`} id={id} compact />
|
||||
))
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -34,7 +34,7 @@ const mapStateToProps = (state, { params }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onTitleChange: value => dispatch(changeValue('title', value)),
|
||||
onDescriptionChange: value => dispatch(changeValue('description', value)),
|
||||
onCoverImageChange: value => dispatch(changeValue('coverImage', value)),
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
createRemovedAccount,
|
||||
} from '../actions/groups';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import AccountContainer from '../containers/account_container';
|
||||
import Account from '../components/account';
|
||||
import ScrollableList from '../components/scrollable_list';
|
||||
|
||||
const mapStateToProps = (state, { params: { id } }) => ({
|
||||
@@ -71,7 +71,7 @@ class GroupMembers extends ImmutablePureComponent {
|
||||
|
||||
return (
|
||||
<div className="group-account-wrapper" key={id}>
|
||||
<AccountContainer id={id} actionIcon="none" onActionClick={() => true} />
|
||||
<Account id={id} actionIcon="none" onActionClick={() => true} />
|
||||
{ /*
|
||||
menu.length > 0 && <DropdownMenuContainer items={menu} icon='ellipsis-h' size={18} direction='right' />
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
removeRemovedAccount,
|
||||
} from '../actions/groups';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import AccountContainer from '../containers/account_container';
|
||||
import Account from '../components/account';
|
||||
import ScrollableList from '../components/scrollable_list';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
@@ -64,7 +64,7 @@ class GroupRemovedAccounts extends ImmutablePureComponent {
|
||||
onLoadMore={this.handleLoadMore}
|
||||
emptyMessage={<FormattedMessage id='group.removed_accounts.empty' defaultMessage='This group does not has any removed accounts.' />}
|
||||
>
|
||||
{accountIds.map(id => (<AccountContainer
|
||||
{accountIds.map(id => (<Account
|
||||
key={id}
|
||||
id={id}
|
||||
actionIcon='remove'
|
||||
|
||||
@@ -5,8 +5,7 @@ import { Link } from 'react-router-dom'
|
||||
import classNames from 'classnames'
|
||||
import { connectGroupStream } from '../actions/streaming'
|
||||
import { expandGroupTimeline } from '../actions/timelines'
|
||||
import StatusListContainer from '../containers/status_list_container'
|
||||
// import ColumnSettingsContainer from './containers/column_settings_container'
|
||||
import StatusList from '../components/status_list'
|
||||
import ColumnIndicator from '../components/column_indicator'
|
||||
|
||||
const messages = defineMessages({
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import ColumnSettings from '../components/column_settings';
|
||||
import { changeSetting, saveSettings } from '../../../../actions/settings';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
settings: state.getIn(['settings', 'group']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
onChange (key, checked) {
|
||||
dispatch(changeSetting(['group', ...key], checked));
|
||||
|
||||
@@ -2,7 +2,7 @@ import { FormattedMessage } from 'react-intl'
|
||||
import isEqual from 'lodash.isequal'
|
||||
import { expandHashtagTimeline, clearTimeline } from '../actions/timelines'
|
||||
import { connectHashtagStream } from '../actions/streaming'
|
||||
import StatusListContainer from '../containers/status_list_container'
|
||||
import StatusList from '../components/status_list'
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
|
||||
@@ -128,7 +128,7 @@ class HashtagTimeline extends PureComponent {
|
||||
const { id } = this.props.params
|
||||
|
||||
return (
|
||||
<StatusListContainer
|
||||
<StatusList
|
||||
scrollKey='hashtag_timeline'
|
||||
timelineId={`hashtag:${id}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { expandHomeTimeline } from '../actions/timelines'
|
||||
import StatusListContainer from '../containers/status_list_container'
|
||||
import StatusList from '../components/status_list'
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.home', defaultMessage: 'Home' },
|
||||
empty: { id: 'empty_column.home', defaultMessage: 'Your home timeline is empty. Start following other users to recieve their content here.' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
isPartial: state.getIn(['timelines', 'home', 'isPartial']),
|
||||
})
|
||||
|
||||
@@ -63,7 +63,7 @@ class HomeTimeline extends PureComponent {
|
||||
const emptyMessage = intl.formatMessage(messages.empty)
|
||||
|
||||
return (
|
||||
<StatusListContainer
|
||||
<StatusList
|
||||
scrollKey='home_timeline'
|
||||
onLoadMore={this.handleLoadMore}
|
||||
timelineId='home'
|
||||
|
||||
@@ -21,7 +21,7 @@ const mapStateToProps = (state, { accountId }) => ({
|
||||
account: state.getIn(['accounts', accountId]),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onInitialize: accountId => dispatch(setupListAdder(accountId)),
|
||||
onReset: () => dispatch(resetListAdder()),
|
||||
});
|
||||
|
||||
@@ -9,12 +9,12 @@ const messages = defineMessages({
|
||||
create: { id: 'lists.new.create_title', defaultMessage: 'Create' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
value: state.getIn(['listEditor', 'title']),
|
||||
disabled: state.getIn(['listEditor', 'isSubmitting']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onChange: value => dispatch(changeListEditorTitle(value)),
|
||||
onSubmit: () => dispatch(submitListEditor(true)),
|
||||
})
|
||||
|
||||
@@ -6,12 +6,12 @@ const messages = defineMessages({
|
||||
save: { id: 'lists.new.save_title', defaultMessage: 'Save Title' },
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
value: state.getIn(['listEditor', 'title']),
|
||||
disabled: !state.getIn(['listEditor', 'isChanged']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onChange: value => dispatch(changeListEditorTitle(value)),
|
||||
onSubmit: () => dispatch(submitListEditor(false)),
|
||||
});
|
||||
|
||||
@@ -7,11 +7,11 @@ const messages = defineMessages({
|
||||
searchTitle: { id: 'tabs_bar.search', defaultMessage: 'Search' },
|
||||
});
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
value: state.getIn(['listEditor', 'suggestions', 'value']),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onSubmit: value => dispatch(fetchListSuggestions(value)),
|
||||
onClear: () => dispatch(clearListSuggestions()),
|
||||
onChange: value => dispatch(changeListSuggestions(value)),
|
||||
|
||||
@@ -23,7 +23,7 @@ const mapStateToProps = (state, { params }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onInitialize: listId => dispatch(setupListEditor(listId)),
|
||||
onReset: () => dispatch(resetListEditor()),
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ import { connectListStream } from '../actions/streaming';
|
||||
import { expandListTimeline } from '../actions/timelines';
|
||||
import { fetchList, deleteList } from '../actions/lists';
|
||||
import { openModal } from '../actions/modal';
|
||||
import StatusListContainer from '../containers/status_list_container';
|
||||
import StatusList from '../components/status_list';
|
||||
import ColumnIndicator from '../components/column_indicator';
|
||||
import Button from '../components/button';
|
||||
|
||||
@@ -112,7 +112,7 @@ class ListTimeline extends ImmutablePureComponent {
|
||||
);
|
||||
|
||||
return (
|
||||
<StatusListContainer
|
||||
<StatusList
|
||||
scrollKey='list_timeline'
|
||||
timelineId={`list:${id}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
||||
@@ -17,7 +17,7 @@ const getOrderedLists = createSelector([state => state.get('lists')], lists => {
|
||||
return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')))
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
lists: getOrderedLists(state),
|
||||
})
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import debounce from 'lodash.debounce'
|
||||
import { fetchMutes, expandMutes } from '../actions/mutes'
|
||||
import AccountContainer from '../containers/account_container'
|
||||
import Account from '../components/account'
|
||||
import ColumnIndicator from '../components/column_indicator'
|
||||
import ScrollableList from '../components/scrollable_list'
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
accountIds: state.getIn(['user_lists', 'mutes', 'items']),
|
||||
hasMore: !!state.getIn(['user_lists', 'mutes', 'next']),
|
||||
})
|
||||
@@ -48,7 +48,7 @@ class Mutes extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
accountIds.map(id =>
|
||||
<AccountContainer key={`mutes-${id}`} id={id} compact />
|
||||
<Account key={`mutes-${id}`} id={id} compact />
|
||||
)
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -4,7 +4,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { HotKeys } from 'react-hotkeys'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import StatusContainer from '../../../containers/status_container'
|
||||
import AccountContainer from '../../../containers/account_container'
|
||||
import Avatar from '../../../components/avatar'
|
||||
import Icon from '../../../components/icon'
|
||||
import Text from '../../../components/text'
|
||||
@@ -46,269 +45,95 @@ class Notification extends ImmutablePureComponent {
|
||||
type: PropTypes.string.isRequired,
|
||||
}
|
||||
|
||||
renderMention = () => {
|
||||
const { intl, accounts, createdAt, statusId } = this.props
|
||||
|
||||
if (accounts.size === 0) return null
|
||||
const account = accounts.get(0)
|
||||
|
||||
// : todo : render statuscontainer or commentcontainer
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.px10].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id='comment' height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexGrow1].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<NavLink to={`/${account.get('acct')}`}>
|
||||
<Avatar size='30' account={account} />
|
||||
</NavLink>
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={_s.text}>
|
||||
<DisplayName account={account} noUsername />
|
||||
</div>
|
||||
<Text size='medium'>
|
||||
{' '}
|
||||
{intl.formatMessage(messages.mentionedInPost)}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.pt10, _s.mt5].join(' ')}>
|
||||
<StatusContainer
|
||||
id={statusId}
|
||||
isChild
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
renderPoll = () => {
|
||||
const { intl, statusId } = this.props
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.px10].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id='poll' height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexGrow1].join(' ')}>
|
||||
<div className={[_s.default, _s.pt5].join(' ')}>
|
||||
<Text size='medium'>
|
||||
{intl.formatMessage(messages.poll)}
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
<div className={[_s.default, _s.pt10, _s.mt10].join(' ')}>
|
||||
<StatusContainer
|
||||
id={statusId}
|
||||
isChild
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
renderFollow = () => {
|
||||
const { intl, accounts, statusId } = this.props
|
||||
|
||||
const count = accounts.size
|
||||
if (count === 0) return null
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.px10, _s.cursorPointer, _s.backgroundSubtle_onHover].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id='group' height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexGrow1].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
{
|
||||
accounts.slice(0, 8).map((account, i) => (
|
||||
<NavLink
|
||||
to={`/${account.get('acct')}`}
|
||||
key={`fav-avatar-${i}`}
|
||||
className={_s.mr5}
|
||||
>
|
||||
<Avatar size='30' account={account} />
|
||||
</NavLink>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={_s.text}>
|
||||
{
|
||||
accounts.slice(0, 1).map((account, i) => (
|
||||
<DisplayName key={i} account={account} noUsername />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<Text size='medium'>
|
||||
{' '}
|
||||
{intl.formatMessage(count > 1 ? messages.followedYouMultiple : messages.followedYouOne, {
|
||||
count: count - 1,
|
||||
})}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
renderLike = () => {
|
||||
const { intl, accounts, statusId } = this.props
|
||||
|
||||
const count = accounts.size
|
||||
if (count === 0 || !statusId) return null
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.px10, _s.cursorPointer, _s.backgroundSubtle_onHover].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id='like' height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexGrow1].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
{
|
||||
accounts.slice(0, 8).map((account, i) => (
|
||||
<NavLink
|
||||
to={`/${account.get('acct')}`}
|
||||
key={`fav-avatar-${i}`}
|
||||
className={_s.mr5}
|
||||
>
|
||||
<Avatar size='30' account={account} />
|
||||
</NavLink>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={_s.text}>
|
||||
{
|
||||
accounts.slice(0, 1).map((account, i) => (
|
||||
<DisplayName key={i} account={account} noUsername />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<Text size='medium'>
|
||||
{' '}
|
||||
{intl.formatMessage(count > 1 ? messages.likedStatusMultiple : messages.likedStatusOne, {
|
||||
count: count - 1,
|
||||
})}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10, _s.mt5].join(' ')}>
|
||||
<StatusContainer
|
||||
id={statusId}
|
||||
isChild
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
renderRepost = () => {
|
||||
const { intl, accounts, statusId } = this.props
|
||||
|
||||
const count = accounts.size
|
||||
if (count === 0 || !statusId) return null
|
||||
|
||||
return (
|
||||
<div className={[_s.default, _s.px10, _s.cursorPointer, _s.backgroundSubtle_onHover].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id='repost' height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexGrow1].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
{
|
||||
accounts.slice(0, 8).map((account, i) => (
|
||||
<NavLink
|
||||
to={`/${account.get('acct')}`}
|
||||
key={`fav-avatar-${i}`}
|
||||
className={_s.mr5}
|
||||
>
|
||||
<Avatar size='30' account={account} />
|
||||
</NavLink>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={_s.text}>
|
||||
{
|
||||
accounts.slice(0, 1).map((account, i) => (
|
||||
<DisplayName key={i} account={account} noUsername />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<Text size='medium'>
|
||||
{' '}
|
||||
{intl.formatMessage(count > 1 ? messages.repostedStatusMultiple : messages.repostedStatusOne, {
|
||||
count: count - 1,
|
||||
})}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10, _s.mt5].join(' ')}>
|
||||
<StatusContainer
|
||||
id={statusId}
|
||||
isChild
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { type } = this.props
|
||||
const { intl, accounts, createdAt, type, statusId } = this.props
|
||||
|
||||
const count = !!accounts ? accounts.size : 0
|
||||
|
||||
let message
|
||||
let icon
|
||||
switch (type) {
|
||||
case 'follow':
|
||||
return this.renderFollow()
|
||||
icon = 'group'
|
||||
message = intl.formatMessage(count > 1 ? messages.followedYouMultiple : messages.followedYouOne, {
|
||||
count: count - 1,
|
||||
})
|
||||
break
|
||||
case 'mention':
|
||||
return this.renderMention()
|
||||
icon = 'comment'
|
||||
message = intl.formatMessage(messages.mentionedInPost)
|
||||
break
|
||||
case 'like':
|
||||
return this.renderLike()
|
||||
icon = 'like'
|
||||
message = intl.formatMessage(count > 1 ? messages.likedStatusMultiple : messages.likedStatusOne, {
|
||||
count: count - 1,
|
||||
})
|
||||
break
|
||||
case 'repost':
|
||||
return this.renderRepost();
|
||||
icon = 'repost'
|
||||
message = intl.formatMessage(count > 1 ? messages.repostedStatusMultiple : messages.repostedStatusOne, {
|
||||
count: count - 1,
|
||||
})
|
||||
break
|
||||
case 'poll':
|
||||
return this.renderPoll()
|
||||
icon = 'poll'
|
||||
message = intl.formatMessage(messages.poll)
|
||||
break
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
return null
|
||||
return (
|
||||
<div className={[_s.default, _s.px10, _s.cursorPointer, _s.backgroundSubtle_onHover].join(' ')}>
|
||||
<div className={[_s.default, _s.borderBottom1PX, _s.borderColorSecondary].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow, _s.my10, _s.py10, _s.px10].join(' ')}>
|
||||
|
||||
<Icon id={icon} height='20px' width='20px' className={_s.mt5} />
|
||||
|
||||
<div className={[_s.default, _s.ml15, _s.flexNormal].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
{
|
||||
accounts.slice(0, 8).map((account, i) => (
|
||||
<NavLink
|
||||
to={`/${account.get('acct')}`}
|
||||
key={`fav-avatar-${i}`}
|
||||
className={_s.mr5}
|
||||
>
|
||||
<Avatar size={30} account={account} />
|
||||
</NavLink>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div className={[_s.default, _s.pt10].join(' ')}>
|
||||
<div className={[_s.default, _s.flexRow].join(' ')}>
|
||||
<div className={_s.text}>
|
||||
{
|
||||
accounts.slice(0, 1).map((account, i) => (
|
||||
<DisplayName key={i} account={account} noUsername />
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<Text size='medium'>
|
||||
{' '}
|
||||
{message}
|
||||
</Text>
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
!!statusId &&
|
||||
<div className={[_s.default, _s.pt10, _s.mt5].join(' ')}>
|
||||
<StatusContainer
|
||||
id={statusId}
|
||||
isChild
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ const makeMapStateToProps = () => {
|
||||
return mapStateToProps
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onMention: (account, router) => {
|
||||
dispatch(mentionCompose(account, router))
|
||||
},
|
||||
|
||||
@@ -16,22 +16,8 @@ import LoadMore from '../../components/load_more'
|
||||
import TimelineQueueButtonHeader from '../../components/timeline_queue_button_header'
|
||||
import Block from '../../components/block'
|
||||
|
||||
const getNotifications = createSelector([
|
||||
state => state.getIn(['notifications', 'filter', 'active']),
|
||||
state => ImmutableList(state.getIn(['settings', 'notifications', 'shows']).filter(item => !item).keys()),
|
||||
state => state.getIn(['notifications', 'items']),
|
||||
], (allowedType, excludedTypes, notifications) => {
|
||||
if (allowedType === 'all') {
|
||||
// used if user changed the notification settings after loading the notifications from the server
|
||||
// otherwise a list of notifications will come pre-filtered from the backend
|
||||
// we need to turn it off for FilterBar in order not to block ourselves from seeing a specific category
|
||||
return notifications.filterNot(item => item !== null && excludedTypes.includes(item.get('type')))
|
||||
}
|
||||
return notifications.filter(item => item !== null && allowedType === item.get('type'))
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
notifications: getNotifications(state),
|
||||
const mapStateToProps = (state) => ({
|
||||
notifications: state.getIn(['notifications', 'items']),
|
||||
isLoading: state.getIn(['notifications', 'isLoading'], true),
|
||||
isUnread: state.getIn(['notifications', 'unread']) > 0,
|
||||
hasMore: state.getIn(['notifications', 'hasMore']),
|
||||
@@ -112,6 +98,7 @@ class Notifications extends ImmutablePureComponent {
|
||||
}
|
||||
|
||||
handleDequeueNotifications = () => {
|
||||
window.scrollTo(0, 0)
|
||||
this.props.dispatch(dequeueNotifications())
|
||||
}
|
||||
|
||||
@@ -129,7 +116,7 @@ class Notifications extends ImmutablePureComponent {
|
||||
|
||||
// : todo : include follow requests
|
||||
|
||||
// console.log('notifications:', notifications)
|
||||
console.log('--0--notifications:', notifications)
|
||||
|
||||
if (isLoading && this.scrollableContent) {
|
||||
scrollableContent = this.scrollableContent
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl'
|
||||
import { fetchReposts } from '../actions/interactions'
|
||||
import { fetchStatus } from '../actions/statuses'
|
||||
import { makeGetStatus } from '../selectors'
|
||||
import AccountContainer from '../containers/account_container'
|
||||
import Account from '../components/account'
|
||||
import ColumnIndicator from '../components/column_indicator'
|
||||
import ScrollableList from '../components/scrollable_list'
|
||||
|
||||
@@ -60,7 +60,7 @@ class Reposts extends ImmutablePureComponent {
|
||||
>
|
||||
{
|
||||
accountIds.map(id =>
|
||||
<AccountContainer key={id} id={id} />
|
||||
<Account key={id} id={id} />
|
||||
)
|
||||
}
|
||||
</ScrollableList>
|
||||
|
||||
@@ -30,7 +30,7 @@ import { openModal } from '../../actions/modal'
|
||||
import { boostModal, deleteModal, me } from '../../initial_state'
|
||||
import { makeGetStatus } from '../../selectors'
|
||||
import StatusContainer from '../../containers/status_container'
|
||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status/status'
|
||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status'
|
||||
import ColumnIndicator from '../../components/column_indicator'
|
||||
import Block from '../../components/block'
|
||||
import CommentList from '../../components/comment_list'
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
import { HotKeys } from 'react-hotkeys'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { Switch, Redirect, withRouter } from 'react-router-dom'
|
||||
import { debounce } from 'lodash'
|
||||
import debounce from 'lodash.debounce'
|
||||
import { uploadCompose, resetCompose } from '../../actions/compose'
|
||||
import { expandHomeTimeline } from '../../actions/timelines'
|
||||
import {
|
||||
initializeNotifications,
|
||||
expandNotifications,
|
||||
} from '../../actions/notifications'
|
||||
import LoadingBarContainer from '../../containers/loading_bar_container'
|
||||
import LoadingBar from '../../components/loading_bar'
|
||||
import { fetchFilters } from '../../actions/filters'
|
||||
import { clearHeight } from '../../actions/height_cache'
|
||||
import { openModal } from '../../actions/modal'
|
||||
@@ -37,9 +37,9 @@ import SettingsPage from '../../pages/settings_page'
|
||||
import {
|
||||
AccountGallery,
|
||||
AccountTimeline,
|
||||
Blocks,
|
||||
BlockedAccounts,
|
||||
BlockedDomains,
|
||||
CommunityTimeline,
|
||||
DomainBlocks,
|
||||
// Favorites,
|
||||
// Filters,
|
||||
Followers,
|
||||
@@ -78,7 +78,7 @@ const messages = defineMessages({
|
||||
publish: { id: 'compose_form.publish', defaultMessage: 'Gab' },
|
||||
})
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
const mapStateToProps = (state) => ({
|
||||
isComposing: state.getIn(['compose', 'is_composing']),
|
||||
hasComposingText: state.getIn(['compose', 'text']).trim().length !== 0,
|
||||
hasMediaAttachments: state.getIn(['compose', 'media_attachments']).size > 0,
|
||||
@@ -182,8 +182,8 @@ class SwitchingArea extends PureComponent {
|
||||
<WrappedRoute path='/settings/billing' exact page={SettingsPage} component={Billing} content={children} />
|
||||
*/ }
|
||||
|
||||
<WrappedRoute path='/settings/blocks' exact page={SettingsPage} component={Blocks} content={children} componentParams={{ title: 'Blocked Accounts' }} />
|
||||
<WrappedRoute path='/settings/domain-blocks' exact page={SettingsPage} component={DomainBlocks} content={children} componentParams={{ title: 'Domain Blocks' }} />
|
||||
<WrappedRoute path='/settings/blocks' exact page={SettingsPage} component={BlockedAccounts} content={children} componentParams={{ title: 'Blocked Accounts' }} />
|
||||
<WrappedRoute path='/settings/domain-blocks' exact page={SettingsPage} component={BlockedDomains} content={children} componentParams={{ title: 'Blocked Domains' }} />
|
||||
{ /* <WrappedRoute path='/settings/filters' exact page={SettingsPage} component={Filters} content={children} componentParams={{ title: 'Muted Words' }} /> */ }
|
||||
<WrappedRoute path='/settings/mutes' exact page={SettingsPage} component={Mutes} content={children} componentParams={{ title: 'Muted Accounts' }} />
|
||||
|
||||
@@ -496,7 +496,7 @@ class UI extends PureComponent {
|
||||
|
||||
return (
|
||||
<div ref={this.setRef}>
|
||||
<LoadingBarContainer className={[_s.height1PX, _s.z3, _s.backgroundColorBrandLight].join(' ')} />
|
||||
<LoadingBar className={[_s.height1PX, _s.z3, _s.backgroundColorBrandLight].join(' ')} />
|
||||
|
||||
<SwitchingArea location={location} onLayoutChange={this.handleLayoutChange}>
|
||||
{children}
|
||||
|
||||
@@ -1,135 +1,34 @@
|
||||
export function AccountTimeline() {
|
||||
return import(/* webpackChunkName: "features/account_timeline" */'../../account_timeline')
|
||||
}
|
||||
|
||||
export function AccountGallery() {
|
||||
return import(/* webpackChunkName: "features/account_gallery" */'../../account_gallery')
|
||||
}
|
||||
|
||||
export function Blocks() {
|
||||
return import(/* webpackChunkName: "features/blocks" */'../../blocked_accounts')
|
||||
}
|
||||
|
||||
export function CommunityTimeline() {
|
||||
return import(/* webpackChunkName: "features/community_timeline" */'../../community_timeline')
|
||||
}
|
||||
|
||||
export function Compose() {
|
||||
return import(/* webpackChunkName: "features/compose" */'../../compose')
|
||||
}
|
||||
|
||||
export function DomainBlocks() {
|
||||
return import(/* webpackChunkName: "features/domain_blocks" */'../../blocked_domains')
|
||||
}
|
||||
|
||||
export function EmbedModal() {
|
||||
return import(/* webpackChunkName: "modals/embed_modal" */'../../../components/modal/embed_modal')
|
||||
}
|
||||
|
||||
export function EmojiPicker() {
|
||||
return import(/* webpackChunkName: "emoji_picker" */'../../../components/emoji/emoji_picker')
|
||||
}
|
||||
|
||||
export function Followers() {
|
||||
return import(/* webpackChunkName: "features/followers" */'../../followers')
|
||||
}
|
||||
|
||||
export function Following() {
|
||||
return import(/* webpackChunkName: "features/following" */'../../following')
|
||||
}
|
||||
|
||||
export function FollowRequests() {
|
||||
return import(/* webpackChunkName: "features/follow_requests" */'../../follow_requests')
|
||||
}
|
||||
|
||||
export function LikedStatuses() {
|
||||
return import(/* webpackChunkName: "features/liked_statuses" */'../../liked_statuses')
|
||||
}
|
||||
|
||||
export function GenericNotFound() {
|
||||
return import(/* webpackChunkName: "features/generic_not_found" */'../../generic_not_found')
|
||||
}
|
||||
|
||||
export function GroupsCollection() {
|
||||
return import(/* webpackChunkName: "features/groups_collection" */'../../g../../groups_collection')
|
||||
}
|
||||
|
||||
export function GroupCreate() {
|
||||
return import(/* webpackChunkName: "features/group_create" */'../../group_create')
|
||||
}
|
||||
|
||||
export function GroupMembers() {
|
||||
return import(/* webpackChunkName: "features/group_members" */'../../group_members')
|
||||
}
|
||||
|
||||
export function GroupRemovedAccounts() {
|
||||
return import(/* webpackChunkName: "features/group_removed_accounts" */'../../group_removed_accounts')
|
||||
}
|
||||
|
||||
export function GroupTimeline() {
|
||||
return import(/* webpackChunkName: "features/group_timeline" */'../../group_timeline')
|
||||
}
|
||||
|
||||
export function HashtagTimeline() {
|
||||
return import(/* webpackChunkName: "features/hashtag_timeline" */'../../hashtag_timeline')
|
||||
}
|
||||
|
||||
export function HomeTimeline() {
|
||||
return import(/* webpackChunkName: "features/home_timeline" */'../../home_timeline')
|
||||
}
|
||||
|
||||
export function ListCreate() {
|
||||
return import(/* webpackChunkName: "features/list_create" */'../../list_create')
|
||||
}
|
||||
|
||||
export function ListsDirectory() {
|
||||
return import(/* webpackChunkName: "features/lists_directory" */'../../lists_directory')
|
||||
}
|
||||
|
||||
export function ListEdit() {
|
||||
return import(/* webpackChunkName: "features/list_editor" */'../../list_edit')
|
||||
}
|
||||
|
||||
export function ListTimeline() {
|
||||
return import(/* webpackChunkName: "features/list_timeline" */'../../list_timeline')
|
||||
}
|
||||
|
||||
export function MediaGallery() {
|
||||
return import(/* webpackChunkName: "status/media_gallery" */'../../../components/media_gallery')
|
||||
}
|
||||
|
||||
export function Mutes() {
|
||||
return import(/* webpackChunkName: "features/mutes" */'../../mutes')
|
||||
}
|
||||
|
||||
export function MuteModal() {
|
||||
return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal/mute_modal')
|
||||
}
|
||||
|
||||
export function Notifications() {
|
||||
return import(/* webpackChunkName: "features/notifications" */'../../notifications')
|
||||
}
|
||||
|
||||
export function Reposts() {
|
||||
return import(/* webpackChunkName: "features/reposts" */'../../reposts')
|
||||
}
|
||||
|
||||
export function ReportModal() {
|
||||
return import(/* webpackChunkName: "modals/report_modal" */'../../../components/modal/report_modal')
|
||||
}
|
||||
|
||||
export function Search() {
|
||||
return import(/*webpackChunkName: "features/search" */'../../search')
|
||||
}
|
||||
|
||||
export function Status() {
|
||||
return import(/* webpackChunkName: "features/status" */'../../status')
|
||||
}
|
||||
|
||||
export function StatusRevisionsModal() {
|
||||
return import(/* webpackChunkName: "modals/status_revisions_modal" */'../../../components/modal/status_revisions_modal')
|
||||
}
|
||||
|
||||
export function Video() {
|
||||
return import(/* webpackChunkName: "features/video" */'../../../components/video')
|
||||
}
|
||||
export function AccountTimeline() { return import(/* webpackChunkName: "features/account_timeline" */'../../account_timeline') }
|
||||
export function AccountGallery() { return import(/* webpackChunkName: "features/account_gallery" */'../../account_gallery') }
|
||||
export function BlockedAccounts() { return import(/* webpackChunkName: "features/blocked_accounts" */'../../blocked_accounts') }
|
||||
export function BlockedDomains() { return import(/* webpackChunkName: "features/blocked_domains" */'../../blocked_domains') }
|
||||
export function CommunityTimeline() { return import(/* webpackChunkName: "features/community_timeline" */'../../community_timeline') }
|
||||
export function Compose() { return import(/* webpackChunkName: "features/compose" */'../../compose') }
|
||||
export function EmbedModal() { return import(/* webpackChunkName: "modals/embed_modal" */'../../../components/modal/embed_modal') }
|
||||
export function EmojiPicker() { return import(/* webpackChunkName: "emoji_picker" */'../../../components/emoji/emoji_picker') }
|
||||
export function Followers() { return import(/* webpackChunkName: "features/followers" */'../../followers') }
|
||||
export function Following() { return import(/* webpackChunkName: "features/following" */'../../following') }
|
||||
export function FollowRequests() { return import(/* webpackChunkName: "features/follow_requests" */'../../follow_requests') }
|
||||
export function LikedStatuses() { return import(/* webpackChunkName: "features/liked_statuses" */'../../liked_statuses') }
|
||||
export function GenericNotFound() { return import(/* webpackChunkName: "features/generic_not_found" */'../../generic_not_found') }
|
||||
export function GroupsCollection() { return import(/* webpackChunkName: "features/groups_collection" */'../../groups_collection') }
|
||||
export function GroupCreate() { return import(/* webpackChunkName: "features/group_create" */'../../group_create') }
|
||||
export function GroupMembers() { return import(/* webpackChunkName: "features/group_members" */'../../group_members') }
|
||||
export function GroupRemovedAccounts() { return import(/* webpackChunkName: "features/group_removed_accounts" */'../../group_removed_accounts') }
|
||||
export function GroupTimeline() { return import(/* webpackChunkName: "features/group_timeline" */'../../group_timeline') }
|
||||
export function HashtagTimeline() { return import(/* webpackChunkName: "features/hashtag_timeline" */'../../hashtag_timeline') }
|
||||
export function HomeTimeline() { return import(/* webpackChunkName: "features/home_timeline" */'../../home_timeline') }
|
||||
export function ListCreate() { return import(/* webpackChunkName: "features/list_create" */'../../list_create') }
|
||||
export function ListsDirectory() { return import(/* webpackChunkName: "features/lists_directory" */'../../lists_directory') }
|
||||
export function ListEdit() { return import(/* webpackChunkName: "features/list_editor" */'../../list_edit') }
|
||||
export function ListTimeline() { return import(/* webpackChunkName: "features/list_timeline" */'../../list_timeline') }
|
||||
export function MediaGallery() { return import(/* webpackChunkName: "components/media_gallery" */'../../../components/media_gallery') }
|
||||
export function Mutes() { return import(/* webpackChunkName: "features/mutes" */'../../mutes') }
|
||||
export function MuteModal() { return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal/mute_modal') }
|
||||
export function Notifications() { return import(/* webpackChunkName: "features/notifications" */'../../notifications') }
|
||||
export function Reposts() { return import(/* webpackChunkName: "features/reposts" */'../../reposts') }
|
||||
export function ReportModal() { return import(/* webpackChunkName: "modals/report_modal" */'../../../components/modal/report_modal') }
|
||||
export function Search() { return import(/*webpackChunkName: "features/search" */'../../search') }
|
||||
export function Status() { return import(/* webpackChunkName: "features/status" */'../../status') }
|
||||
export function StatusRevisionsModal() { return import(/* webpackChunkName: "modals/status_revisions_modal" */'../../../components/modal/status_revisions_modal') }
|
||||
export function Video() { return import(/* webpackChunkName: "components/video" */'../../../components/video') }
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
fetchBundleFail
|
||||
} from '../../../actions/bundles'
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onFetch() {
|
||||
dispatch(fetchBundleRequest())
|
||||
},
|
||||
|
||||
41
app/javascript/gabsocial/features/ui/util/page_title.js
Normal file
41
app/javascript/gabsocial/features/ui/util/page_title.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import isEqual from 'lodash.isequal'
|
||||
|
||||
export default class PageTitle extends PureComponent {
|
||||
static propTypes = {
|
||||
badge: PropTypes.oneOf([
|
||||
PropTypes.number,
|
||||
PropTypes.string,
|
||||
]),
|
||||
path: PropTypes.oneOf([
|
||||
PropTypes.sting,
|
||||
PropTypes.array,
|
||||
]),
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.updatePageTitle(this.props)
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.badge !== prevProps.badge || !isEqual(this.props.path, prevProps.path)) {
|
||||
this.updatePageTitle(this.props)
|
||||
}
|
||||
}
|
||||
|
||||
updatePageTitle = ({ badge, path}) => {
|
||||
const site = 'Gab'
|
||||
|
||||
let realPath = Array.isArray(path) ? path.join(' / ') : path
|
||||
realPath = realPath.trim()
|
||||
|
||||
const realBadge = !!badge ? `(${badge})` : ''
|
||||
|
||||
const title = `${realBadge} ${realPath} / ${site}`.trim()
|
||||
|
||||
document.title = title
|
||||
}
|
||||
|
||||
render() {
|
||||
return null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user