logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 1f4bc613a4ec26fa0f89e3fbdf826a9f2e8c11a2
parent: 951413c61063107a5409137823c4d19f63551f1b
Author: Morgan Bazalgette <the@howl.moe>
Date:   Sat, 31 Mar 2018 12:05:36 +0200

Remove embed

Diffstat:

Mapp/javascript/mastodon/components/status.js1-
Mapp/javascript/mastodon/components/status_action_bar.js10----------
Mapp/javascript/mastodon/containers/status_container.js4----
Mapp/javascript/mastodon/features/status/components/action_bar.js10----------
Mapp/javascript/mastodon/features/status/index.js5-----
Mapp/javascript/mastodon/features/ui/components/modal_root.js2--
Mapp/javascript/mastodon/features/ui/util/async-components.js4----
7 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js @@ -35,7 +35,6 @@ export default class Status extends ImmutablePureComponent { onOpenMedia: PropTypes.func, onOpenVideo: PropTypes.func, onBlock: PropTypes.func, - onEmbed: PropTypes.func, onHeightChange: PropTypes.func, onToggleHidden: PropTypes.func, muted: PropTypes.bool, diff --git a/app/javascript/mastodon/components/status_action_bar.js b/app/javascript/mastodon/components/status_action_bar.js @@ -23,7 +23,6 @@ const messages = defineMessages({ report: { id: 'status.report', defaultMessage: 'Report @{name}' }, muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' }, unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' }, - embed: { id: 'status.embed', defaultMessage: 'Embed' }, }); @injectIntl @@ -43,7 +42,6 @@ export default class StatusActionBar extends ImmutablePureComponent { onMute: PropTypes.func, onBlock: PropTypes.func, onReport: PropTypes.func, - onEmbed: PropTypes.func, onMuteConversation: PropTypes.func, onPin: PropTypes.func, withDismiss: PropTypes.bool, @@ -100,10 +98,6 @@ export default class StatusActionBar extends ImmutablePureComponent { this.context.router.history.push(`/statuses/${this.props.status.get('id')}`); } - handleEmbed = () => { - this.props.onEmbed(this.props.status); - } - handleReport = () => { this.props.onReport(this.props.status); } @@ -126,10 +120,6 @@ export default class StatusActionBar extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen }); - if (publicStatus) { - menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); - } - menu.push(null); if (status.getIn(['account', 'id']) === me || withDismiss) { diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js @@ -72,10 +72,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({ } }, - onEmbed (status) { - dispatch(openModal('EMBED', { url: status.get('url') })); - }, - onDelete (status) { if (!deleteModal) { dispatch(deleteStatus(status.get('id'))); diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js @@ -19,7 +19,6 @@ const messages = defineMessages({ block: { id: 'status.block', defaultMessage: 'Block @{name}' }, report: { id: 'status.report', defaultMessage: 'Report @{name}' }, share: { id: 'status.share', defaultMessage: 'Share' }, - embed: { id: 'status.embed', defaultMessage: 'Embed' }, }); @injectIntl @@ -41,7 +40,6 @@ export default class ActionBar extends React.PureComponent { onBlock: PropTypes.func, onReport: PropTypes.func, onPin: PropTypes.func, - onEmbed: PropTypes.func, intl: PropTypes.object.isRequired, }; @@ -92,10 +90,6 @@ export default class ActionBar extends React.PureComponent { }); } - handleEmbed = () => { - this.props.onEmbed(this.props.status); - } - render () { const { status, intl } = this.props; @@ -104,10 +98,6 @@ export default class ActionBar extends React.PureComponent { let menu = []; - if (publicStatus) { - menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); - } - if (me === status.getIn(['account', 'id'])) { menu.push(null); menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick }); diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js @@ -195,10 +195,6 @@ export default class Status extends ImmutablePureComponent { this.props.dispatch(initReport(status.get('account'), status)); } - handleEmbed = (status) => { - this.props.dispatch(openModal('EMBED', { url: status.get('url') })); - } - handleHotkeyMoveUp = () => { this.handleMoveUp(this.props.status.get('id')); } @@ -374,7 +370,6 @@ export default class Status extends ImmutablePureComponent { onMuteConversation={this.handleConversationMuteClick} onBlock={this.handleBlockClick} onReport={this.handleReport} - onEmbed={this.handleEmbed} /> </div> </HotKeys> diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js @@ -14,7 +14,6 @@ import { OnboardingModal, MuteModal, ReportModal, - EmbedModal, ListEditor, } from '../../../features/ui/util/async-components'; @@ -27,7 +26,6 @@ const MODAL_COMPONENTS = { 'MUTE': MuteModal, 'REPORT': ReportModal, 'ACTIONS': () => Promise.resolve({ default: ActionsModal }), - 'EMBED': EmbedModal, 'LIST_EDITOR': ListEditor, 'FOCAL_POINT': () => Promise.resolve({ default: FocalPointModal }), }; diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js @@ -110,10 +110,6 @@ export function Video () { return import(/* webpackChunkName: "features/video" */'../../video'); } -export function EmbedModal () { - return import(/* webpackChunkName: "modals/embed_modal" */'../components/embed_modal'); -} - export function ListEditor () { return import(/* webpackChunkName: "features/list_editor" */'../../list_editor'); }