/* jshint ignore:start */ import React from 'react'; import modal from 'misago/services/modal'; import * as moderation from './actions'; import MoveModal from './move'; import SplitModal from './split'; export default function(props) { return ( ); } export class Approve extends React.Component { onClick = () => { moderation.approve(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_approve; }); if (!isVisible) { return null; } return (
  • ); } } export class Merge extends React.Component { onClick = () => { moderation.merge(this.props); }; render() { if (this.props.selection.length < 2 || !this.props.thread.acl.can_merge_posts) { return null; } return (
  • ); } } export class Move extends React.Component { onClick = () => { modal.show( ); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_move; }); if (!isVisible) { return null; } return (
  • ); } } export class Split extends React.Component { onClick = () => { modal.show( ); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_move; }); if (!isVisible) { return null; } return (
  • ); } } export class Protect extends React.Component { onClick = () => { moderation.protect(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_protect; }); if (!isVisible) { return null; } return (
  • ); } } export class Unprotect extends React.Component { onClick = () => { moderation.unprotect(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_protect; }); if (!isVisible) { return null; } return (
  • ); } } export class Hide extends React.Component { onClick = () => { moderation.hide(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_hide; }); if (!isVisible) { return null; } return (
  • ); } } export class Unhide extends React.Component { onClick = () => { moderation.unhide(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_unhide; }); if (!isVisible) { return null; } return (
  • ); } } export class Delete extends React.Component { onClick = () => { moderation.remove(this.props); }; render() { const isVisible = this.props.selection.find((post) => { return post.acl.can_delete; }); if (!isVisible) { return null; } return (
  • ); } }