Removed unused modals ActionsModal, LeavingGabModal
• Removed: - unused modals ActionsModal, LeavingGabModal
This commit is contained in:
parent
adea0aae30
commit
ad4c6df155
@ -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 <li key={`sep-${i}`} className='dropdown-menu__separator' />;
|
||||
}
|
||||
|
||||
const { icon = null, text, meta = null, active = false, href = '#', isLogout } = action;
|
||||
|
||||
return (
|
||||
<li key={`${text}-${i}`}>
|
||||
<a
|
||||
href={href}
|
||||
rel='noopener'
|
||||
onClick={this.props.onClick}
|
||||
data-index={i}
|
||||
className={classNames({ active })}
|
||||
data-method={isLogout ? 'delete' : null}
|
||||
>
|
||||
{icon && <Button title={text} icon={icon} role='presentation' tabIndex='-1' inverted />}
|
||||
<div>
|
||||
<div className={classNames({ 'actions-modal__item-label': !!meta })}>{text}</div>
|
||||
<div>{meta}</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
render () {
|
||||
const status = this.props.status && (
|
||||
<div className='status light'>
|
||||
<div className='boost-modal__status-header'>
|
||||
<div className='boost-modal__status-time'>
|
||||
<a href={this.props.status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
|
||||
<RelativeTimestamp timestamp={this.props.status.get('created_at')} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a href={`/${this.props.status.getIn(['account', 'acct'])}`} className='status__display-name'>
|
||||
<div className='status__avatar'>
|
||||
<Avatar account={this.props.status.get('account')} size={48} />
|
||||
</div>
|
||||
|
||||
<DisplayName account={this.props.status.get('account')} />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<StatusContent status={this.props.status} />
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='modal-root__modal actions-modal'>
|
||||
{status}
|
||||
|
||||
<ul className={classNames({ 'with-status': !!status })}>
|
||||
{this.props.actions.map(this.renderAction)}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@ -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 (
|
||||
<ModalLayout>
|
||||
</ModalLayout>
|
||||
)
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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') }
|
||||
|
Loading…
Reference in New Issue
Block a user