This commit is contained in:
mgabdev 2020-02-25 11:04:44 -05:00
parent 32cd8e622a
commit 0bd1eb2c77
127 changed files with 332 additions and 537 deletions

View File

@ -0,0 +1,26 @@
const CircleIcon = ({
className = '',
width = '16px',
height = '16px',
viewBox = '0 0 48 48',
title = '',
}) => (
<svg
className={className}
version='1.1'
xmlns='http://www.w3.org/2000/svg'
x='0px'
y='0px'
width={width}
height={height}
viewBox={viewBox}
xmlSpace='preserve'
aria-label={title}
>
<g>
<circle cx='24' cy='24' r='20' />
</g>
</svg>
)
export default CircleIcon

View File

@ -0,0 +1,61 @@
import AddIcon from './add_icon'
import AppsIcon from './apps_icon'
import AngleRightIcon from './angle_right_icon'
import BackIcon from './back_icon'
import CalendarIcon from './calendar_icon'
import ChatIcon from './chat_icon'
import CircleIcon from './circle_icon'
import CloseIcon from './close_icon'
import CommentIcon from './comment_icon'
import DissenterIcon from './dissenter_icon'
import EllipsisIcon from './ellipsis_icon'
import GlobeIcon from './globe_icon'
import GroupIcon from './group_icon'
import HomeIcon from './home_icon'
import LikeIcon from './like_icon'
import ListIcon from './list_icon'
import LoadingIcon from './loading_icon'
import MediaIcon from './media_icon'
import MoreIcon from './more_icon'
import NotificationsIcon from './notifications_icon'
import PollIcon from './poll_icon'
import RepostIcon from './repost_icon'
import SearchIcon from './search_icon'
import ShareIcon from './share_icon'
import ShopIcon from './shop_icon'
import SubtractIcon from './subtract_icon'
import TrendsIcon from './trends_icon'
import VerifiedIcon from './verified_icon'
import WarningIcon from './warning_icon'
export {
AddIcon,
AppsIcon,
AngleRightIcon,
BackIcon,
CalendarIcon,
ChatIcon,
CircleIcon,
CloseIcon,
CommentIcon,
DissenterIcon,
EllipsisIcon,
GlobeIcon,
GroupIcon,
HomeIcon,
LikeIcon,
ListIcon,
LoadingIcon,
MediaIcon,
MoreIcon,
NotificationsIcon,
PollIcon,
RepostIcon,
SearchIcon,
ShareIcon,
ShopIcon,
SubtractIcon,
TrendsIcon,
VerifiedIcon,
WarningIcon,
}

View File

@ -1,27 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<AutosuggestEmoji /> renders emoji with custom url 1`] = `
<div
className="autosuggest-emoji"
>
<img
alt="foobar"
className="emojione"
src="http://example.com/emoji.png"
/>
:foobar:
</div>
`;
exports[`<AutosuggestEmoji /> renders native emoji 1`] = `
<div
className="autosuggest-emoji"
>
<img
alt="💙"
className="emojione"
src="/emoji/1f499.svg"
/>
:foobar:
</div>
`;

View File

@ -1,33 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Avatar /> Autoplay renders a animated avatar 1`] = `
<div
className="account__avatar"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
style={
Object {
"backgroundImage": "url(/animated/alice.gif)",
"backgroundSize": "100px 100px",
"height": "100px",
"width": "100px",
}
}
/>
`;
exports[`<Avatar /> Still renders a still avatar 1`] = `
<div
className="account__avatar"
onMouseEnter={[Function]}
onMouseLeave={[Function]}
style={
Object {
"backgroundImage": "url(/static/alice.jpg)",
"backgroundSize": "100px 100px",
"height": "100px",
"width": "100px",
}
}
/>
`;

View File

