X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Fdirect_timeline.js.map;h=fd6845a06d0f61ebb990b216cb443d215dffcb2c;hb=59680f27ff0e1da2eb3c0506e3655f5c7b86a7ec;hp=d0ef3c943e867f3f91de8f427bf6f22df1bb8d45;hpb=19e559fe5130f66a967732a40ccea1ac39e85eb8;p=akkoma diff --git a/priv/static/packs/features/direct_timeline.js.map b/priv/static/packs/features/direct_timeline.js.map index d0ef3c943..fd6845a06 100644 --- a/priv/static/packs/features/direct_timeline.js.map +++ b/priv/static/packs/features/direct_timeline.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/components/conversation.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/components/conversations_list.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/index.js"],"names":["messages","defineMessages","more","open","reply","markAsRead","delete","muteConversation","unmuteConversation","Conversation","injectIntl","target","src","getAttribute","context","router","props","lastStatus","unread","markRead","history","push","get","onMoveUp","conversationId","onMoveDown","onMute","onToggleHidden","c","namesNode","_updateEmojis","node","this","autoPlayGif","emojis","querySelectorAll","i","length","emoji","classList","contains","add","addEventListener","handleEmojiMouseEnter","handleEmojiMouseLeave","componentDidMount","componentDidUpdate","render","accounts","intl","menu","text","formatMessage","action","handleClick","handleConversationMute","handleMarkAsRead","handleDelete","names","map","a","to","href","title","className","dangerouslySetInnerHTML","__html","reduce","prev","cur","handlers","handleReply","moveUp","handleHotkeyMoveUp","moveDown","handleHotkeyMoveDown","toggleHidden","handleShowMore","classNames","tabIndex","size","timestamp","ref","setNamesRef","id","defaultMessage","values","status","onClick","expanded","onExpandedToggle","collapsable","compact","media","icon","items","direction","ImmutablePureComponent","PropTypes","object","string","isRequired","ImmutablePropTypes","list","bool","func","replyConfirm","replyMessage","connect","getStatus","makeGetStatus","state","conversation","getIn","find","x","lastStatusId","accountId","dispatch","markConversationRead","_","getState","trim","openModal","message","confirm","onConfirm","replyCompose","deleteConversation","unmuteStatus","muteStatus","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","shouldUpdateScroll","maxId","expandConversations","DirectTimeline","columnId","removeColumn","addColumn","dir","moveColumn","column","mountConversations","disconnect","connectDirectStream","componentWillUnmount","unmountConversations","hasUnread","multiColumn","pinned","bindToDocument","label","active","onPin","handlePin","onMove","handleMove","handleHeaderClick","trackScroll","timelineId","handleLoadMore","emptyMessage","React","PureComponent"],"mappings":"6XAgBMA,EAAWC,YAAe,CAC9BC,KAAK,CAAD,wCACJC,KAAK,CAAD,2DACJC,MAAM,CAAD,0CACLC,WAAW,CAAD,8DACVC,OAAO,CAAD,+DACNC,iBAAiB,CAAD,kEAChBC,mBAAmB,CAAD,wEAIdC,EADUC,a,2MAgDU,YAAiB,IAAdC,EAAa,EAAbA,OACzBA,EAAOC,IAAMD,EAAOE,aAAa,oB,oDAGX,YAAiB,IAAdF,EAAa,EAAbA,OACzBA,EAAOC,IAAMD,EAAOE,aAAa,kB,0CAGrB,WACZ,GAAK,EAAKC,QAAQC,OAAlB,CADkB,MAKuB,EAAKC,MAAtCC,EALU,EAKVA,WAAYC,EALF,EAKEA,OAAQC,EALV,EAKUA,SAExBD,GACFC,IAGF,EAAKL,QAAQC,OAAOK,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_timeline.js","sourcesContent":["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 'mastodon/components/status_content';\nimport AttachmentList from 'mastodon/components/attachment_list';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';\nimport AvatarComposite from 'mastodon/components/avatar_composite';\nimport Permalink from 'mastodon/components/permalink';\nimport IconButton from 'mastodon/components/icon_button';\nimport RelativeTimestamp from 'mastodon/components/relative_timestamp';\nimport { HotKeys } from 'react-hotkeys';\nimport { autoPlayGif } from 'mastodon/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 _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 this.props.onToggleHidden(this.props.lastStatus);\n }\n\n setNamesRef = (c) => {\n this.namesNode = c;\n }\n\n render () {\n const { accounts, lastStatus, unread, intl } = this.props;\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 => ).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 return (\n \n \n \n \n \n\n \n \n \n {unread && } \n \n\n \n {names} }} />\n \n \n\n \n\n {lastStatus.get('media_attachments').size > 0 && (\n \n )}\n\n \n \n\n \n \n \n \n \n \n \n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport Conversation from '../components/conversation';\nimport { markConversationRead, deleteConversation } from 'mastodon/actions/conversations';\nimport { makeGetStatus } from 'mastodon/selectors';\nimport { replyCompose } from 'mastodon/actions/compose';\nimport { openModal } from 'mastodon/actions/modal';\nimport { muteStatus, unmuteStatus, hideStatus, revealStatus } from 'mastodon/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 '../../../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 shouldUpdateScroll: 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 \n {conversations.map(item => (\n \n ))}\n \n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ConversationsList from '../components/conversations_list';\nimport { expandConversations } from '../../../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 Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { mountConversations, unmountConversations, expandConversations } from '../../actions/conversations';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connectDirectStream } from '../../actions/streaming';\nimport ConversationsListContainer from './containers/conversations_list_container';\n\nconst messages = defineMessages({\n title: { id: 'column.direct', defaultMessage: 'Direct messages' },\n});\n\nexport default @connect()\n@injectIntl\nclass DirectTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n columnId: PropTypes.string,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n multiColumn: 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 } = this.props;\n\n dispatch(mountConversations());\n dispatch(expandConversations());\n this.disconnect = dispatch(connectDirectStream());\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 handleLoadMore = maxId => {\n this.props.dispatch(expandConversations({ maxId }));\n }\n\n render () {\n const { intl, hasUnread, columnId, multiColumn, shouldUpdateScroll } = this.props;\n const pinned = !!columnId;\n\n return (\n \n \n\n }\n shouldUpdateScroll={shouldUpdateScroll}\n />\n \n );\n }\n\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/components/conversation.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/containers/conversation_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/components/conversations_list.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/containers/conversations_list_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/direct_timeline/index.js"],"names":["messages","defineMessages","more","open","reply","markAsRead","delete","muteConversation","unmuteConversation","Conversation","injectIntl","target","src","getAttribute","context","router","props","lastStatus","unread","markRead","history","push","get","onMoveUp","conversationId","onMoveDown","onMute","onToggleHidden","c","namesNode","_updateEmojis","node","this","autoPlayGif","emojis","querySelectorAll","i","length","emoji","classList","contains","add","addEventListener","handleEmojiMouseEnter","handleEmojiMouseLeave","componentDidMount","componentDidUpdate","render","accounts","intl","menu","text","formatMessage","action","handleClick","handleConversationMute","handleMarkAsRead","handleDelete","names","map","a","to","href","title","className","dangerouslySetInnerHTML","__html","reduce","prev","cur","handlers","handleReply","moveUp","handleHotkeyMoveUp","moveDown","handleHotkeyMoveDown","toggleHidden","handleShowMore","classNames","tabIndex","onClick","role","size","timestamp","ref","setNamesRef","id","defaultMessage","values","status","expanded","onExpandedToggle","collapsable","compact","media","icon","items","direction","ImmutablePureComponent","PropTypes","object","string","isRequired","ImmutablePropTypes","list","bool","func","replyConfirm","replyMessage","connect","getStatus","makeGetStatus","state","conversation","getIn","find","x","lastStatusId","accountId","dispatch","markConversationRead","_","getState","trim","openModal","message","confirm","onConfirm","replyCompose","deleteConversation","unmuteStatus","muteStatus","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","shouldUpdateScroll","maxId","expandConversations","DirectTimeline","columnId","removeColumn","addColumn","dir","moveColumn","column","mountConversations","disconnect","connectDirectStream","componentWillUnmount","unmountConversations","hasUnread","multiColumn","pinned","bindToDocument","label","active","onPin","handlePin","onMove","handleMove","handleHeaderClick","trackScroll","timelineId","handleLoadMore","emptyMessage","React","PureComponent"],"mappings":"kbAgBA,IAAMA,EAAWC,YAAe,CAC9BC,KAAK,CAAD,wCACJC,KAAK,CAAD,2DACJC,MAAM,CAAD,0CACLC,WAAW,CAAD,8DACVC,OAAO,CAAD,+DACNC,iBAAiB,CAAD,kEAChBC,mBAAmB,CAAD,wEAIdC,EADUC,a,sOAgDU,YAAiB,IAAdC,EAAa,EAAbA,OACzBA,EAAOC,IAAMD,EAAOE,aAAa,oB,oDAGX,YAAiB,IAAdF,EAAa,EAAbA,OACzBA,EAAOC,IAAMD,EAAOE,aAAa,kB,0CAGrB,WACZ,GAAK,EAAKC,QAAQC,OAAlB,CADkB,MAKuB,EAAKC,MAAtCC,EALU,EAKVA,WAAYC,EALF,EAKEA,OAAQC,EALV,EAKUA,SAExBD,GACFC,IAGF,EAAKL,QAAQC,OAAOK,QAAQC,KAA5B,aAA8CJ,EAAWK,IAAI,W,+CAG5C,WACjB,EAAKN,MAAMG,c,0CAGC,WACZ,EAAKH,MAAMZ,MAAM,EAAKY,MAAMC,WAAY,EAAKH,QAAQC,OAAOK,Y,2CAG/C,WACb,EAAKJ,MAAMV,Y,iDAGQ,WACnB,EAAKU,MAAMO,SAAS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ACFA,UACToD,YAAWJ,EAAUG,O,gDAGZ,WAClB,EAAKE,OAAOxB,e,qCAoBL,SAAAxH,GACP,EAAKgJ,OAAShJ,K,6CAGC,SAAAwI,GACf,EAAKpJ,MAAMuG,SAAS8C,YAAoB,CAAED,c,6BAtB5CvH,kBAAA,WAAsB,IACZ0E,EAAavF,KAAKhB,MAAlBuG,SAERA,EAASsD,eACTtD,EAAS8C,eACTrI,KAAK8I,WAAavD,EAASwD,gB,EAG7BC,qBAAA,WACEhJ,KAAKhB,MAAMuG,SAAS0D,eAEhBjJ,KAAK8I,aACP9I,KAAK8I,aACL9I,KAAK8I,WAAa,O,EAYtB/H,OAAA,WAAW,IAAD,EAC+Df,KAAKhB,MAApEiC,EADA,EACAA,KAAMiI,EADN,EACMA,UAAWX,EADjB,EACiBA,SAAUY,EAD3B,EAC2BA,YAAahB,EADxC,EACwCA,mBAC1CiB,IAAWb,EAEjB,OACE,kBAAC,IAAD,CAAQc,gBAAiBF,EAAa/F,IAAKpD,KAAK6H,OAAQyB,MAAOrI,EAAKG,cAAcpD,EAAS+D,QACzF,YAAC,IAAD,CACEgC,KAAK,WACLwF,OAAQL,EACRnH,MAAOd,EAAKG,cAAcpD,EAAS+D,OACnCyH,MAAOxJ,KAAKyJ,UACZC,OAAQ1J,KAAK2J,WACb3G,QAAShD,KAAK4J,kBACdR,OAAQA,EACRD,YAAaA,IAGf,YAAC,EAAD,CACEU,aAAcT,EACdxB,UAAS,mBAAqBW,EAC9BuB,WAAW,SACXjD,WAAY7G,KAAK+J,eACjBC,aAAc,YAAC,IAAD,CAAkB1G,GAAG,sBAAsBC,eAAe,gGACxE4E,mBAAoBA,M,GA9ED8B,IAAMC,iB","file":"features/direct_timeline.js","sourcesContent":["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 'mastodon/components/status_content';\nimport AttachmentList from 'mastodon/components/attachment_list';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport DropdownMenuContainer from 'mastodon/containers/dropdown_menu_container';\nimport AvatarComposite from 'mastodon/components/avatar_composite';\nimport Permalink from 'mastodon/components/permalink';\nimport IconButton from 'mastodon/components/icon_button';\nimport RelativeTimestamp from 'mastodon/components/relative_timestamp';\nimport { HotKeys } from 'react-hotkeys';\nimport { autoPlayGif } from 'mastodon/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 _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 this.props.onToggleHidden(this.props.lastStatus);\n }\n\n setNamesRef = (c) => {\n this.namesNode = c;\n }\n\n render () {\n const { accounts, lastStatus, unread, intl } = this.props;\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 => ).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 return (\n \n \n \n \n \n\n \n \n \n {unread && } \n \n\n \n {names} }} />\n \n \n\n \n\n {lastStatus.get('media_attachments').size > 0 && (\n \n )}\n\n \n \n\n \n \n \n \n \n \n \n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport Conversation from '../components/conversation';\nimport { markConversationRead, deleteConversation } from 'mastodon/actions/conversations';\nimport { makeGetStatus } from 'mastodon/selectors';\nimport { replyCompose } from 'mastodon/actions/compose';\nimport { openModal } from 'mastodon/actions/modal';\nimport { muteStatus, unmuteStatus, hideStatus, revealStatus } from 'mastodon/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 '../../../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 shouldUpdateScroll: 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 \n {conversations.map(item => (\n \n ))}\n \n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport ConversationsList from '../components/conversations_list';\nimport { expandConversations } from '../../../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 Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { mountConversations, unmountConversations, expandConversations } from '../../actions/conversations';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connectDirectStream } from '../../actions/streaming';\nimport ConversationsListContainer from './containers/conversations_list_container';\n\nconst messages = defineMessages({\n title: { id: 'column.direct', defaultMessage: 'Direct messages' },\n});\n\nexport default @connect()\n@injectIntl\nclass DirectTimeline extends React.PureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n columnId: PropTypes.string,\n intl: PropTypes.object.isRequired,\n hasUnread: PropTypes.bool,\n multiColumn: 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 } = this.props;\n\n dispatch(mountConversations());\n dispatch(expandConversations());\n this.disconnect = dispatch(connectDirectStream());\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 handleLoadMore = maxId => {\n this.props.dispatch(expandConversations({ maxId }));\n }\n\n render () {\n const { intl, hasUnread, columnId, multiColumn, shouldUpdateScroll } = this.props;\n const pinned = !!columnId;\n\n return (\n \n \n\n }\n shouldUpdateScroll={shouldUpdateScroll}\n />\n \n );\n }\n\n}\n"],"sourceRoot":""} \ No newline at end of file