import React from 'react'; import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import Column from 'mastodon/components/column'; import ColumnHeader from 'mastodon/components/column_header'; import { HotKeys } from 'react-hotkeys'; import DismissableBanner from 'mastodon/components/dismissable_banner'; import { ActivityPubVisualization } from 'activitypub-visualization'; const mapStateToProps = (state) => { return { logs: state.getIn(['activity_log', 'logs']), }; }; export default @connect(mapStateToProps) class ActivityLog extends ImmutablePureComponent { static propTypes = { multiColumn: PropTypes.bool, }; handleHeaderClick = () => { this.column.scrollTop(); } setRef = c => { this.column = c; } render() { const { logs, multiColumn } = this.props; const darkMode = !(document.body && document.body.classList.contains('theme-mastodon-light')); // hijack the toggleHidden shortcut to copy the logs to clipbaord const handlers = { toggleHidden: () => navigator.clipboard.writeText(JSON.stringify(logs, null, 2)), }; return (

blog, }} />

); } }