@ -1,108 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Button /> adds class "button--secondary" if props.secondary given 1`] = `
<button
className="button button--secondary"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
/>
`;
exports[`<Button /> renders a button element 1`] = `
<button
className="button"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
/>
`;
exports[`<Button /> renders a disabled attribute if props.disabled given 1`] = `
<button
className="button"
disabled={true}
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
/>
`;
exports[`<Button /> renders class="button--block" if props.block given 1`] = `
<button
className="button button--block"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
/>
`;
exports[`<Button /> renders the children 1`] = `
<button
className="button"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
>
<p>
children
</p>
</button>
`;
exports[`<Button /> renders the given text 1`] = `
<button
className="button"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
>
foo
</button>
`;
exports[`<Button /> renders the props.text instead of children 1`] = `
<button
className="button"
onClick={[Function]}
style={
Object {
"height": "36px",
"lineHeight": "36px",
"padding": "0 16px",
}
}
>
foo
</button>
`;

View File

@ -1,25 +0,0 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<DisplayName /> renders display name + account name 1`] = `
<span
className="display-name"
>
<bdi>
<strong
className="display-name__html"
dangerouslySetInnerHTML={
Object {
"__html": "<p>Foo</p>",
}
}
/>
</bdi>
<span
className="display-name__account"
>
@
bar@baz
</span>
</span>
`;

View File

