From ad4c6df155d7194e86ac231fa07ebd8ea8ec9b32 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 6 Jul 2020 15:14:50 -0500 Subject: [PATCH] Removed unused modals ActionsModal, LeavingGabModal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Removed: - unused modals ActionsModal, LeavingGabModal --- .../components/modal/actions_modal.js | 79 ------------------- .../components/modal/leaving_gab_modal.js | 27 ------- .../gabsocial/components/modal/modal_root.js | 3 - app/javascript/gabsocial/constants.js | 1 - .../features/ui/util/async_components.js | 1 - 5 files changed, 111 deletions(-) delete mode 100644 app/javascript/gabsocial/components/modal/actions_modal.js delete mode 100644 app/javascript/gabsocial/components/modal/leaving_gab_modal.js diff --git a/app/javascript/gabsocial/components/modal/actions_modal.js b/app/javascript/gabsocial/components/modal/actions_modal.js deleted file mode 100644 index f299492b..00000000 --- a/app/javascript/gabsocial/components/modal/actions_modal.js +++ /dev/null @@ -1,79 +0,0 @@ -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 Button from '../button'; - -export default class ActionsModal extends ImmutablePureComponent { - - static propTypes = { - status: ImmutablePropTypes.map, - actions: PropTypes.array, - onClick: PropTypes.func, - }; - - renderAction = (action, i) => { - if (action === null) { - return
  • ; - } - - const { icon = null, text, meta = null, active = false, href = '#', isLogout } = action; - - return ( -
  • - - {icon &&
  • - ); - } - - render () { - const status = this.props.status && ( -
    -
    -
    - - - -
    - - -
    - -
    - - -
    -
    - - -
    - ); - - return ( -
    - {status} - - -
    - ); - } - -} diff --git a/app/javascript/gabsocial/components/modal/leaving_gab_modal.js b/app/javascript/gabsocial/components/modal/leaving_gab_modal.js deleted file mode 100644 index 4c7416f2..00000000 --- a/app/javascript/gabsocial/components/modal/leaving_gab_modal.js +++ /dev/null @@ -1,27 +0,0 @@ -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({ - -}) - -export default -@injectIntl -class LeavingGabModal extends ImmutablePureComponent { - - static propTypes = { - intl: PropTypes.object.isRequired, - } - - render() { - const { intl } = this.props - - return ( - - - ) - } -} diff --git a/app/javascript/gabsocial/components/modal/modal_root.js b/app/javascript/gabsocial/components/modal/modal_root.js index 0829260d..8137ddc6 100644 --- a/app/javascript/gabsocial/components/modal/modal_root.js +++ b/app/javascript/gabsocial/components/modal/modal_root.js @@ -5,7 +5,6 @@ import Bundle from '../../features/ui/util/bundle' import ModalBase from './modal_base' import BundleModalError from '../bundle_modal_error' import { - MODAL_ACTIONS, MODAL_BLOCK_ACCOUNT, MODAL_BOOST, MODAL_COMMUNITY_TIMELINE_SETTINGS, @@ -39,7 +38,6 @@ import { MODAL_VIDEO, } from '../../constants' import { - ActionsModal, BlockAccountModal, BoostModal, CommunityTimelineSettingsModal, @@ -74,7 +72,6 @@ import { } from '../../features/ui/util/async_components' const MODAL_COMPONENTS = {} -MODAL_COMPONENTS[MODAL_ACTIONS] = ActionsModal MODAL_COMPONENTS[MODAL_BLOCK_ACCOUNT] = BlockAccountModal MODAL_COMPONENTS[MODAL_BOOST] = BoostModal MODAL_COMPONENTS[MODAL_COMMUNITY_TIMELINE_SETTINGS] = CommunityTimelineSettingsModal diff --git a/app/javascript/gabsocial/constants.js b/app/javascript/gabsocial/constants.js index 0e9c2185..f83b6a20 100644 --- a/app/javascript/gabsocial/constants.js +++ b/app/javascript/gabsocial/constants.js @@ -34,7 +34,6 @@ export const POPOVER_STATUS_VISIBILITY = 'STATUS_VISIBILITY' export const POPOVER_USER_INFO = 'USER_INFO' export const POPOVER_VIDEO_STATS = 'VIDEO_STATS' -export const MODAL_ACTIONS = 'ACTIONS' export const MODAL_BLOCK_ACCOUNT = 'BLOCK_ACCOUNT' export const MODAL_BOOST = 'BOOST' export const MODAL_COMMUNITY_TIMELINE_SETTINGS = 'COMMUNITY_TIMELINE_SETTINGS' diff --git a/app/javascript/gabsocial/features/ui/util/async_components.js b/app/javascript/gabsocial/features/ui/util/async_components.js index c62bf7f8..d4fb80a7 100644 --- a/app/javascript/gabsocial/features/ui/util/async_components.js +++ b/app/javascript/gabsocial/features/ui/util/async_components.js @@ -1,6 +1,5 @@ export function AccountTimeline() { return import(/* webpackChunkName: "features/account_timeline" */'../../account_timeline') } export function AccountGallery() { return import(/* webpackChunkName: "features/account_gallery" */'../../account_gallery') } -export function ActionsModal() { return import(/* webpackChunkName: "components/actions_modal" */'../../../components/modal/actions_modal') } export function BlockAccountModal() { return import(/* webpackChunkName: "components/block_account_modal" */'../../../components/modal/block_account_modal') } export function BlockedAccounts() { return import(/* webpackChunkName: "features/blocked_accounts" */'../../blocked_accounts') } export function BoostModal() { return import(/* webpackChunkName: "components/boost_modal" */'../../../components/modal/boost_modal') }