pleroma/priv/static/packs/flavours/glitch/async/direct_timeline.js.map
2020-05-20 07:55:14 +02:00

1 line
33 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/components/column_settings.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/containers/column_settings_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/containers/conversation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/components/conversations_list.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/containers/conversations_list_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/direct_timeline/index.js"],"names":["messages","defineMessages","filter_regex","settings","ColumnSettings","injectIntl","render","this","props","onChange","intl","className","id","defaultMessage","settingPath","label","formatMessage","React","PureComponent","connect","state","getIn","dispatch","path","checked","changeSetting","more","open","reply","markAsRead","delete","muteConversation","unmuteConversation","Conversation","isExpanded","undefined","e","destination","router","context","lastStatus","unread","markRead","button","ctrlKey","altKey","metaKey","get","history","location","mastodonBackSteps","push","preventDefault","target","src","getAttribute","onMoveUp","conversationId","onMoveDown","onMute","setExpansion","value","setState","c","namesNode","_updateEmojis","node","autoPlayGif","emojis","querySelectorAll","i","length","emoji","classList","contains","add","addEventListener","handleEmojiMouseEnter","handleEmojiMouseLeave","componentDidMount","componentDidUpdate","accounts","menu","text","action","handleClick","handleConversationMute","handleMarkAsRead","handleDelete","names","map","a","to","href","title","dangerouslySetInnerHTML","__html","reduce","prev","cur","handlers","handleReply","moveUp","handleHotkeyMoveUp","moveDown","handleHotkeyMoveDown","toggleHidden","handleShowMore","media","size","compact","classNames","tabIndex","onClick","role","timestamp","ref","setNamesRef","values","status","parseClick","expanded","onExpandedToggle","collapsable","icon","items","direction","ImmutablePureComponent","PropTypes","object","string","isRequired","ImmutablePropTypes","list","bool","func","replyConfirm","replyMessage","getStatus","makeGetStatus","conversation","find","x","lastStatusId","accountId","markConversationRead","_","getState","trim","openModal","message","confirm","onConfirm","replyCompose","deleteConversation","unmuteStatus","muteStatus","onToggleHidden","revealStatus","hideStatus","ConversationsList","conversations","findIndex","elementIndex","getCurrentIndex","_selectChild","last","onLoadMore","leading","index","align_top","container","element","querySelector","scrollTop","offsetTop","scrollIntoView","clientHeight","offsetHeight","focus","other","handleLoadOlder","scrollKey","setRef","item","handleMoveUp","handleMoveDown","hasMore","isLoading","maxId","expandConversations","DirectTimeline","hasUnread","conversationsMode","columnId","removeColumn","addColumn","dir","moveColumn","column","expandDirectTimeline","mountConversations","disconnect","connectDirectStream","prevProps","componentWillUnmount","unmountConversations","contents","multiColumn","pinned","trackScroll","timelineId","handleLoadMore","emptyMessage","handleLoadMoreTimeline","bindToDocument","active","onPin","handlePin","onMove","handleMove","handleHeaderClick","handleConversationsClick","handleTimelineClick"],"mappings":"wRAMA,I,MAAMA,EAAWC,YAAe,CAC9BC,aAAa,CAAD,2FACZC,SAAS,CAAD,uDAIJC,EADUC,Y,8GASdC,OAAA,WAAW,IAAD,EAC6BC,KAAKC,MAAlCL,EADA,EACAA,SAAUM,EADV,EACUA,SAAUC,EADpB,EACoBA,KAE5B,OACE,4BACE,oBAAMC,UAAU,iCAAhB,EAA2C,YAAC,IAAD,CAAkBC,GAAG,gCAAgCC,eAAe,cAE/G,mBAAKF,UAAU,6BAAf,EACE,YAAC,IAAD,CAAaR,SAAUA,EAAUW,YAAa,CAAC,QAAS,QAASL,SAAUA,EAAUM,MAAOL,EAAKM,cAAchB,EAASE,oB,GAhBrGe,IAAMC,iB,UCIpBC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import PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport SettingText from '../../../components/setting_text';\n\nconst messages = defineMessages({\n filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },\n settings: { id: 'home.settings', defaultMessage: 'Column settings' },\n});\n\nexport default @injectIntl\nclass ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n render () {\n const { settings, onChange, intl } = this.props;\n\n return (\n <div>\n <span className='column-settings__section'><FormattedMessage id='home.column_settings.advanced' defaultMessage='Advanced' /></span>\n\n <div className='column-settings__row'>\n <SettingText settings={settings} settingPath={['regex', 'body']} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting } from 'flavours/glitch/actions/settings';\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'direct']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n\n onChange (path, checked) {\n dispatch(changeSetting(['direct', ...path], checked));\n },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport StatusContent from 'flavours/glitch/components/status_content';\nimport AttachmentList from 'flavours/glitch/components/attachment_list';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport DropdownMenuContainer from 'flavours/glitch/containers/dropdown_menu_container';\nimport AvatarComposite from 'flavours/glitch/components/avatar_composite';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport IconButton from 'flavours/glitch/components/icon_button';\nimport RelativeTimestamp from 'flavours/glitch/components/relative_timestamp';\nimport { HotKeys } from 'react-hotkeys';\nimport { autoPlayGif } from 'flavours/glitch/util/initial_state';\nimport classNames from 'classnames';\n\nconst messages = defineMessages({\n more: { id: 'status.more', defaultMessage: 'More' },\n open: { id: 'conversation.open', defaultMessage: 'View conversation' },\n reply: { id: 'status.reply', defaultMessage: 'Reply' },\n markAsRead: { id: 'conversation.mark_as_read', defaultMessage: 'Mark as read' },\n delete: { id: 'conversation.delete', defaultMessage: 'Delete conversation' },\n muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },\n unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },\n});\n\nexport default @injectIntl\nclass Conversation extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n conversationId: PropTypes.string.isRequired,\n accounts: ImmutablePropTypes.list.isRequired,\n lastStatus: ImmutablePropTypes.map,\n unread:PropTypes.bool.isRequired,\n onMoveUp: PropTypes.func,\n onMoveDown: PropTypes.func,\n markRead: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n isExpanded: undefined,\n };\n\n parseClick = (e, destination) => {\n const { router } = this.context;\n const { lastStatus, unread, markRead } = this.props;\n if (!router) return;\n\n if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {\n if (destination === undefined) {\n if (unread) {\n markRead();\n }\n destination = `/statuses/${lastStatus.get('id')}`;\n }\n let state = {...router.history.location.state};\n state.mastodonBackSteps = (state.mastodonBackSteps || 0) + 1;\n router.history.push(destination, state);\n e.preventDefault();\n }\n }\n\n _updateEmojis () {\n const node = this.namesNode;\n\n if (!node || autoPlayGif) {\n return;\n }\n\n const emojis = node.querySelectorAll('.custom-emoji');\n\n for (var i = 0; i < emojis.length; i++) {\n let emoji = emojis[i];\n if (emoji.classList.contains('status-emoji')) {\n continue;\n }\n emoji.classList.add('status-emoji');\n\n emoji.addEventListener('mouseenter', this.handleEmojiMouseEnter, false);\n emoji.addEventListener('mouseleave', this.handleEmojiMouseLeave, false);\n }\n }\n\n componentDidMount () {\n this._updateEmojis();\n }\n\n componentDidUpdate () {\n this._updateEmojis();\n }\n\n handleEmojiMouseEnter = ({ target }) => {\n target.src = target.getAttribute('data-original');\n }\n\n handleEmojiMouseLeave = ({ target }) => {\n target.src = target.getAttribute('data-static');\n }\n\n handleClick = () => {\n if (!this.context.router) {\n return;\n }\n\n const { lastStatus, unread, markRead } = this.props;\n\n if (unread) {\n markRead();\n }\n\n this.context.router.history.push(`/statuses/${lastStatus.get('id')}`);\n }\n\n handleMarkAsRead = () => {\n this.props.markRead();\n }\n\n handleReply = () => {\n this.props.reply(this.props.lastStatus, this.context.router.history);\n }\n\n handleDelete = () => {\n this.props.delete();\n }\n\n handleHotkeyMoveUp = () => {\n this.props.onMoveUp(this.props.conversationId);\n }\n\n handleHotkeyMoveDown = () => {\n this.props.onMoveDown(this.props.conversationId);\n }\n\n handleConversationMute = () => {\n this.props.onMute(this.props.lastStatus);\n }\n\n handleShowMore = () => {\n if (this.props.lastStatus.get('spoiler_text')) {\n this.setExpansion(!this.state.isExpanded);\n }\n };\n\n setExpansion = value => {\n this.setState({ isExpanded: value });\n }\n\n setNamesRef = (c) => {\n this.namesNode = c;\n }\n\n render () {\n const { accounts, lastStatus, unread, intl } = this.props;\n const { isExpanded } = this.state;\n\n if (lastStatus === null) {\n return null;\n }\n\n const menu = [\n { text: intl.formatMessage(messages.open), action: this.handleClick },\n null,\n ];\n\n menu.push({ text: intl.formatMessage(lastStatus.get('muted') ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMute });\n\n if (unread) {\n menu.push({ text: intl.formatMessage(messages.markAsRead), action: this.handleMarkAsRead });\n menu.push(null);\n }\n\n menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDelete });\n\n const names = accounts.map(a => <Permalink to={`/accounts/${a.get('id')}`} href={a.get('url')} key={a.get('id')} title={a.get('acct')}><bdi><strong className='display-name__html' dangerouslySetInnerHTML={{ __html: a.get('display_name_html') }} /></bdi></Permalink>).reduce((prev, cur) => [prev, ', ', cur]);\n\n const handlers = {\n reply: this.handleReply,\n open: this.handleClick,\n moveUp: this.handleHotkeyMoveUp,\n moveDown: this.handleHotkeyMoveDown,\n toggleHidden: this.handleShowMore,\n };\n\n let media = null;\n if (lastStatus.get('media_attachments').size > 0) {\n media = <AttachmentList compact media={lastStatus.get('media_attachments')} />;\n }\n\n return (\n <HotKeys handlers={handlers}>\n <div className={classNames('conversation focusable muted', { 'conversation--unread': unread })} tabIndex='0'>\n <div className='conversation__avatar' onClick={this.handleClick} role='presentation'>\n <AvatarComposite accounts={accounts} size={48} />\n </div>\n\n <div className='conversation__content'>\n <div className='conversation__content__info'>\n <div className='conversation__content__relative-time'>\n {unread && <span className='conversation__unread' />} <RelativeTimestamp timestamp={lastStatus.get('created_at')} />\n </div>\n\n <div className='conversation__content__names' ref={this.setNamesRef}>\n <FormattedMessage id='conversation.with' defaultMessage='With {names}' values={{ names: <span>{names}</span> }} />\n </div>\n </div>\n\n <StatusContent\n status={lastStatus}\n parseClick={this.parseClick}\n expanded={isExpanded}\n onExpandedToggle={this.handleShowMore}\n collapsable\n media={media}\n />\n\n <div className='status__action-bar'>\n <IconButton className='status__action-bar-button' title={intl.formatMessage(messages.reply)} icon='reply' onClick={this.handleReply} />\n\n <div className='status__action-bar-dropdown'>\n <DropdownMenuContainer status={lastStatus} items={menu} icon='ellipsis-h' size={18} direction='right' title={intl.formatMessage(messages.more)} />\n </div>\n </div>\n </div>\n </div>\n </HotKeys>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport Conversation from '../components/conversation';\nimport { markConversationRead, deleteConversation } from 'flavours/glitch/actions/conversations';\nimport { makeGetStatus } from 'flavours/glitch/selectors';\nimport { replyCompose } from 'flavours/glitch/actions/compose';\nimport { openModal } from 'flavours/glitch/actions/modal';\nimport { muteStatus, unmuteStatus, hideStatus, revealStatus } from 'flavours/glitch/actions/statuses';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },\n replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },\n});\n\nconst mapStateToProps = () => {\n const getStatus = makeGetStatus();\n\n return (state, { conversationId }) => {\n const conversation = state.getIn(['conversations', 'items']).find(x => x.get('id') === conversationId);\n const lastStatusId = conversation.get('last_status', null);\n\n return {\n accounts: conversation.get('accounts').map(accountId => state.getIn(['accounts', accountId], null)),\n unread: conversation.get('unread'),\n lastStatus: lastStatusId && getStatus(state, { id: lastStatusId }),\n };\n };\n};\n\nconst mapDispatchToProps = (dispatch, { intl, conversationId }) => ({\n\n markRead () {\n dispatch(markConversationRead(conversationId));\n },\n\n reply (status, router) {\n dispatch((_, getState) => {\n let state = getState();\n\n if (state.getIn(['compose', 'text']).trim().length !== 0) {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.replyMessage),\n confirm: intl.formatMessage(messages.replyConfirm),\n onConfirm: () => dispatch(replyCompose(status, router)),\n }));\n } else {\n dispatch(replyCompose(status, router));\n }\n });\n },\n\n delete () {\n dispatch(deleteConversation(conversationId));\n },\n\n onMute (status) {\n if (status.get('muted')) {\n dispatch(unmuteStatus(status.get('id')));\n } else {\n dispatch(muteStatus(status.get('id')));\n }\n },\n\n onToggleHidden (status) {\n if (status.get('hidden')) {\n dispatch(revealStatus(status.get('id')));\n } else {\n dispatch(hideStatus(status.get('id')));\n }\n },\n\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Conversation));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ConversationContainer from '../containers/conversation_container';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\nimport { debounce } from 'lodash';\n\nexport default class ConversationsList extends ImmutablePureComponent {\n\n static propTypes = {\n conversations: ImmutablePropTypes.list.isRequired,\n hasMore: PropTypes.bool,\n isLoading: PropTypes.bool,\n onLoadMore: PropTypes.func,\n };\n\n getCurrentIndex = id => this.props.conversations.findIndex(x => x.get('id') === id)\n\n handleMoveUp = id => {\n const elementIndex = this.getCurrentIndex(id) - 1;\n this._selectChild(elementIndex, true);\n }\n\n handleMoveDown = id => {\n const elementIndex = this.getCurrentIndex(id) + 1;\n this._selectChild(elementIndex, false);\n }\n\n _selectChild (index, align_top) {\n const container = this.node.node;\n const element = container.querySelector(`article:nth-of-type(${index + 1}) .focusable`);\n\n if (element) {\n if (align_top && container.scrollTop > element.offsetTop) {\n element.scrollIntoView(true);\n } else if (!align_top && container.scrollTop + container.clientHeight < element.offsetTop + element.offsetHeight) {\n element.scrollIntoView(false);\n }\n element.focus();\n }\n }\n\n setRef = c => {\n this.node = c;\n }\n\n handleLoadOlder = debounce(() => {\n const last = this.props.conversations.last();\n\n if (last && last.get('last_status')) {\n this.props.onLoadMore(last.get('last_status'));\n }\n }, 300, { leading: true })\n\n render () {\n const { conversations, onLoadMore, ...other } = this.props;\n\n return (\n <ScrollableList {...other} onLoadMore={onLoadMore && this.handleLoadOlder} scrollKey='direct' ref={this.setRef}>\n {conversations.map(item => (\n <ConversationContainer\n key={item.get('id')}\n conversationId={item.get('id')}\n onMoveUp={this.handleMoveUp}\n onMoveDown={this.handleMoveDown}\n />\n ))}\n </ScrollableList>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ConversationsList from '../components/conversations_list';\nimport { expandConversations } from 'flavours/glitch/actions/conversations';\n\nconst mapStateToProps = state => ({\n conversations: state.getIn(['conversations', 'items']),\n isLoading: state.getIn(['conversations', 'isLoading'], true),\n hasMore: state.getIn(['conversations', 'hasMore'], false),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onLoadMore: maxId => dispatch(expandConversations({ maxId })),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ConversationsList);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';\nimport Column from 'flavours/glitch/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { expandDirectTimeline } from 'flavours/glitch/actions/timelines';\nimport { mountConversations, unmountConversations, expandConversations } from 'flavours/glitch/actions/conversations';\nimport { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport { connectDirectStream } from 'flavours/glitch/actions/streaming';\nimport { changeSetting } from 'flavours/glitch/actions/settings';\nimport ConversationsListContainer from './containers/conversations_list_container';\n\nconst messages = defineMessages({\n title: { id: 'column.direct', defaultMessage: 'Direct messages' },\n});\n\nconst mapStateToProps = state => ({\n hasUnread: state.getIn(['timelines', 'direct', 'unread']) > 0,\n conversationsMode: state.getIn(['settings', 'direct', 'conversations']),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass DirectTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n columnId: PropTypes.string,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n multiColumn: PropTypes.bool,\n conversationsMode: PropTypes.bool,\n };\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('DIRECT', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n componentDidMount () {\n const { dispatch, conversationsMode } = this.props;\n\n dispatch(mountConversations());\n\n if (conversationsMode) {\n dispatch(expandConversations());\n } else {\n dispatch(expandDirectTimeline());\n }\n\n this.disconnect = dispatch(connectDirectStream());\n }\n\n componentDidUpdate(prevProps) {\n const { dispatch, conversationsMode } = this.props;\n\n if (prevProps.conversationsMode && !conversationsMode) {\n dispatch(expandDirectTimeline());\n } else if (!prevProps.conversationsMode && conversationsMode) {\n dispatch(expandConversations());\n }\n }\n\n componentWillUnmount () {\n this.props.dispatch(unmountConversations());\n\n if (this.disconnect) {\n this.disconnect();\n this.disconnect = null;\n }\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMoreTimeline = maxId => {\n this.props.dispatch(expandDirectTimeline({ maxId }));\n }\n\n handleLoadMoreConversations = maxId => {\n this.props.dispatch(expandConversations({ maxId }));\n }\n\n handleTimelineClick = () => {\n this.props.dispatch(changeSetting(['direct', 'conversations'], false));\n }\n\n handleConversationsClick = () => {\n this.props.dispatch(changeSetting(['direct', 'conversations'], true));\n }\n\n render () {\n const { intl, hasUnread, columnId, multiColumn, conversationsMode } = this.props;\n const pinned = !!columnId;\n\n let contents;\n if (conversationsMode) {\n contents = (\n <ConversationsListContainer\n trackScroll={!pinned}\n scrollKey={`direct_timeline-${columnId}`}\n timelineId='direct'\n onLoadMore={this.handleLoadMore}\n emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage=\"You don't have any direct messages yet. When you send or receive one, it will show up here.\" />}\n />\n );\n } else {\n contents = (\n <StatusListContainer\n trackScroll={!pinned}\n scrollKey={`direct_timeline-${columnId}`}\n timelineId='direct'\n onLoadMore={this.handleLoadMoreTimeline}\n emptyMessage={<FormattedMessage id='empty_column.direct' defaultMessage=\"You don't have any direct messages yet. When you send or receive one, it will show up here.\" />}\n />\n );\n }\n\n return (\n <Column bindToDocument={!multiColumn} ref={this.setRef} label={intl.formatMessage(messages.title)}>\n <ColumnHeader\n icon='envelope'\n active={hasUnread}\n title={intl.formatMessage(messages.title)}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n >\n <ColumnSettingsContainer />\n </ColumnHeader>\n\n <div className='notification__filter-bar'>\n <button\n className={conversationsMode ? 'active' : ''}\n onClick={this.handleConversationsClick}\n >\n <FormattedMessage\n id='direct.conversations_mode'\n defaultMessage='Conversations'\n />\n </button>\n <button\n className={conversationsMode ? '' : 'active'}\n onClick={this.handleTimelineClick}\n >\n <FormattedMessage\n id='direct.timeline_mode'\n defaultMessage='Timeline'\n />\n </button>\n </div>\n\n {contents}\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}