@ -1,28 +0,0 @@
import renderer from 'react-test-renderer';
import AutosuggestEmoji from '../autosuggest_emoji';
describe('<AutosuggestEmoji />', () => {
it('renders native emoji', () => {
const emoji = {
native: '💙',
colons: ':foobar:',
};
const component = renderer.create(<AutosuggestEmoji emoji={emoji} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders emoji with custom url', () => {
const emoji = {
custom: true,
imageUrl: 'http://example.com/emoji.png',
native: 'foobar',
colons: ':foobar:',
};
const component = renderer.create(<AutosuggestEmoji emoji={emoji} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@ -1,35 +0,0 @@
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import Avatar from '../avatar';
describe('<Avatar />', () => {
const account = fromJS({
username: 'alice',
acct: 'alice',
display_name: 'Alice',
avatar: '/animated/alice.gif',
avatar_static: '/static/alice.jpg',
});
const size = 100;
describe('Autoplay', () => {
it('renders a animated avatar', () => {
const component = renderer.create(<Avatar account={account} animate size={size} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});
describe('Still', () => {
it('renders a still avatar', () => {
const component = renderer.create(<Avatar account={account} size={size} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});
// TODO add autoplay test if possible
});

View File

@ -1,74 +0,0 @@
import { shallow } from 'enzyme';
import renderer from 'react-test-renderer';
import Button from '../button';
describe('<Button />', () => {
it('renders a button element', () => {
const component = renderer.create(<Button />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders the given text', () => {
const text = 'foo';
const component = renderer.create(<Button text={text} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('handles click events using the given handler', () => {
const handler = jest.fn();
const button = shallow(<Button onClick={handler} />);
button.find('button').simulate('click');
expect(handler.mock.calls.length).toEqual(1);
});
it('does not handle click events if props.disabled given', () => {
const handler = jest.fn();
const button = shallow(<Button onClick={handler} disabled />);
button.find('button').simulate('click');
expect(handler.mock.calls.length).toEqual(0);
});
it('renders a disabled attribute if props.disabled given', () => {
const component = renderer.create(<Button disabled />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders the children', () => {
const children = <p>children</p>;
const component = renderer.create(<Button>{children}</Button>);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders the props.text instead of children', () => {
const text = 'foo';
const children = <p>children</p>;
const component = renderer.create(<Button text={text}>{children}</Button>);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders class="button--block" if props.block given', () => {
const component = renderer.create(<Button block />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
it('adds class "button--secondary" if props.secondary given', () => {
const component = renderer.create(<Button secondary />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@ -1,17 +0,0 @@
import renderer from 'react-test-renderer';
import { fromJS } from 'immutable';
import DisplayName from '../display_name';
describe('<DisplayName />', () => {
it('renders display name + account name', () => {
const account = fromJS({
username: 'bar',
acct: 'bar@baz',
display_name_html: '<p>Foo</p>',
});
const component = renderer.create(<DisplayName account={account} />);
const tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@ -0,0 +1,77 @@
import * as I from '../assets'
export default class Icon extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
className: PropTypes.string,
width: PropTypes.string,
height: PropTypes.string,
}
render() {
const { id, ...options } = this.props
switch (id) {
case 'add':
return <I.AddIcon {...options} />
case 'apps':
return <I.AppsIcon {...options} />
case 'angle-right':
return <I.AngleRightIcon {...options} />
case 'back':
return <I.BackIcon {...options} />
case 'calendar':
return <I.CalendarIcon {...options} />
case 'chat':
return <I.ChatIcon {...options} />
case 'close':
return <I.CloseIcon {...options} />
case 'comment':
return <I.CommentIcon {...options} />
case 'dissenter':
return <I.DissenterIcon {...options} />
case 'ellipsis':
return <I.EllipsisIcon {...options} />
case 'globe':
return <I.GlobeIcon {...options} />
case 'group':
return <I.GroupIcon {...options} />
case 'home':
return <I.HomeIcon {...options} />
case 'like':
return <I.LikeIcon {...options} />
case 'list':
return <I.ListIcon {...options} />
case 'loading':
return <I.LoadingIcon {...options} />
case 'more':
return <I.MoreIcon {...options} />
case 'media':
return <I.MediaIcon {...options} />
case 'notifications':
return <I.NotificationsIcon {...options} />
case 'poll':
return <I.PollIcon {...options} />
case 'repost':
return <I.RepostIcon {...options} />
case 'search':
return <I.SearchIcon {...options} />
case 'share':
return <I.ShareIcon {...options} />
case 'shop':
return <I.ShopIcon {...options} />
case 'subtract':
return <I.SubtractIcon {...options} />
case 'trends':
return <I.TrendsIcon {...options} />
case 'verified':
return <I.VerifiedIcon {...options} />
case 'warning':
return <I.WarningIcon {...options} />
default:
return <I.CircleIcon {...options} />
}
}
}

View File

@ -1,104 +0,0 @@
import AddIcon from './svgs/add_icon'
import AppsIcon from './svgs/apps_icon'
import AngleRightIcon from './svgs/angle_right_icon'
import BackIcon from './svgs/back_icon'
import CalendarIcon from './svgs/calendar_icon'
import ChatIcon from './svgs/chat_icon'
import CloseIcon from './svgs/close_icon'
import CommentIcon from './svgs/comment_icon'
import DissenterIcon from './svgs/dissenter_icon'
import EllipsisIcon from './svgs/ellipsis_icon'
import GlobeIcon from './svgs/globe_icon'
import GroupIcon from './svgs/group_icon'
import HomeIcon from './svgs/home_icon'
import LikeIcon from './svgs/like_icon'
import ListIcon from './svgs/list_icon'
import LoadingIcon from './svgs/loading_icon'
import MediaIcon from './svgs/media_icon'
import MoreIcon from './svgs/more_icon'
import NotificationsIcon from './svgs/notifications_icon'
import PollIcon from './svgs/poll_icon'
import RepostIcon from './svgs/repost_icon'
import SearchIcon from './svgs/search_icon'
import ShareIcon from './svgs/share_icon'
import ShopIcon from './svgs/shop_icon'
import SubtractIcon from './svgs/subtract_icon'
import TrendsIcon from './svgs/trends_icon'
import VerifiedIcon from './svgs/verified_icon'
import WarningIcon from './svgs/warning_icon'
export default class Icon extends PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
className: PropTypes.string,
width: PropTypes.string,
height: PropTypes.string,
}
render() {
const { id, ...options } = this.props
switch (id) {
case 'add':
return <AddIcon {...options} />
case 'apps':
return <AppsIcon {...options} />
case 'angle-right':
return <AngleRightIcon {...options} />
case 'back':
return <BackIcon {...options} />
case 'calendar':
return <CalendarIcon {...options} />
case 'chat':
return <ChatIcon {...options} />
case 'close':
return <CloseIcon {...options} />
case 'comment':
return <CommentIcon {...options} />
case 'dissenter':
return <DissenterIcon {...options} />
case 'ellipsis':
return <EllipsisIcon {...options} />
case 'globe':
return <GlobeIcon {...options} />
case 'group':
return <GroupIcon {...options} />
case 'home':
return <HomeIcon {...options} />
case 'like':
return <LikeIcon {...options} />
case 'list':
return <ListIcon {...options} />
case 'loading':
return <LoadingIcon {...options} />
case 'more':
return <MoreIcon {...options} />
case 'media':
return <MediaIcon {...options} />
case 'notifications':
return <NotificationsIcon {...options} />
case 'poll':
return <PollIcon {...options} />
case 'repost':
return <RepostIcon {...options} />
case 'search':
return <SearchIcon {...options} />
case 'share':
return <ShareIcon {...options} />
case 'shop':
return <ShopIcon {...options} />
case 'subtract':
return <SubtractIcon {...options} />
case 'trends':
return <TrendsIcon {...options} />
case 'verified':
return <VerifiedIcon {...options} />
case 'warning':
return <WarningIcon {...options} />
default:
return <NotificationsIcon {...options} />
}
}
}

View File

@ -1 +0,0 @@
export { default } from './icon';

View File

@ -219,7 +219,8 @@ class Item extends ImmutablePureComponent {
}
export default @injectIntl
export default
@injectIntl
class MediaGallery extends PureComponent {
static propTypes = {

View File

@ -14,7 +14,8 @@ const messages = defineMessages({
combo: { id: 'boost_modal.combo', defaultMessage: 'You can press {combo} to skip this next time' },
});
export default @injectIntl
export default
@injectIntl
class BoostModal extends ImmutablePureComponent {
static contextTypes = {

View File

@ -16,7 +16,8 @@ const mapStateToProps = state => {
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class ComposeModal extends ImmutablePureComponent {

View File

@ -8,7 +8,8 @@ const messages = defineMessages({
preview: { id: 'embed.preview', defaultMessage: 'Here is what it will look like:' },
});
export default @injectIntl
export default
@injectIntl
class EmbedModal extends ImmutablePureComponent {
static propTypes = {

View File

@ -17,7 +17,8 @@ const mapDispatchToProps = (dispatch, { id }) => ({
});
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
class FocalPointModal extends ImmutablePureComponent {
static propTypes = {

View File

@ -18,7 +18,8 @@ const messages = defineMessages({
export const previewState = 'previewMediaModal';
export default @injectIntl
export default
@injectIntl
class MediaModal extends ImmutablePureComponent {
static propTypes = {

View File

@ -24,7 +24,8 @@ const mapDispatchToProps = (dispatch) => ({
const cx = classNames.bind(_s)
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class ModalBase extends PureComponent {

View File

@ -36,7 +36,8 @@ const mapDispatchToProps = dispatch => {
};
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class MuteModal extends PureComponent {

View File

@ -38,7 +38,8 @@ const makeMapStateToProps = () => {
return mapStateToProps;
};
export default @connect(makeMapStateToProps)
export default
@connect(makeMapStateToProps)
@injectIntl
class ReportModal extends ImmutablePureComponent {

View File

@ -9,7 +9,8 @@ const messages = defineMessages({
close: { id: 'lightbox.close', defaultMessage: 'Close' },
});
export default @injectIntl
export default
@injectIntl
class StatusRevisionModal extends ImmutablePureComponent {
static propTypes = {

View File

@ -4,7 +4,8 @@ const mapStateToProps = state => ({
count: state.getIn(['notifications', 'unread']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class NotificationCounter extends PureComponent {
static propTypes = {

View File

@ -15,7 +15,8 @@ const mapStateToProps = (state) => ({
groupIds: state.getIn(['group_lists', 'member']),
})
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class GroupSidebarPanel extends ImmutablePureComponent {
static propTypes = {

View File

@ -21,7 +21,8 @@ const mapDispatchToProps = dispatch => {
}
}
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class HashtagsPanel extends ImmutablePureComponent {

View File

@ -20,7 +20,8 @@ const mapDispatchToProps = dispatch => {
}
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class ListDetailsPanel extends ImmutablePureComponent {

View File

@ -22,7 +22,8 @@ const mapDispatchToProps = dispatch => {
}
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class WhoToFollowPanel extends ImmutablePureComponent {

View File

@ -22,7 +22,8 @@ const mapDispatchToProps = dispatch => {
}
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class WhoToFollowPanel extends ImmutablePureComponent {

View File

@ -9,7 +9,8 @@ const messages = defineMessages({
register: { id: 'account.register', defaultMessage: 'Sign up' },
})
export default @injectIntl
export default
@injectIntl
class SignUpPanel extends PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,

View File

@ -25,7 +25,8 @@ const mapStateToProps = state => {
}
}
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class UserPanel extends ImmutablePureComponent {
static propTypes = {

View File

@ -22,7 +22,8 @@ const mapDispatchToProps = dispatch => {
}
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class WhoToFollowPanel extends ImmutablePureComponent {

View File

@ -25,7 +25,8 @@ const makeEmojiMap = record => record.get('emojis').reduce((obj, emoji) => {
return obj;
}, {});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Poll extends ImmutablePureComponent {

View File

@ -109,7 +109,8 @@ const timeRemainingString = (intl, date, now) => {
return relativeTime
}
export default @injectIntl
export default
@injectIntl
class RelativeTimestamp extends Component {
static propTypes = {

View File

@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import { me } from '../initial_state'
import { makeGetAccount } from '../selectors'
import GabLogo from './assets/gab_logo'
import GabLogo from '../assets/gab_logo'
import SidebarSectionItem from './sidebar_section_item'
const mapStateToProps = state => {

View File

@ -52,7 +52,8 @@ export const defaultMediaVisibility = status => {
return (displayMedia !== 'hide_all' && !status.get('sensitive')) || displayMedia === 'show_all';
};
export default @injectIntl
export default
@injectIntl
class Status extends ImmutablePureComponent {
static contextTypes = {

View File

@ -98,7 +98,8 @@ class StatusActionBarItem extends PureComponent {
}
}
export default @connect(null, mapDispatchToProps)
export default
@connect(null, mapDispatchToProps)
@injectIntl
class StatusActionBar extends ImmutablePureComponent {

View File

@ -19,7 +19,8 @@ const mapDispatchToProps = (dispatch, { id }) => ({
},
});
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
class StatusCheckBox extends ImmutablePureComponent {
static propTypes = {

View File

@ -4,7 +4,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import ModalLoading from './modal_loading';
import RelativeTimestamp from './relative_timestamp';
export default @injectIntl
export default
@injectIntl
class StatusRevisionsList extends ImmutablePureComponent {
static propTypes = {

View File

@ -72,7 +72,8 @@ class LoadMoreMedia extends ImmutablePureComponent {
}
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class AccountGallery extends ImmutablePureComponent {

View File

@ -51,7 +51,8 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) =
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class AccountTimeline extends ImmutablePureComponent {

View File

@ -45,7 +45,8 @@ const messages = defineMessages({
domainBlocked: { id: 'account.domain_blocked', defaultMessage: 'Domain hidden' },
});
export default @injectIntl
export default
@injectIntl
class Header extends ImmutablePureComponent {
static propTypes = {

View File

@ -30,7 +30,8 @@ const mapStateToProps = (state, { account }) => {
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class ProfileInfoPanel extends ImmutablePureComponent {

View File

@ -16,7 +16,8 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['user_lists', 'blocks', 'next']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Blocks extends ImmutablePureComponent {

View File

@ -16,7 +16,8 @@ const mapDispatchToProps = (dispatch) => {
};
};
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
class ColumnSettings extends ImmutablePureComponent {
static propTypes = {

View File

@ -32,7 +32,8 @@ const messages = defineMessages({
schedulePost: { id: 'compose_form.schedule_post', defaultMessage: 'Schedule Post' }
});
export default @injectIntl
export default
@injectIntl
class ComposeForm extends ImmutablePureComponent {
state = {

View File

@ -289,7 +289,8 @@ class EmojiPickerMenu extends ImmutablePureComponent {
}
export default @injectIntl
export default
@injectIntl
class EmojiPickerDropdown extends ImmutablePureComponent {
static propTypes = {

View File

@ -13,7 +13,8 @@ const mapStateToProps = state => {
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class NavigationBar extends ImmutablePureComponent {
static propTypes = {

View File

@ -11,7 +11,8 @@ const messages = defineMessages({
cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' },
});
export default @injectIntl
export default
@injectIntl
class ReplyIndicator extends ImmutablePureComponent {
static contextTypes = {

View File

@ -11,7 +11,8 @@ const messages = defineMessages({
delete: { id: 'upload_form.undo', defaultMessage: 'Delete' },
});
export default @injectIntl
export default
@injectIntl
class Upload extends ImmutablePureComponent {
static contextTypes = {

View File

@ -8,7 +8,8 @@ const mapStateToProps = state => ({
mediaIds: state.getIn(['compose', 'media_attachments']).map(item => item.get('id')),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class UploadForm extends ImmutablePureComponent {
static propTypes = {

View File

@ -8,7 +8,8 @@ const mapStateToProps = state => ({
progress: state.getIn(['compose', 'progress']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class UploadProgress extends PureComponent {
static propTypes = {

View File

@ -31,7 +31,8 @@ const mapStateToProps = (state, ownProps) => ({
showSearch: ownProps.isSearchPage,
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Compose extends ImmutablePureComponent {

View File

@ -17,7 +17,8 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['domain_lists', 'blocks', 'next']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Blocks extends ImmutablePureComponent {

View File

@ -16,7 +16,8 @@ const mapStateToProps = (state, { params: { username } }) => {
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class Favourites extends ImmutablePureComponent {
static propTypes = {

View File

@ -33,7 +33,8 @@ const mapDispatchToProps = (dispatch, { id }) => ({
},
});
export default @connect(makeMapStateToProps, mapDispatchToProps)
export default
@connect(makeMapStateToProps, mapDispatchToProps)
@injectIntl
class AccountAuthorize extends ImmutablePureComponent {

View File

@ -16,7 +16,8 @@ const mapStateToProps = state => ({
hasMore: !!state.getIn(['user_lists', 'follow_requests', 'next']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class FollowRequests extends ImmutablePureComponent {

View File

@ -39,7 +39,8 @@ const mapStateToProps = (state, { params: { username } }) => {
};
};
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class Followers extends ImmutablePureComponent {
static propTypes = {

View File

@ -41,7 +41,8 @@ const mapStateToProps = (state, { params: { username } }) => {
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class Following extends ImmutablePureComponent {
static propTypes = {

View File

@ -22,7 +22,8 @@ const mapStateToProps = (state, { activeTab }) => ({
account: state.getIn(['accounts', me]),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Groups extends ImmutablePureComponent {
static propTypes = {

View File

@ -26,7 +26,8 @@ const mapDispatchToProps = dispatch => ({
reset: () => dispatch(reset()),
});
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class Create extends PureComponent {

View File

@ -29,7 +29,8 @@ const mapDispatchToProps = dispatch => ({
setUp: group => dispatch(setUp(group)),
});
export default @connect(mapStateToProps, mapDispatchToProps)
export default
@connect(mapStateToProps, mapDispatchToProps)
@injectIntl
class Edit extends ImmutablePureComponent {

View File

@ -17,7 +17,8 @@ const mapStateToProps = (state, { id }) => ({
relationships: state.getIn(['group_relationships', id]),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class GroupCard extends ImmutablePureComponent {
static propTypes = {

View File

@ -22,7 +22,8 @@ const mapStateToProps = (state, { activeTab }) => ({
account: state.getIn(['accounts', me]),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class Groups extends ImmutablePureComponent {
static propTypes = {

View File

@ -19,7 +19,8 @@ const mapStateToProps = (state, { params: { id } }) => ({
hasMore: !!state.getIn(['user_lists', 'groups', id, 'next']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class GroupMembers extends ImmutablePureComponent {
static propTypes = {

View File

@ -22,7 +22,8 @@ const mapStateToProps = (state, { params: { id } }) => ({
hasMore: !!state.getIn(['user_lists', 'groups_removed_accounts', id, 'next']),
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class GroupRemovedAccounts extends ImmutablePureComponent {

View File

@ -2,7 +2,8 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../../../components/setting_toggle';
export default @injectIntl
export default
@injectIntl
class ColumnSettings extends PureComponent {
static propTypes = {

View File

@ -12,7 +12,8 @@ const messages = defineMessages({
edit: { id: 'groups.edit', defaultMessage: 'Edit' }
});
export default @injectIntl
export default
@injectIntl
class Header extends ImmutablePureComponent {
static propTypes = {
group: ImmutablePropTypes.map,

View File

@ -7,7 +7,8 @@ const messages = defineMessages({
group_admin: { id: 'groups.detail.role_admin', defaultMessage: 'You\'re an admin' }
});
export default @injectIntl
export default
@injectIntl
class GroupPanel extends ImmutablePureComponent {
static propTypes = {
group: ImmutablePropTypes.map,

View File

@ -20,7 +20,8 @@ const mapStateToProps = (state, props) => ({
hasUnread: state.getIn(['timelines', `group:${props.params.id}`, 'unread']) > 0,
});
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
@injectIntl
class GroupTimeline extends ImmutablePureComponent {

View File

@ -8,7 +8,8 @@ const mapStateToProps = (state, { activeTab }) => ({
groupIds: state.getIn(['group_lists', activeTab]),
})
export default @connect(mapStateToProps)
export default
@connect(mapStateToProps)
class GroupsCollection extends ImmutablePureComponent {
static propTypes = {
activeTab: PropTypes.string.isRequired,

Some files were not shown because too many files have changed in this diff Show More