diff options
Diffstat (limited to 'app/javascript/mastodon/features/ui')
16 files changed, 41 insertions, 41 deletions
diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.js b/app/javascript/mastodon/features/ui/components/boost_modal.js index 0bd19b18d..fc6b37095 100644 --- a/app/javascript/mastodon/features/ui/components/boost_modal.js +++ b/app/javascript/mastodon/features/ui/components/boost_modal.js @@ -11,20 +11,20 @@ import DisplayName from '../../../components/display_name'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - reblog: { id: 'status.reblog', defaultMessage: 'Boost' } + reblog: { id: 'status.reblog', defaultMessage: 'Boost' }, }); class BoostModal extends ImmutablePureComponent { static contextTypes = { - router: PropTypes.object + router: PropTypes.object, }; static propTypes = { status: ImmutablePropTypes.map.isRequired, onReblog: PropTypes.func.isRequired, onClose: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired + intl: PropTypes.object.isRequired, }; constructor (props, context) { diff --git a/app/javascript/mastodon/features/ui/components/column.js b/app/javascript/mastodon/features/ui/components/column.js index bcee674ad..6a8f02bb8 100644 --- a/app/javascript/mastodon/features/ui/components/column.js +++ b/app/javascript/mastodon/features/ui/components/column.js @@ -37,7 +37,7 @@ class Column extends React.PureComponent { icon: PropTypes.string, children: PropTypes.node, active: PropTypes.bool, - hideHeadingOnMobile: PropTypes.bool + hideHeadingOnMobile: PropTypes.bool, }; handleHeaderClick = () => { @@ -61,11 +61,11 @@ class Column extends React.PureComponent { render () { const { heading, icon, children, active, hideHeadingOnMobile } = this.props; - let columnHeaderId = null + let columnHeaderId = null; let header = ''; if (heading) { - columnHeaderId = heading.replace(/ /g, '-') + columnHeaderId = heading.replace(/ /g, '-'); header = <ColumnHeader icon={icon} active={active} type={heading} onClick={this.handleHeaderClick} hideOnMobile={hideHeadingOnMobile} columnHeaderId={columnHeaderId}/>; } return ( diff --git a/app/javascript/mastodon/features/ui/components/column_header.js b/app/javascript/mastodon/features/ui/components/column_header.js index fd5f27076..578432fec 100644 --- a/app/javascript/mastodon/features/ui/components/column_header.js +++ b/app/javascript/mastodon/features/ui/components/column_header.js @@ -1,5 +1,5 @@ import React from 'react'; -import PropTypes from 'prop-types' +import PropTypes from 'prop-types'; class ColumnHeader extends React.PureComponent { @@ -9,7 +9,7 @@ class ColumnHeader extends React.PureComponent { active: PropTypes.bool, onClick: PropTypes.func, hideOnMobile: PropTypes.bool, - columnHeaderId: PropTypes.string + columnHeaderId: PropTypes.string, }; handleClick = () => { diff --git a/app/javascript/mastodon/features/ui/components/column_link.js b/app/javascript/mastodon/features/ui/components/column_link.js index dd30b14e0..24387af57 100644 --- a/app/javascript/mastodon/features/ui/components/column_link.js +++ b/app/javascript/mastodon/features/ui/components/column_link.js @@ -26,7 +26,7 @@ ColumnLink.propTypes = { to: PropTypes.string, href: PropTypes.string, method: PropTypes.string, - hideOnMobile: PropTypes.bool + hideOnMobile: PropTypes.bool, }; export default ColumnLink; diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index 588db3abd..ccff417ef 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; class ColumnsArea extends React.PureComponent { static propTypes = { - children: PropTypes.node + children: PropTypes.node, }; render () { diff --git a/app/javascript/mastodon/features/ui/components/confirmation_modal.js b/app/javascript/mastodon/features/ui/components/confirmation_modal.js index bb592a2ed..d0c092737 100644 --- a/app/javascript/mastodon/features/ui/components/confirmation_modal.js +++ b/app/javascript/mastodon/features/ui/components/confirmation_modal.js @@ -10,7 +10,7 @@ class ConfirmationModal extends React.PureComponent { confirm: PropTypes.string.isRequired, onClose: PropTypes.func.isRequired, onConfirm: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired + intl: PropTypes.object.isRequired, }; handleClick = () => { diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js index c82ec49e8..a8912841b 100644 --- a/app/javascript/mastodon/features/ui/components/media_modal.js +++ b/app/javascript/mastodon/features/ui/components/media_modal.js @@ -9,7 +9,7 @@ import IconButton from '../../../components/icon_button'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - close: { id: 'lightbox.close', defaultMessage: 'Close' } + close: { id: 'lightbox.close', defaultMessage: 'Close' }, }); class MediaModal extends ImmutablePureComponent { @@ -18,11 +18,11 @@ class MediaModal extends ImmutablePureComponent { media: ImmutablePropTypes.list.isRequired, index: PropTypes.number.isRequired, onClose: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired + intl: PropTypes.object.isRequired, }; state = { - index: null + index: null, }; handleNextClick = () => { diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js index 24b466bc5..13629da41 100644 --- a/app/javascript/mastodon/features/ui/components/modal_root.js +++ b/app/javascript/mastodon/features/ui/components/modal_root.js @@ -13,7 +13,7 @@ const MODAL_COMPONENTS = { 'ONBOARDING': OnboardingModal, 'VIDEO': VideoModal, 'BOOST': BoostModal, - 'CONFIRM': ConfirmationModal + 'CONFIRM': ConfirmationModal, }; class ModalRoot extends React.PureComponent { @@ -21,7 +21,7 @@ class ModalRoot extends React.PureComponent { static propTypes = { type: PropTypes.string, props: PropTypes.object, - onClose: PropTypes.func.isRequired + onClose: PropTypes.func.isRequired, }; handleKeyUp = (e) => { @@ -56,7 +56,7 @@ class ModalRoot extends React.PureComponent { items.push({ key: type, data: { type, props }, - style: { opacity: spring(1), scale: spring(1, { stiffness: 120, damping: 14 }) } + style: { opacity: spring(1), scale: spring(1, { stiffness: 120, damping: 14 }) }, }); } diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js index ee20fc94a..2757ff323 100644 --- a/app/javascript/mastodon/features/ui/components/onboarding_modal.js +++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js @@ -18,7 +18,7 @@ const messages = defineMessages({ home_title: { id: 'column.home', defaultMessage: 'Home' }, notifications_title: { id: 'column.notifications', defaultMessage: 'Notifications' }, local_title: { id: 'column.community', defaultMessage: 'Local timeline' }, - federated_title: { id: 'column.public', defaultMessage: 'Federated timeline' } + federated_title: { id: 'column.public', defaultMessage: 'Federated timeline' }, }); const PageOne = ({ acct, domain }) => ( @@ -37,7 +37,7 @@ const PageOne = ({ acct, domain }) => ( PageOne.propTypes = { acct: PropTypes.string.isRequired, - domain: PropTypes.string.isRequired + domain: PropTypes.string.isRequired, }; const PageTwo = ({ me }) => ( @@ -93,7 +93,7 @@ const PageThree = ({ me, domain }) => ( PageThree.propTypes = { me: ImmutablePropTypes.map.isRequired, - domain: PropTypes.string.isRequired + domain: PropTypes.string.isRequired, }; const PageFour = ({ domain, intl }) => ( @@ -128,7 +128,7 @@ const PageFour = ({ domain, intl }) => ( PageFour.propTypes = { domain: PropTypes.string.isRequired, - intl: PropTypes.object.isRequired + intl: PropTypes.object.isRequired, }; const PageSix = ({ admin, domain }) => { @@ -157,13 +157,13 @@ const PageSix = ({ admin, domain }) => { PageSix.propTypes = { admin: ImmutablePropTypes.map, - domain: PropTypes.string.isRequired + domain: PropTypes.string.isRequired, }; const mapStateToProps = state => ({ me: state.getIn(['accounts', state.getIn(['meta', 'me'])]), admin: state.getIn(['accounts', state.getIn(['meta', 'admin'])]), - domain: state.getIn(['meta', 'domain']) + domain: state.getIn(['meta', 'domain']), }); class OnboardingModal extends React.PureComponent { @@ -173,11 +173,11 @@ class OnboardingModal extends React.PureComponent { intl: PropTypes.object.isRequired, me: ImmutablePropTypes.map.isRequired, domain: PropTypes.string.isRequired, - admin: ImmutablePropTypes.map + admin: ImmutablePropTypes.map, }; state = { - currentIndex: 0 + currentIndex: 0, }; handleSkip = (e) => { @@ -210,7 +210,7 @@ class OnboardingModal extends React.PureComponent { <PageTwo me={me} />, <PageThree me={me} domain={domain} />, <PageFour domain={domain} intl={intl} />, - <PageSix admin={admin} domain={domain} /> + <PageSix admin={admin} domain={domain} />, ]; const { currentIndex } = this.state; @@ -226,7 +226,7 @@ class OnboardingModal extends React.PureComponent { const styles = pages.map((page, i) => ({ key: `page-${i}`, - style: { opacity: spring(i === currentIndex ? 1 : 0) } + style: { opacity: spring(i === currentIndex ? 1 : 0) }, })); return ( diff --git a/app/javascript/mastodon/features/ui/components/upload_area.js b/app/javascript/mastodon/features/ui/components/upload_area.js index c7f546588..c40fe1fb9 100644 --- a/app/javascript/mastodon/features/ui/components/upload_area.js +++ b/app/javascript/mastodon/features/ui/components/upload_area.js @@ -8,14 +8,14 @@ class UploadArea extends React.PureComponent { static propTypes = { active: PropTypes.bool, - onClose: PropTypes.func + onClose: PropTypes.func, }; handleKeyUp = (e) => { e.preventDefault(); e.stopPropagation(); - const keyCode = e.keyCode + const keyCode = e.keyCode; if (this.props.active) { switch(keyCode) { case 27: diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js index 86567dcb8..84a2e1b25 100644 --- a/app/javascript/mastodon/features/ui/components/video_modal.js +++ b/app/javascript/mastodon/features/ui/components/video_modal.js @@ -8,7 +8,7 @@ import IconButton from '../../../components/icon_button'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - close: { id: 'lightbox.close', defaultMessage: 'Close' } + close: { id: 'lightbox.close', defaultMessage: 'Close' }, }); class VideoModal extends ImmutablePureComponent { @@ -17,7 +17,7 @@ class VideoModal extends ImmutablePureComponent { media: ImmutablePropTypes.map.isRequired, time: PropTypes.number, onClose: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired + intl: PropTypes.object.isRequired, }; render () { diff --git a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js index 6c4e73e38..4bb90fb68 100644 --- a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js +++ b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js @@ -2,7 +2,7 @@ import { connect } from 'react-redux'; import LoadingBar from 'react-redux-loading-bar'; const mapStateToProps = (state) => ({ - loading: state.get('loadingBar') + loading: state.get('loadingBar'), }); export default connect(mapStateToProps)(LoadingBar.WrappedComponent); diff --git a/app/javascript/mastodon/features/ui/containers/modal_container.js b/app/javascript/mastodon/features/ui/containers/modal_container.js index 26d77818c..2d27180f7 100644 --- a/app/javascript/mastodon/features/ui/containers/modal_container.js +++ b/app/javascript/mastodon/features/ui/containers/modal_container.js @@ -4,7 +4,7 @@ import ModalRoot from '../components/modal_root'; const mapStateToProps = state => ({ type: state.get('modal').modalType, - props: state.get('modal').modalProps + props: state.get('modal').modalProps, }); const mapDispatchToProps = dispatch => ({ diff --git a/app/javascript/mastodon/features/ui/containers/notifications_container.js b/app/javascript/mastodon/features/ui/containers/notifications_container.js index 529ebf6c8..8bc30df35 100644 --- a/app/javascript/mastodon/features/ui/containers/notifications_container.js +++ b/app/javascript/mastodon/features/ui/containers/notifications_container.js @@ -2,19 +2,19 @@ import { connect } from 'react-redux'; import { NotificationStack } from 'react-notification'; import { dismissAlert, - clearAlerts + clearAlerts, } from '../../../actions/alerts'; import { getAlerts } from '../../../selectors'; const mapStateToProps = (state, props) => ({ - notifications: getAlerts(state) + notifications: getAlerts(state), }); const mapDispatchToProps = (dispatch) => { return { onDismiss: alert => { dispatch(dismissAlert(alert)); - } + }, }; }; diff --git a/app/javascript/mastodon/features/ui/containers/status_list_container.js b/app/javascript/mastodon/features/ui/containers/status_list_container.js index e0e01cf18..14222fedd 100644 --- a/app/javascript/mastodon/features/ui/containers/status_list_container.js +++ b/app/javascript/mastodon/features/ui/containers/status_list_container.js @@ -9,7 +9,7 @@ const makeGetStatusIds = () => createSelector([ (state, { type }) => state.getIn(['settings', type], Immutable.Map()), (state, { type }) => state.getIn(['timelines', type, 'items'], Immutable.List()), (state) => state.get('statuses'), - (state) => state.getIn(['meta', 'me']) + (state) => state.getIn(['meta', 'me']), ], (columnSettings, statusIds, statuses, me) => statusIds.filter(id => { const statusForId = statuses.get(id); let showStatus = true; @@ -45,7 +45,7 @@ const makeMapStateToProps = () => { statusIds: getStatusIds(state, props), isLoading: state.getIn(['timelines', props.type, 'isLoading'], true), isUnread: state.getIn(['timelines', props.type, 'unread']) > 0, - hasMore: !!state.getIn(['timelines', props.type, 'next']) + hasMore: !!state.getIn(['timelines', props.type, 'next']), }); return mapStateToProps; @@ -64,7 +64,7 @@ const mapDispatchToProps = (dispatch, { type, id }) => ({ onScroll: debounce(() => { dispatch(scrollTopTimeline(type, false)); - }, 100) + }, 100), }); diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index bc465aa5a..af124b1ee 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -22,12 +22,12 @@ class UI extends React.PureComponent { static propTypes = { dispatch: PropTypes.func.isRequired, - children: PropTypes.node + children: PropTypes.node, }; state = { width: window.innerWidth, - draggingOver: false + draggingOver: false, }; handleResize = () => { |