diff --git a/app/javascript/gabsocial/components/bundle_column_error/bundle_column_error.js b/app/javascript/gabsocial/components/bundle_column_error/bundle_column_error.js index 6e51f404..5446f5b8 100644 --- a/app/javascript/gabsocial/components/bundle_column_error/bundle_column_error.js +++ b/app/javascript/gabsocial/components/bundle_column_error/bundle_column_error.js @@ -1,5 +1,4 @@ import { defineMessages, injectIntl } from 'react-intl'; -import Column from '../column'; import IconButton from '../icon_button'; const messages = defineMessages({ @@ -25,12 +24,10 @@ class BundleColumnError extends PureComponent { const { intl: { formatMessage } } = this.props; return ( - -
- - {formatMessage(messages.body)} -
-
+
+ + {formatMessage(messages.body)} +
); } diff --git a/app/javascript/gabsocial/components/column/column.js b/app/javascript/gabsocial/components/column/column.js deleted file mode 100644 index 564ecf92..00000000 --- a/app/javascript/gabsocial/components/column/column.js +++ /dev/null @@ -1,30 +0,0 @@ -import { isMobile } from '../../utils/is_mobile'; - -export default class Column extends PureComponent { - - static propTypes = { - heading: PropTypes.string, - icon: PropTypes.string, - children: PropTypes.node, - active: PropTypes.bool, - hideHeadingOnMobile: PropTypes.bool, - backBtn: PropTypes.oneOf([ - 'normal', - 'slim', - ]), - }; - - render () { - const { heading, icon, children, active, hideHeadingOnMobile, backBtn } = this.props; - - const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth))); - const columnHeaderId = showHeading && heading.replace(/ /g, '-'); - - return ( -
- {children} -
- ); - } - -} diff --git a/app/javascript/gabsocial/components/column/column.scss b/app/javascript/gabsocial/components/column/column.scss deleted file mode 100644 index 670d883c..00000000 --- a/app/javascript/gabsocial/components/column/column.scss +++ /dev/null @@ -1,22 +0,0 @@ -.column { - display: flex; - position: relative; - box-sizing: border-box; - flex-direction: column; - // width: 350px; - flex: 1 1 100%; - overflow: hidden; - - @media screen and (min-width: 631px) { - flex: 0 0 auto; - padding: 10px 5px; - - &:first-child { - padding-left: 10px; - } - - &:last-child { - padding-right: 10px; - } - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/column/index.js b/app/javascript/gabsocial/components/column/index.js deleted file mode 100644 index 6501795b..00000000 --- a/app/javascript/gabsocial/components/column/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './column'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.js b/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.js deleted file mode 100644 index 057b97a2..00000000 --- a/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.js +++ /dev/null @@ -1,14 +0,0 @@ -export default class ColumnSettingsHeading extends PureComponent { - static propTypes = { - heading: PropTypes.object.isRequired, - id: PropTypes.string, - }; - - render() { - const { heading, id } = this.props; - - return ( - {heading} - ) - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.scss b/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.scss deleted file mode 100644 index 71c6d675..00000000 --- a/app/javascript/gabsocial/components/column_settings_heading/column_settings_heading.scss +++ /dev/null @@ -1,7 +0,0 @@ -.column-settings-heading { - display: block; - color: $darker-text-color; - cursor: default; - font-weight: 500; - margin-bottom: 10px; -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/column_settings_heading/index.js b/app/javascript/gabsocial/components/column_settings_heading/index.js deleted file mode 100644 index c8f0eb0f..00000000 --- a/app/javascript/gabsocial/components/column_settings_heading/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './column_settings_heading'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/error_boundary/error_boundary.js b/app/javascript/gabsocial/components/error_boundary.js similarity index 100% rename from app/javascript/gabsocial/components/error_boundary/error_boundary.js rename to app/javascript/gabsocial/components/error_boundary.js diff --git a/app/javascript/gabsocial/components/error_boundary/error_boundary.scss b/app/javascript/gabsocial/components/error_boundary/error_boundary.scss deleted file mode 100644 index 135028c1..00000000 --- a/app/javascript/gabsocial/components/error_boundary/error_boundary.scss +++ /dev/null @@ -1,19 +0,0 @@ -.error-boundary { - &__container { - @include margin-center(auto); - } - - span { - display: block; - text-align: center; - color: $secondary-text-color; - } - - &__link { - display: block; - text-align: center; - color: $gab-brand-default; - - @include margin-center(15px); - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/error_boundary/index.js b/app/javascript/gabsocial/components/error_boundary/index.js deleted file mode 100644 index 14630b0e..00000000 --- a/app/javascript/gabsocial/components/error_boundary/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './error_boundary'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.js b/app/javascript/gabsocial/components/intersection_observer_article.js similarity index 96% rename from app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.js rename to app/javascript/gabsocial/components/intersection_observer_article.js index d66028ab..75a6f49e 100644 --- a/app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.js +++ b/app/javascript/gabsocial/components/intersection_observer_article.js @@ -1,6 +1,6 @@ import { is } from 'immutable'; -import scheduleIdleTask from '../../utils/schedule_idle_task'; -import getRectFromEntry from '../../utils/get_rect_from_entry'; +import scheduleIdleTask from '../utils/schedule_idle_task'; +import getRectFromEntry from '../utils/get_rect_from_entry'; // Diff these props in the "rendered" state const updateOnPropsForRendered = ['id', 'index', 'listLength']; diff --git a/app/javascript/gabsocial/components/intersection_observer_article/index.js b/app/javascript/gabsocial/components/intersection_observer_article/index.js deleted file mode 100644 index 7acbd411..00000000 --- a/app/javascript/gabsocial/components/intersection_observer_article/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './intersection_observer_article'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.scss b/app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.scss deleted file mode 100644 index 71162dc9..00000000 --- a/app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.scss +++ /dev/null @@ -1,4 +0,0 @@ -article { - // TEMPORARY - content of columns may be significantly altered - // background: $gab-background-container; -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/modal/actions_modal/actions_modal.js b/app/javascript/gabsocial/components/modal/actions_modal.js similarity index 90% rename from app/javascript/gabsocial/components/modal/actions_modal/actions_modal.js rename to app/javascript/gabsocial/components/modal/actions_modal.js index 93b9276b..d848aef4 100644 --- a/app/javascript/gabsocial/components/modal/actions_modal/actions_modal.js +++ b/app/javascript/gabsocial/components/modal/actions_modal.js @@ -1,11 +1,11 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import classNames from 'classnames'; -import StatusContent from '../../status_content'; -import Avatar from '../../avatar'; -import RelativeTimestamp from '../../relative_timestamp'; -import DisplayName from '../../display_name'; -import IconButton from '../../icon_button'; +import StatusContent from '../status_content'; +import Avatar from '../avatar'; +import RelativeTimestamp from '../relative_timestamp'; +import DisplayName from '../display_name'; +import IconButton from '../icon_button'; export default class ActionsModal extends ImmutablePureComponent { diff --git a/app/javascript/gabsocial/components/modal/boost_modal/boost_modal.js b/app/javascript/gabsocial/components/modal/boost_modal.js similarity index 92% rename from app/javascript/gabsocial/components/modal/boost_modal/boost_modal.js rename to app/javascript/gabsocial/components/modal/boost_modal.js index 125b402d..bc99c17f 100644 --- a/app/javascript/gabsocial/components/modal/boost_modal/boost_modal.js +++ b/app/javascript/gabsocial/components/modal/boost_modal.js @@ -1,12 +1,12 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; -import Button from '../../button'; -import StatusContent from '../../status_content'; -import Avatar from '../../avatar'; -import RelativeTimestamp from '../../relative_timestamp'; -import DisplayName from '../../display_name'; -import Icon from '../../icon'; +import Button from '../button'; +import StatusContent from '../status_content'; +import Avatar from '../avatar'; +import RelativeTimestamp from '../relative_timestamp'; +import DisplayName from '../display_name'; +import Icon from '../icon'; const messages = defineMessages({ cancel_reblog: { id: 'status.cancel_reblog_private', defaultMessage: 'Un-repost' }, diff --git a/app/javascript/gabsocial/components/modal/compose_modal/compose_modal.js b/app/javascript/gabsocial/components/modal/compose_modal.js similarity index 86% rename from app/javascript/gabsocial/components/modal/compose_modal/compose_modal.js rename to app/javascript/gabsocial/components/modal/compose_modal.js index ccf2fe5a..a13cc721 100644 --- a/app/javascript/gabsocial/components/modal/compose_modal/compose_modal.js +++ b/app/javascript/gabsocial/components/modal/compose_modal.js @@ -1,9 +1,9 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { openModal } from '../../../actions/modal'; -import { cancelReplyCompose } from '../../../actions/compose'; -import ModalLayout from '../modal_layout'; -import TimelineComposeBlock from '../../timeline_compose_block'; +import { openModal } from '../../actions/modal'; +import { cancelReplyCompose } from '../../actions/compose'; +import ModalLayout from './modal_layout'; +import TimelineComposeBlock from '../timeline_compose_block'; const messages = defineMessages({ confirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, diff --git a/app/javascript/gabsocial/components/modal/confirmation_modal/confirmation_modal.js b/app/javascript/gabsocial/components/modal/confirmation_modal.js similarity index 73% rename from app/javascript/gabsocial/components/modal/confirmation_modal/confirmation_modal.js rename to app/javascript/gabsocial/components/modal/confirmation_modal.js index 702d908f..b19e9b4c 100644 --- a/app/javascript/gabsocial/components/modal/confirmation_modal/confirmation_modal.js +++ b/app/javascript/gabsocial/components/modal/confirmation_modal.js @@ -1,7 +1,9 @@ -import { injectIntl, FormattedMessage } from 'react-intl'; -import Button from '../../button'; +import { injectIntl, FormattedMessage } from 'react-intl' +import ModalLayout from './modal_layout' +import Button from '../button' -export default @injectIntl +export default +@injectIntl class ConfirmationModal extends PureComponent { static propTypes = { @@ -13,34 +15,34 @@ class ConfirmationModal extends PureComponent { onSecondary: PropTypes.func, intl: PropTypes.object.isRequired, onCancel: PropTypes.func, - }; + } componentDidMount() { - this.button.focus(); + this.button.focus() } handleClick = () => { - this.props.onClose(); - this.props.onConfirm(); + this.props.onClose() + this.props.onConfirm() } handleSecondary = () => { - this.props.onClose(); - this.props.onSecondary(); + this.props.onClose() + this.props.onSecondary() } handleCancel = () => { - const {onClose, onCancel} = this.props; - onClose(); - if (onCancel) onCancel(); + const {onClose, onCancel} = this.props + onClose() + if (onCancel) onCancel() } setRef = (c) => { - this.button = c; + this.button = c } render () { - const { message, confirm, secondary } = this.props; + const { message, confirm, secondary } = this.props return (
@@ -58,7 +60,7 @@ class ConfirmationModal extends PureComponent {
- ); + ) } } diff --git a/app/javascript/gabsocial/components/modal/embed_modal/embed_modal.js b/app/javascript/gabsocial/components/modal/embed_modal.js similarity index 98% rename from app/javascript/gabsocial/components/modal/embed_modal/embed_modal.js rename to app/javascript/gabsocial/components/modal/embed_modal.js index 639e95df..79e5a888 100644 --- a/app/javascript/gabsocial/components/modal/embed_modal/embed_modal.js +++ b/app/javascript/gabsocial/components/modal/embed_modal.js @@ -1,6 +1,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; -import api from '../../../api' +import api from '../../api' const messages = defineMessages({ embed: { id: 'status.embed', defaultMessage: 'Embed' }, diff --git a/app/javascript/gabsocial/components/modal/focal_point_modal/focal_point_modal.js b/app/javascript/gabsocial/components/modal/focal_point_modal.js similarity index 94% rename from app/javascript/gabsocial/components/modal/focal_point_modal/focal_point_modal.js rename to app/javascript/gabsocial/components/modal/focal_point_modal.js index 49e3fd62..e4bbd61c 100644 --- a/app/javascript/gabsocial/components/modal/focal_point_modal/focal_point_modal.js +++ b/app/javascript/gabsocial/components/modal/focal_point_modal.js @@ -1,9 +1,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import classNames from 'classnames'; -import { changeUploadCompose } from '../../../actions/compose'; -import { getPointerPosition } from '../../../utils/element_position'; -import ImageLoader from '../../image_loader'; +import { changeUploadCompose } from '../../actions/compose'; +import { getPointerPosition } from '../../utils/element_position'; +import ImageLoader from '../image_loader'; const mapStateToProps = (state, { id }) => ({ media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id), diff --git a/app/javascript/gabsocial/components/modal/index.js b/app/javascript/gabsocial/components/modal/index.js deleted file mode 100644 index 933ff1fb..00000000 --- a/app/javascript/gabsocial/components/modal/index.js +++ /dev/null @@ -1,27 +0,0 @@ -import ActionsModal from './actions_modal/actions_modal'; -import BoostModal from './boost_modal/boost_modal'; -import ComposeModal from './compose_modal/compose_modal'; -import ConfirmationModal from './confirmation_modal/confirmation_modal'; -import EmbedModal from './embed_modal/embed_modal'; -import FocalPointModal from './focal_point_modal/focal_point_modal'; -import HotkeysModal from './hotkeys_modal'; -import MediaModal from './media_modal/media_modal'; -import MuteModal from './mute_modal/mute_modal'; -import ReportModal from './report_modal/report_modal'; -import UnauthorizedModal from './unauthorized_modal'; -import VideoModal from './video_modal/video_modal'; - -export { - ActionsModal, - BoostModal, - ComposeModal, - ConfirmationModal, - EmbedModal, - FocalPointModal, - HotkeysModal, - MediaModal, - MuteModal, - ReportModal, - UnauthorizedModal, - VideoModal, -}; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/modal/media_modal/media_modal.js b/app/javascript/gabsocial/components/modal/media_modal.js similarity index 96% rename from app/javascript/gabsocial/components/modal/media_modal/media_modal.js rename to app/javascript/gabsocial/components/modal/media_modal.js index 38ab998f..58e9b409 100644 --- a/app/javascript/gabsocial/components/modal/media_modal/media_modal.js +++ b/app/javascript/gabsocial/components/modal/media_modal.js @@ -3,11 +3,11 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ReactSwipeableViews from 'react-swipeable-views'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import Video from '../../../features/video'; -import ExtendedVideoPlayer from '../../extended_video_player'; -import IconButton from '../../icon_button'; -import ImageLoader from '../../image_loader'; -import Icon from '../../icon'; +import Video from '../../features/video'; +import ExtendedVideoPlayer from '../extended_video_player'; +import IconButton from '../icon_button'; +import ImageLoader from '../image_loader'; +import Icon from '../icon'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/gabsocial/components/modal_loading/modal_loading.js b/app/javascript/gabsocial/components/modal/modal_loading.js similarity index 100% rename from app/javascript/gabsocial/components/modal_loading/modal_loading.js rename to app/javascript/gabsocial/components/modal/modal_loading.js diff --git a/app/javascript/gabsocial/components/modal/modal_root.js b/app/javascript/gabsocial/components/modal/modal_root.js index 31e56395..5c568bed 100644 --- a/app/javascript/gabsocial/components/modal/modal_root.js +++ b/app/javascript/gabsocial/components/modal/modal_root.js @@ -1,18 +1,17 @@ import ModalBase from './modal_base' import Bundle from '../../features/ui/util/bundle' import BundleModalError from '../bundle_modal_error' -import { - ActionsModal, - MediaModal, - VideoModal, - BoostModal, - ConfirmationModal, - FocalPointModal, - HotkeysModal, - ComposeModal, - UnauthorizedModal, - ProUpgradeModal, -} from '.' +import ActionsModal from './actions_modal' +import MediaModal from './media_modal' +// import VideoModal from './video_modal' +import BoostModal from './boost_modal' +import ConfirmationModal from './confirmation_modal' +import FocalPointModal from './focal_point_modal' +import HotkeysModal from './hotkeys_modal' +import ComposeModal from './compose_modal' +import UnauthorizedModal from './unauthorized_modal' +import ProUpgradeModal from './pro_upgrade_modal' +import ModalLoading from './modal_loading' import { MuteModal, ReportModal, @@ -21,11 +20,10 @@ import { ListAdder, StatusRevisionModal, } from '../../features/ui/util/async-components' -import ModalLoading from '../modal_loading' const MODAL_COMPONENTS = { 'MEDIA': () => Promise.resolve({ default: MediaModal }), - 'VIDEO': () => Promise.resolve({ default: VideoModal }), + // 'VIDEO': () => Promise.resolve({ default: VideoModal }), 'BOOST': () => Promise.resolve({ default: BoostModal }), 'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }), 'MUTE': MuteModal, diff --git a/app/javascript/gabsocial/components/modal/mute_modal/mute_modal.js b/app/javascript/gabsocial/components/modal/mute_modal.js similarity index 91% rename from app/javascript/gabsocial/components/modal/mute_modal/mute_modal.js rename to app/javascript/gabsocial/components/modal/mute_modal.js index 5471a697..385c41c0 100644 --- a/app/javascript/gabsocial/components/modal/mute_modal/mute_modal.js +++ b/app/javascript/gabsocial/components/modal/mute_modal.js @@ -1,9 +1,9 @@ import { injectIntl, defineMessages } from 'react-intl'; -import { closeModal } from '../../../actions/modal'; -import { muteAccount } from '../../../actions/accounts'; -import { toggleHideNotifications } from '../../../actions/mutes'; -import ToggleSwitch from '../../toggle_switch'; -import Button from '../../button'; +import { closeModal } from '../../actions/modal'; +import { muteAccount } from '../../actions/accounts'; +import { toggleHideNotifications } from '../../actions/mutes'; +import ToggleSwitch from '../toggle_switch'; +import Button from '../button'; const messages = defineMessages({ muteMessage: { id: 'confirmations.mute.message', defaultMessage: 'Are you sure you want to mute {name}?' }, diff --git a/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js b/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js index a22e8485..4af8785f 100644 --- a/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js +++ b/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js @@ -1,63 +1,63 @@ -import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; -import ImmutablePureComponent from 'react-immutable-pure-component'; -import { me } from '../initial_state'; -import IconButton from './icon_button'; -import Icon from './icon'; +import { defineMessages, injectIntl } from 'react-intl' +import ImmutablePureComponent from 'react-immutable-pure-component' +import Button from '../button' +import Text from '../text' +import ModalLayout from './modal_layout' const messages = defineMessages({ - close: { id: 'lightbox.close', defaultMessage: 'Close' }, -}); - -const mapStateToProps = state => { - return { - account: state.getIn(['accounts', me]), - }; -}; + title: { id: 'promo.gab_pro', defaultMessage: 'Upgrade to GabPRO' }, + text: { id: 'pro_upgrade_modal.text', defaultMessage: 'Gab is fully funded by people like you. Please consider supporting us on our mission to defend free expression online for all people.' }, + benefits: { id: 'pro_upgrade_modal.benefits', defaultMessage: 'Here are just some of the benefits that thousands of GabPRO members receive:' }, +}) +export default +@injectIntl class ProUpgradeModal extends ImmutablePureComponent { static propTypes = { intl: PropTypes.object.isRequired, - onClose: PropTypes.func.isRequired, - }; + } - onClickClose = () => { - this.props.onClose('PRO_UPGRADE'); - }; - - render () { - const { intl } = this.props; + render() { + const { intl } = this.props return ( -
-
-

- + +
+ + {intl.formatMessage(messages.text)} + + + {intl.formatMessage(messages.benefits)} +
-
-
- - - - -
    -
  • Schedule Posts
  • -
  • Get Verified
  • -
  • Create Groups
  • -
  • Larger Video and Image Uploads
  • -
  • Receive the PRO Badge
  • -
  • Remove in-feed promotions
  • -
  • More value being added daily!
  • -
- - - - -
-
-
- ); + + + + + + + ) } } - -export default injectIntl(connect(mapStateToProps)(ProUpgradeModal)); diff --git a/app/javascript/gabsocial/components/modal/report_modal/report_modal.js b/app/javascript/gabsocial/components/modal/report_modal.js similarity index 93% rename from app/javascript/gabsocial/components/modal/report_modal/report_modal.js rename to app/javascript/gabsocial/components/modal/report_modal.js index 9f20849a..e46a48a6 100644 --- a/app/javascript/gabsocial/components/modal/report_modal/report_modal.js +++ b/app/javascript/gabsocial/components/modal/report_modal.js @@ -2,13 +2,13 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl } from 'react-intl'; import { OrderedSet } from 'immutable'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports'; -import { expandAccountTimeline } from '../../../actions/timelines'; -import { makeGetAccount } from '../../../selectors'; -import StatusCheckBox from '../../status_check_box'; -import ToggleSwitch from '../../toggle_switch'; -import Button from '../../button'; -import IconButton from '../../icon_button'; +import { changeReportComment, changeReportForward, submitReport } from '../../actions/reports'; +import { expandAccountTimeline } from '../../actions/timelines'; +import { makeGetAccount } from '../../selectors'; +import StatusCheckBox from '../status_check_box'; +import ToggleSwitch from '../toggle_switch'; +import Button from '../button'; +import IconButton from '../icon_button'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/gabsocial/components/modal/status_revision_modal/status_revision_modal.js b/app/javascript/gabsocial/components/modal/status_revision_modal.js similarity index 90% rename from app/javascript/gabsocial/components/modal/status_revision_modal/status_revision_modal.js rename to app/javascript/gabsocial/components/modal/status_revision_modal.js index 102db132..4925f6f4 100644 --- a/app/javascript/gabsocial/components/modal/status_revision_modal/status_revision_modal.js +++ b/app/javascript/gabsocial/components/modal/status_revision_modal.js @@ -2,8 +2,8 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; -import StatusRevisionListContainer from '../../../containers/status_revision_list_container'; -import IconButton from '../../../components/icon_button'; +import StatusRevisionListContainer from '../../containers/status_revision_list_container'; +import IconButton from '../icon_button'; const messages = defineMessages({ close: { id: 'lightbox.close', defaultMessage: 'Close' }, diff --git a/app/javascript/gabsocial/components/modal/video_modal/video_modal.js b/app/javascript/gabsocial/components/modal/video_modal.js similarity index 97% rename from app/javascript/gabsocial/components/modal/video_modal/video_modal.js rename to app/javascript/gabsocial/components/modal/video_modal.js index ece8b038..a28bf122 100644 --- a/app/javascript/gabsocial/components/modal/video_modal/video_modal.js +++ b/app/javascript/gabsocial/components/modal/video_modal.js @@ -1,7 +1,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; -import Video from '../../../features/video'; +import Video from '../../features/video'; export const previewState = 'previewVideoModal'; diff --git a/app/javascript/gabsocial/components/modal_loading/index.js b/app/javascript/gabsocial/components/modal_loading/index.js deleted file mode 100644 index abf856e0..00000000 --- a/app/javascript/gabsocial/components/modal_loading/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './modal_loading'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/modal_loading/modal_loading.scss b/app/javascript/gabsocial/components/modal_loading/modal_loading.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/app/javascript/gabsocial/components/scrollable_list/scrollable_list.js b/app/javascript/gabsocial/components/scrollable_list.js similarity index 96% rename from app/javascript/gabsocial/components/scrollable_list/scrollable_list.js rename to app/javascript/gabsocial/components/scrollable_list.js index 522bad61..3306ef75 100644 --- a/app/javascript/gabsocial/components/scrollable_list/scrollable_list.js +++ b/app/javascript/gabsocial/components/scrollable_list.js @@ -1,9 +1,9 @@ import { throttle } from 'lodash'; import { List as ImmutableList } from 'immutable'; -import IntersectionObserverArticleContainer from '../../containers/intersection_observer_article_container'; -import IntersectionObserverWrapper from '../../features/ui/util/intersection_observer_wrapper'; -import ColumnIndicator from '../column_indicator'; -import LoadMore from '../load_more'; +import IntersectionObserverArticleContainer from '../containers/intersection_observer_article_container'; +import IntersectionObserverWrapper from '../features/ui/util/intersection_observer_wrapper'; +import ColumnIndicator from './column_indicator'; +import LoadMore from './load_more'; const MOUSE_IDLE_DELAY = 300; diff --git a/app/javascript/gabsocial/components/scrollable_list/index.js b/app/javascript/gabsocial/components/scrollable_list/index.js deleted file mode 100644 index 1c1a0fd0..00000000 --- a/app/javascript/gabsocial/components/scrollable_list/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './scrollable_list'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/scrollable_list/scrollable_list.scss b/app/javascript/gabsocial/components/scrollable_list/scrollable_list.scss deleted file mode 100644 index 11f9252d..00000000 --- a/app/javascript/gabsocial/components/scrollable_list/scrollable_list.scss +++ /dev/null @@ -1,6 +0,0 @@ -.scrollable-list { - &--flex { - display: flex; - flex-direction: column; - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/section_headline_bar/index.js b/app/javascript/gabsocial/components/section_headline_bar/index.js deleted file mode 100644 index abfc87c9..00000000 --- a/app/javascript/gabsocial/components/section_headline_bar/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './section_headline_bar'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.js b/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.js deleted file mode 100644 index c888b0e1..00000000 --- a/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.js +++ /dev/null @@ -1,62 +0,0 @@ -import { NavLink } from 'react-router-dom'; -import classNames from 'classnames'; -import Icon from '../icon'; - -class SectionHeadlineBarItem extends PureComponent { - static propTypes = { - to: PropTypes.string, - icon: PropTypes.string, - className: PropTypes.string, - onClick: PropTypes.func, - title: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.node, - ]), - exact: PropTypes.bool, - }; - - render() { - const { to, title, icon, className, onClick, exact } = this.props; - - const classes = classNames('section-header-bar__item', className); - - if (to) { - return ( - {title} - ) - } else if (icon) { - return ( - - ) - } - - return ( - - ) - } -}; - -export default class SectionHeadlineBar extends PureComponent { - static propTypes = { - items: PropTypes.array.isRequired, - className: PropTypes.string, - }; - - render() { - const { items, className } = this.props; - - const classes = classNames('section-headline-bar', className); - - return ( -
- { - items.forEach((item, i) => ( - - )) - } -
- ) - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.scss b/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.scss deleted file mode 100644 index c4bf245b..00000000 --- a/app/javascript/gabsocial/components/section_headline_bar/section_headline_bar.scss +++ /dev/null @@ -1,58 +0,0 @@ -.section-headline-bar { - background: darken($ui-base-color, 4%); - border-bottom: 1px solid lighten($ui-base-color, 8%); - cursor: default; - display: flex; - flex-shrink: 0; - - button { - background: darken($ui-base-color, 4%); - border: 0; - margin: 0; - } - - button, - a { - display: block; - flex: 1 1 auto; - color: $secondary-text-color; - padding: 15px 0; - text-decoration: none; - position: relative; - - @include text-sizing(14px, 500, 1, center); - - &.active { - color: $primary-text-color; - - &::before, - &::after { - bottom: 0; - left: 50%; - transform: translateX(-50%); - border-style: solid; - border-width: 0 10px 10px; - border-color: transparent transparent lighten($ui-base-color, 8%); - - @include pseudo; - @include size(0); - } - - &::after { - bottom: -1px; - border-color: transparent transparent $ui-base-color; - } - } - } -} - -.account-section-headline { - - button, - a { - flex: none; - padding: 18px 15px; - - @include text-sizing(16px, 600); - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.js b/app/javascript/gabsocial/components/timeline_queue_button_header.js similarity index 94% rename from app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.js rename to app/javascript/gabsocial/components/timeline_queue_button_header.js index 932322c0..88e30861 100644 --- a/app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.js +++ b/app/javascript/gabsocial/components/timeline_queue_button_header.js @@ -1,6 +1,6 @@ import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; -import { shortNumberFormat } from '../../utils/numbers'; +import { shortNumberFormat } from '../utils/numbers'; export default class TimelineQueueButtonHeader extends PureComponent { diff --git a/app/javascript/gabsocial/components/timeline_queue_button_header/index.js b/app/javascript/gabsocial/components/timeline_queue_button_header/index.js deleted file mode 100644 index d0dfadbb..00000000 --- a/app/javascript/gabsocial/components/timeline_queue_button_header/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './timeline_queue_button_header'; \ No newline at end of file diff --git a/app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.scss b/app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.scss deleted file mode 100644 index b3bc8ea4..00000000 --- a/app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.scss +++ /dev/null @@ -1,29 +0,0 @@ -.timeline-queue-header { - display: block; - width: 100%; - max-height: 0px; - position: relative; - background-color: darken($ui-base-color, 8%); - border-bottom: 1px solid; - border-top: 1px solid; - border-color: darken($ui-base-color, 4%); - transition: max-height 2.5s ease; - overflow: hidden; - - &--extended { - max-height: 46px; - } - - &__btn { - display: block; - cursor: pointer; - color: $secondary-text-color; - - @include size(100%); - @include text-sizing(14px, 400, 46px, center); - - span { - height: 46px; - } - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/containers/media_container.js b/app/javascript/gabsocial/containers/media_container.js index ca779324..69a70606 100644 --- a/app/javascript/gabsocial/containers/media_container.js +++ b/app/javascript/gabsocial/containers/media_container.js @@ -8,7 +8,7 @@ import Card from '../features/status/components/card'; import Poll from '../components/poll'; import MediaGallery from '../components/media_gallery'; import ModalRoot from '../components/modal/modal_root'; -import { MediaModal } from '../components/modal'; +import MediaModal from '../components/modal/media_modal'; const { localeData, messages } = getLocale(); addLocaleData(localeData); diff --git a/app/javascript/gabsocial/containers/status_revision_list_container.js b/app/javascript/gabsocial/containers/status_revision_list_container.js index ec2b5e7d..b1dd45d3 100644 --- a/app/javascript/gabsocial/containers/status_revision_list_container.js +++ b/app/javascript/gabsocial/containers/status_revision_list_container.js @@ -1,5 +1,5 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; -import { load } from '../../../actions/status_revision_list'; +import { load } from '../actions/status_revision_list'; import StatusRevisionList from '../components/status_revision_list'; class StatusRevisionListContainer extends ImmutablePureComponent { diff --git a/app/javascript/gabsocial/features/account_gallery/account_gallery.js b/app/javascript/gabsocial/features/account_gallery/account_gallery.js index b8923268..212916f0 100644 --- a/app/javascript/gabsocial/features/account_gallery/account_gallery.js +++ b/app/javascript/gabsocial/features/account_gallery/account_gallery.js @@ -10,10 +10,8 @@ import { expandAccountMediaTimeline } from '../../actions/timelines'; import { me } from '../../initial_state'; import { getAccountGallery } from '../../selectors'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import MediaItem from './components/media_item'; import LoadMore from '../../components/load_more'; -import SectionHeadlineBar from '../../components/section_headline_bar'; const messages = defineMessages({ posts: { id: 'account.posts', defaultMessage: 'Gabs' }, @@ -63,7 +61,7 @@ class LoadMoreMedia extends ImmutablePureComponent { this.props.onLoadMore(this.props.maxId); } - render () { + render() { return ( ); } else if (accountId === -1 || (!attachments && isLoading)) { - return ( ); + return (); } else if (unavailable) { return (); } @@ -173,9 +171,8 @@ class AccountGallery extends ImmutablePureComponent { } return ( - -
- + { /* + /> */ } -
- {attachments.map((attachment, index) => attachment === null ? ( - 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} /> - ) : ( +
+ {attachments.map((attachment, index) => attachment === null ? ( + 0 ? attachments.getIn(index - 1, 'id') : null} onLoadMore={this.handleLoadMore} /> + ) : ( ))} - { - attachments.size == 0 && -
- -
- } - - {loadOlder} -
- - {isLoading && attachments.size === 0 && ( -
- + { + attachments.size == 0 && +
+
- )} + } + + {loadOlder}
- + + {isLoading && attachments.size === 0 && ( +
+ +
+ )} +
); } diff --git a/app/javascript/gabsocial/features/account_timeline/account_timeline.js b/app/javascript/gabsocial/features/account_timeline/account_timeline.js index f6ef4ae7..4b86bcc3 100644 --- a/app/javascript/gabsocial/features/account_timeline/account_timeline.js +++ b/app/javascript/gabsocial/features/account_timeline/account_timeline.js @@ -8,8 +8,6 @@ import { fetchAccountIdentityProofs } from '../../actions/identity_proofs'; import { me } from '../../initial_state'; import StatusList from '../../components/status_list/status_list'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; -import SectionHeadlineBar from '../../components/section_headline_bar' ; const messages = defineMessages({ posts: { id: 'account.posts', defaultMessage: 'Gabs' }, @@ -70,7 +68,7 @@ class AccountTimeline extends ImmutablePureComponent { intl: PropTypes.object.isRequired, }; - componentWillMount () { + componentWillMount() { const { params: { username }, accountId, withReplies } = this.props; if (accountId && accountId !== -1) { @@ -87,7 +85,7 @@ class AccountTimeline extends ImmutablePureComponent { } } - componentWillReceiveProps (nextProps) { + componentWillReceiveProps(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId) || nextProps.withReplies !== this.props.withReplies) { this.props.dispatch(fetchAccount(nextProps.accountId)); this.props.dispatch(fetchAccountIdentityProofs(nextProps.accountId)); @@ -106,7 +104,7 @@ class AccountTimeline extends ImmutablePureComponent { } } - render () { + render() { const { statusIds, featuredStatusIds, isLoading, hasMore, isAccount, accountId, unavailable, accountUsername, intl } = this.props; if (!isAccount && accountId !== -1) { @@ -117,38 +115,38 @@ class AccountTimeline extends ImmutablePureComponent { return (); } + /* + */ + return ( - - - } - /> - + } + /> ); } diff --git a/app/javascript/gabsocial/features/blocks/blocks.js b/app/javascript/gabsocial/features/blocks/blocks.js index d06ca5b5..90eada6b 100644 --- a/app/javascript/gabsocial/features/blocks/blocks.js +++ b/app/javascript/gabsocial/features/blocks/blocks.js @@ -3,7 +3,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import AccountContainer from '../../containers/account_container'; import { fetchBlocks, expandBlocks } from '../../actions/blocks'; import ScrollableList from '../../components/scrollable_list'; @@ -45,18 +44,16 @@ class Blocks extends ImmutablePureComponent { } return ( - - } - > - {accountIds.map(id => - - )} - - + } + > + {accountIds.map(id => + + )} + ); } diff --git a/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js b/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js index 31620841..dae9176f 100644 --- a/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js +++ b/app/javascript/gabsocial/features/domain_blocks/domain_blocks.js @@ -5,7 +5,6 @@ import { debounce } from 'lodash'; import { fetchDomainBlocks, expandDomainBlocks } from '../../actions/domain_blocks'; import DomainContainer from '../../containers/domain_container'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import ScrollableList from '../../components/scrollable_list'; const messages = defineMessages({ @@ -46,18 +45,16 @@ class Blocks extends ImmutablePureComponent { } return ( - - } - > - {domains.map(domain => - - )} - - + } + > + {domains.map(domain => + + )} + ); } diff --git a/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js b/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js index a4f2e54e..08441d3b 100644 --- a/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js +++ b/app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js @@ -4,7 +4,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { debounce } from 'lodash'; import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites'; import { meUsername } from '../../initial_state'; -import Column from '../../components/column'; import StatusList from '../../components/status_list'; import ColumnIndicator from '../../components/column_indicator'; @@ -44,7 +43,6 @@ class Favourites extends ImmutablePureComponent { } return ( - } /> - ); } diff --git a/app/javascript/gabsocial/features/follow_requests/follow_requests.js b/app/javascript/gabsocial/features/follow_requests/follow_requests.js index 38913ded..b51f1bdb 100644 --- a/app/javascript/gabsocial/features/follow_requests/follow_requests.js +++ b/app/javascript/gabsocial/features/follow_requests/follow_requests.js @@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import AccountAuthorize from './components/account_authorize'; import ScrollableList from '../../components/scrollable_list'; @@ -45,18 +44,16 @@ class FollowRequests extends ImmutablePureComponent { } return ( - - } - > - {accountIds.map(id => - - )} - - + } + > + {accountIds.map(id => + + )} + ); } diff --git a/app/javascript/gabsocial/features/followers/followers.js b/app/javascript/gabsocial/features/followers/followers.js index cab73911..dad9e887 100644 --- a/app/javascript/gabsocial/features/followers/followers.js +++ b/app/javascript/gabsocial/features/followers/followers.js @@ -11,7 +11,6 @@ import { } from '../../actions/accounts'; import { me } from '../../initial_state'; import AccountContainer from '../../containers/account_container'; -import Column from '../../components/column'; import ScrollableList from '../../components/scrollable_list'; const mapStateToProps = (state, { params: { username } }) => { @@ -52,7 +51,7 @@ class Followers extends ImmutablePureComponent { unavailable: PropTypes.bool, }; - componentWillMount () { + componentWillMount() { const { params: { username }, accountId } = this.props; if (accountId && accountId !== -1) { @@ -63,7 +62,7 @@ class Followers extends ImmutablePureComponent { } } - componentWillReceiveProps (nextProps) { + componentWillReceiveProps(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId)) { this.props.dispatch(fetchAccount(nextProps.accountId)); this.props.dispatch(fetchFollowers(nextProps.accountId)); @@ -76,7 +75,7 @@ class Followers extends ImmutablePureComponent { } }, 300, { leading: true }); - render () { + render() { const { accountIds, hasMore, isAccount, accountId, unavailable } = this.props; if (!isAccount && accountId !== -1) { @@ -88,18 +87,16 @@ class Followers extends ImmutablePureComponent { } return ( - - } - > - {accountIds.map(id => - - )} - - + } + > + {accountIds.map(id => + + )} + ); } diff --git a/app/javascript/gabsocial/features/following/following.js b/app/javascript/gabsocial/features/following/following.js index 59ee2308..a9850ab1 100644 --- a/app/javascript/gabsocial/features/following/following.js +++ b/app/javascript/gabsocial/features/following/following.js @@ -11,7 +11,6 @@ import { import { me } from '../../initial_state'; import AccountContainer from '../../containers/account_container'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import ScrollableList from '../../components/scrollable_list'; const mapStateToProps = (state, { params: { username } }) => { @@ -90,18 +89,16 @@ class Following extends ImmutablePureComponent { } return ( - - } - > - {accountIds.map(id => - - )} - - + } + > + {accountIds.map(id => + + )} + ); } diff --git a/app/javascript/gabsocial/features/groups/members/index.js b/app/javascript/gabsocial/features/groups/members/index.js index a7346601..d56eb2f1 100644 --- a/app/javascript/gabsocial/features/groups/members/index.js +++ b/app/javascript/gabsocial/features/groups/members/index.js @@ -1,7 +1,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; -import ColumnIndicator from '../../../components/column_indicator'; import { fetchMembers, expandMembers, @@ -10,7 +9,6 @@ import { } from '../../../actions/groups'; import { FormattedMessage } from 'react-intl'; import AccountContainer from '../../../containers/account_container'; -import Column from '../../../components/column'; import ScrollableList from '../../../components/scrollable_list'; import Dropdown from '../../../components/dropdown_menu' @@ -51,15 +49,10 @@ class GroupMembers extends ImmutablePureComponent { const { accountIds, hasMore, group, relationships, dispatch } = this.props; if (!group || !accountIds || !relationships) { - return ( - - - - ); + return } return ( - - ); } diff --git a/app/javascript/gabsocial/features/groups/removed_accounts/index.js b/app/javascript/gabsocial/features/groups/removed_accounts/index.js index 706ef30e..44185f1c 100644 --- a/app/javascript/gabsocial/features/groups/removed_accounts/index.js +++ b/app/javascript/gabsocial/features/groups/removed_accounts/index.js @@ -3,24 +3,23 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import ColumnIndicator from '../../../components/column_indicator'; import { - fetchRemovedAccounts, - expandRemovedAccounts, - removeRemovedAccount, + fetchRemovedAccounts, + expandRemovedAccounts, + removeRemovedAccount, } from '../../../actions/groups'; import { FormattedMessage } from 'react-intl'; import AccountContainer from '../../../containers/account_container'; -import Column from '../../../components/column'; import ScrollableList from '../../../components/scrollable_list'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ - remove: { id: 'groups.removed_accounts', defaultMessage: 'Allow joining' }, + remove: { id: 'groups.removed_accounts', defaultMessage: 'Allow joining' }, }); const mapStateToProps = (state, { params: { id } }) => ({ - group: state.getIn(['groups', id]), - accountIds: state.getIn(['user_lists', 'groups_removed_accounts', id, 'items']), - hasMore: !!state.getIn(['user_lists', 'groups_removed_accounts', id, 'next']), + group: state.getIn(['groups', id]), + accountIds: state.getIn(['user_lists', 'groups_removed_accounts', id, 'items']), + hasMore: !!state.getIn(['user_lists', 'groups_removed_accounts', id, 'next']), }); export default @connect(mapStateToProps) @@ -28,53 +27,51 @@ export default @connect(mapStateToProps) class GroupRemovedAccounts extends ImmutablePureComponent { static propTypes = { - params: PropTypes.object.isRequired, - dispatch: PropTypes.func.isRequired, - accountIds: ImmutablePropTypes.list, - hasMore: PropTypes.bool, + params: PropTypes.object.isRequired, + dispatch: PropTypes.func.isRequired, + accountIds: ImmutablePropTypes.list, + hasMore: PropTypes.bool, }; - componentWillMount () { - const { params: { id } } = this.props; + componentWillMount() { + const { params: { id } } = this.props; - this.props.dispatch(fetchRemovedAccounts(id)); + this.props.dispatch(fetchRemovedAccounts(id)); } - componentWillReceiveProps (nextProps) { - if (nextProps.params.id !== this.props.params.id) { - this.props.dispatch(fetchRemovedAccounts(nextProps.params.id)); - } + componentWillReceiveProps(nextProps) { + if (nextProps.params.id !== this.props.params.id) { + this.props.dispatch(fetchRemovedAccounts(nextProps.params.id)); + } } handleLoadMore = debounce(() => { - this.props.dispatch(expandRemovedAccounts(this.props.params.id)); + this.props.dispatch(expandRemovedAccounts(this.props.params.id)); }, 300, { leading: true }); - render () { - const { accountIds, hasMore, group, intl } = this.props; + render() { + const { accountIds, hasMore, group, intl } = this.props; - if (!group || !accountIds) { - return (); - } + if (!group || !accountIds) { + return + } - return ( - - } - > - {accountIds.map(id => ( this.props.dispatch(removeRemovedAccount(group.get('id'), id))} - actionTitle={intl.formatMessage(messages.remove)} - />))} - - - ); + return ( + } + > + {accountIds.map(id => ( this.props.dispatch(removeRemovedAccount(group.get('id'), id))} + actionTitle={intl.formatMessage(messages.remove)} + />))} + + ) } } diff --git a/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js b/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js index 109e718b..677e20a3 100644 --- a/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js +++ b/app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js @@ -3,7 +3,6 @@ import { isEqual } from 'lodash'; import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines'; import { connectHashtagStream } from '../../actions/streaming'; import StatusListContainer from '../../containers/status_list_container'; -import Column from '../../components/column'; const mapStateToProps = (state, props) => ({ hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0, @@ -102,14 +101,12 @@ class HashtagTimeline extends PureComponent { const { id } = this.props.params; return ( - - } - /> - + } + /> ); } diff --git a/app/javascript/gabsocial/features/home_timeline/components/column_settings/column_settings.js b/app/javascript/gabsocial/features/home_timeline/components/column_settings/column_settings.js index 73e04a34..7fc23f82 100644 --- a/app/javascript/gabsocial/features/home_timeline/components/column_settings/column_settings.js +++ b/app/javascript/gabsocial/features/home_timeline/components/column_settings/column_settings.js @@ -3,7 +3,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import { changeSetting, saveSettings } from '../../../../actions/settings'; import SettingToggle from '../../../../components/setting_toggle'; -import ColumnSettingsHeading from '../../../../components/column_settings_heading'; const mapStateToProps = state => ({ settings: state.getIn(['settings', 'home']), @@ -31,9 +30,7 @@ class ColumnSettings extends ImmutablePureComponent { return (
- } - /> + ); + return } return ( - - } - > - {accountIds.map(id => - - )} - - - ); + } + > + {accountIds.map(id => + + )} + + ) } } diff --git a/app/javascript/gabsocial/features/notifications/components/column_settings/column_settings.js b/app/javascript/gabsocial/features/notifications/components/column_settings/column_settings.js index 035384eb..5b4873c5 100644 --- a/app/javascript/gabsocial/features/notifications/components/column_settings/column_settings.js +++ b/app/javascript/gabsocial/features/notifications/components/column_settings/column_settings.js @@ -3,7 +3,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import ColumnHeaderSettingButton from '../../../../components/column_header_setting_button'; import SettingToggle from '../../../../components/setting_toggle'; -import ColumnSettingsHeading from '../../../../components/column_settings_heading'; export default class ColumnSettings extends ImmutablePureComponent { @@ -18,14 +17,14 @@ export default class ColumnSettings extends ImmutablePureComponent { this.props.onChange(['push', ...path], checked); } - render () { + render() { const { settings, pushSettings, onChange, onClear } = this.props; const filterShowStr = ; const filterAdvancedStr = ; - const alertStr = ; - const showStr = ; - const soundStr = ; + const alertStr = ; + const showStr = ; + const soundStr = ; const showPushSettings = pushSettings.get('browserSupport') && pushSettings.get('isSubscribed'); const pushStr = showPushSettings && ; @@ -39,20 +38,13 @@ export default class ColumnSettings extends ImmutablePureComponent { />
- } - /> +
- } - /> - + {showPushSettings && } @@ -60,11 +52,7 @@ export default class ColumnSettings extends ImmutablePureComponent {
- } - /> - + {showPushSettings && } @@ -72,11 +60,7 @@ export default class ColumnSettings extends ImmutablePureComponent {
- } - /> - + {showPushSettings && } @@ -84,11 +68,7 @@ export default class ColumnSettings extends ImmutablePureComponent {
- } - /> - + {showPushSettings && } @@ -96,11 +76,7 @@ export default class ColumnSettings extends ImmutablePureComponent {
- } - /> - + {showPushSettings && } diff --git a/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js b/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js index b02276f2..7745a1f2 100644 --- a/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js +++ b/app/javascript/gabsocial/features/notifications/components/notification_filter_bar/notification_filter_bar.js @@ -1,5 +1,4 @@ import { defineMessages, injectIntl } from 'react-intl'; -import SectionHeadlineBar from '../../../../components/section_headline_bar'; const messages = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, @@ -30,7 +29,7 @@ class NotificationFilterBar extends PureComponent { if (!advancedMode) { return ( - + /> */ } ) } return ( - + ) + + /* - ) + /> */ } } diff --git a/app/javascript/gabsocial/features/notifications/notifications.js b/app/javascript/gabsocial/features/notifications/notifications.js index 54e1291d..769e2512 100644 --- a/app/javascript/gabsocial/features/notifications/notifications.js +++ b/app/javascript/gabsocial/features/notifications/notifications.js @@ -15,7 +15,6 @@ import NotificationContainer from './containers/notification_container'; import ScrollableList from '../../components/scrollable_list'; import LoadMore from '../../components/load_more'; // import TimelineQueueButtonHeader from '../../components/timeline_queue_button_header'; -import Column from '../../components/column'; const messages = defineMessages({ title: { id: 'column.notifications', defaultMessage: 'Notifications' }, @@ -177,11 +176,11 @@ class Notifications extends ImmutablePureComponent { ); return ( - +
{ /* filterBarContainer */ } { /* */ } { scrollContainer } - +
); } diff --git a/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js b/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js index 09e1ec86..83ab6c51 100644 --- a/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js +++ b/app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js @@ -3,7 +3,6 @@ import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import { fetchPinnedStatuses } from '../../actions/pin_statuses'; import { meUsername } from '../../initial_state'; -import Column from '../../components/column'; import StatusList from '../../components/status_list/status_list'; import ColumnIndicator from '../../components/column_indicator'; @@ -33,18 +32,16 @@ class PinnedStatuses extends ImmutablePureComponent { const { statusIds, hasMore, isMyAccount } = this.props; if (!isMyAccount) { - return (); + return } return ( - - } - /> - + } + /> ); } diff --git a/app/javascript/gabsocial/features/reblogs/reblogs.js b/app/javascript/gabsocial/features/reblogs/reblogs.js index 959a4cff..76488794 100644 --- a/app/javascript/gabsocial/features/reblogs/reblogs.js +++ b/app/javascript/gabsocial/features/reblogs/reblogs.js @@ -6,7 +6,6 @@ import { fetchStatus } from '../../actions/statuses'; import { makeGetStatus } from '../../selectors'; import AccountContainer from '../../containers/account_container'; import ColumnIndicator from '../../components/column_indicator'; -import Column from '../../components/column'; import ScrollableList from '../../components/scrollable_list'; const mapStateToProps = (state, props) => { @@ -54,16 +53,14 @@ class Reblogs extends ImmutablePureComponent { } return ( - - } - > - {accountIds.map(id => - - )} - - + } + > + {accountIds.map(id => + + )} + ); } diff --git a/app/javascript/gabsocial/features/search/components/header/header.js b/app/javascript/gabsocial/features/search/components/header/header.js index 0d98442a..3dcb8485 100644 --- a/app/javascript/gabsocial/features/search/components/header/header.js +++ b/app/javascript/gabsocial/features/search/components/header/header.js @@ -1,5 +1,4 @@ import { FormattedMessage } from 'react-intl'; -import SectionHeadlineBar from '../../../../components/section_headline_bar'; const mapStateToProps = state => ({ value: state.getIn(['search', 'value']), @@ -41,14 +40,14 @@ class Header extends PureComponent {
- } ]} - /> + /> */ }
diff --git a/app/javascript/gabsocial/features/status/status.js b/app/javascript/gabsocial/features/status/status.js index bf47d3e3..b1673908 100644 --- a/app/javascript/gabsocial/features/status/status.js +++ b/app/javascript/gabsocial/features/status/status.js @@ -39,7 +39,6 @@ import Icon from '../../components/icon'; import ColumnIndicator from '../../components/column_indicator'; import DetailedStatus from './components/detailed_status'; import ActionBar from './components/detailed_status_action_bar'; -import Column from '../../components/column'; const messages = defineMessages({ deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, @@ -81,7 +80,7 @@ const makeMapStateToProps = () => { const ids = [status.get('id')]; while (ids.length > 0) { - let id = ids.shift(); + let id = ids.shift(); const replies = state.getIn(['contexts', 'replies', id]); if (status.get('id') !== id) { @@ -134,15 +133,15 @@ class Status extends ImmutablePureComponent { loadedStatusId: undefined, }; - componentWillMount () { + componentWillMount() { this.props.dispatch(fetchStatus(this.props.params.statusId)); } - componentDidMount () { + componentDidMount() { attachFullscreenListener(this.onFullScreenChange); } - componentWillReceiveProps (nextProps) { + componentWillReceiveProps(nextProps) { if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) { this._scrolledIntoView = false; this.props.dispatch(fetchStatus(nextProps.params.statusId)); @@ -359,7 +358,7 @@ class Status extends ImmutablePureComponent { } } - _selectChild (index, align_top) { + _selectChild(index, align_top) { const container = this.node; const element = container.querySelectorAll('.focusable')[index]; @@ -373,7 +372,7 @@ class Status extends ImmutablePureComponent { } } - renderChildren (list) { + renderChildren(list) { return list.map(id => ( + + + )} + /> + */ + return ( - - { /* me && - - - - )} - /> - */ } +
+ {ancestors} -
- {ancestors} + +
+ - -
- + +
+
- -
-
- - {descendants} -
- + {descendants} +
); } diff --git a/app/javascript/gabsocial/features/ui/util/async-components.js b/app/javascript/gabsocial/features/ui/util/async-components.js index 57c4c7a4..44947792 100644 --- a/app/javascript/gabsocial/features/ui/util/async-components.js +++ b/app/javascript/gabsocial/features/ui/util/async-components.js @@ -107,15 +107,15 @@ export function Mutes() { } export function MuteModal() { - return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal') + return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal/mute_modal') } export function StatusRevisionModal() { - return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal') + return import(/* webpackChunkName: "modals/mute_modal" */'../../../components/modal/status_revision_modal') } export function ReportModal() { - return import(/* webpackChunkName: "modals/report_modal" */'../../../components/modal') + return import(/* webpackChunkName: "modals/report_modal" */'../../../components/modal/report_modal') } export function MediaGallery() { @@ -127,7 +127,7 @@ export function Video() { } export function EmbedModal() { - return import(/* webpackChunkName: "modals/embed_modal" */'../../../components/modal') + return import(/* webpackChunkName: "modals/embed_modal" */'../../../components/modal/embed_modal') } export function ListEditor() {