akkoma/priv/static/packs/features/direct_timeline.js.map
Haelwenn (lanodan) Monnier 83e3afac2c Update mastodon frontend
2018-09-20 16:13:13 +00:00

1 line
No EOL
5.5 KiB
Text

{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/direct_timeline/index.js"],"names":["messages","Object","react_intl__WEBPACK_IMPORTED_MODULE_11__","title","id","defaultMessage","DirectTimeline","react_redux__WEBPACK_IMPORTED_MODULE_5__","state","hasUnread","getIn","handlePin","_this$props","_this","props","columnId","dispatch","_actions_columns__WEBPACK_IMPORTED_MODULE_10__","handleMove","dir","_this$props2","handleHeaderClick","column","scrollTop","setRef","c","handleLoadMore","maxId","_actions_timelines__WEBPACK_IMPORTED_MODULE_9__","componentDidMount","this","disconnect","_actions_streaming__WEBPACK_IMPORTED_MODULE_12__","componentWillUnmount","render","_props","intl","shouldUpdateScroll","multiColumn","pinned","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","_components_column__WEBPACK_IMPORTED_MODULE_7__","ref","label","formatMessage","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","_components_column_header__WEBPACK_IMPORTED_MODULE_8__","icon","active","onPin","onMove","onClick","_ui_containers_status_list_container__WEBPACK_IMPORTED_MODULE_6__","trackScroll","scrollKey","timelineId","onLoadMore","emptyMessage","PureComponent"],"mappings":"8RAWMA,EAAWC,OAAAC,EAAA,EAAAD,EACfE,OAAAC,GAAA,gBAAAC,eAAA,qBASmBC,EAFpBL,OAAAM,EAAA,QAAAN,CAJuB,SAAAO,GAAA,OACtBC,UAAWD,EAAME,OAAO,YAAa,SAAU,WAAa,OAI7DT,OAAAC,EAAA,EAAAD,8KAYCU,UAAY,WAAM,IAAAC,EACeC,EAAKC,MAA5BC,EADQH,EACRG,SAAUC,EADFJ,EACEI,SAGhBA,EADED,EACOd,OAAAgB,EAAA,EAAAhB,CAAac,GAEbd,OAAAgB,EAAA,EAAAhB,CAAU,iBAIvBiB,WAAa,SAACC,GAAQ,IAAAC,EACWP,EAAKC,MAA5BC,EADYK,EACZL,UACRC,EAFoBI,EACFJ,UACTf,OAAAgB,EAAA,EAAAhB,CAAWc,EAAUI,OAGhCE,kBAAoB,WAClBR,EAAKS,OAAOC,eAiBdC,OAAS,SAAAC,GACPZ,EAAKS,OAASG,KAGhBC,eAAiB,SAAAC,GACfd,EAAKC,MAAME,SAASf,OAAA2B,EAAA,EAAA3B,EAAuB0B,qDAnB7CE,6BAAqB,IACXb,EAAac,KAAKhB,MAAlBE,SAERA,EAASf,OAAA2B,EAAA,EAAA3B,IACT6B,KAAKC,WAAaf,EAASf,OAAA+B,EAAA,EAAA/B,iBAG7BgC,gCACMH,KAAKC,aACPD,KAAKC,aACLD,KAAKC,WAAa,mBAYtBG,kBAAU,IAAAC,EAC+DL,KAAKhB,MAApEsB,EADAD,EACAC,KAAMC,EADNF,EACME,mBAAoB5B,EAD1B0B,EAC0B1B,UAAWM,EADrCoB,EACqCpB,SAAUuB,EAD/CH,EAC+CG,YACjDC,IAAWxB,EAEjB,OACEyB,EAAAC,EAAAC,cAACC,EAAA,GAAOC,IAAKd,KAAKN,OAAQqB,MAAOT,EAAKU,cAAc9C,EAASG,QAA7D4C,IACGC,EAAA,GADHC,KAES,WAFTC,OAGYzC,EAHZN,MAIWiC,EAAKU,cAAc9C,EAASG,OAJvCgD,MAKWrB,KAAKnB,UALhByC,OAMYtB,KAAKZ,WANjBmC,QAOavB,KAAKT,kBAPlBkB,OAQYA,EARZD,YASiBA,IATjBS,IAYGO,EAAA,GAZHC,aAakBhB,EAblBiB,UAAA,mBAckCzC,EAdlC0C,WAee,SAffC,WAgBgB5B,KAAKJ,eAhBrBiC,aAAAZ,IAiBmB7C,EAAA,GAjBnBE,GAiBuC,sBAjBvCC,eAiB4E,gGAjB5EgC,mBAkBwBA,SA3EcG,EAAAC,EAAMmB","file":"features/direct_timeline.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport StatusListContainer from '../ui/containers/status_list_container';\nimport Column from '../../components/column';\nimport ColumnHeader from '../../components/column_header';\nimport { expandDirectTimeline } from '../../actions/timelines';\nimport { addColumn, removeColumn, moveColumn } from '../../actions/columns';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport { connectDirectStream } from '../../actions/streaming';\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});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class 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(expandDirectTimeline());\n this.disconnect = dispatch(connectDirectStream());\n }\n\n componentWillUnmount () {\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(expandDirectTimeline({ maxId }));\n }\n\n render () {\n const { intl, shouldUpdateScroll, hasUnread, columnId, multiColumn } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column 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\n <StatusListContainer\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 shouldUpdateScroll={shouldUpdateScroll}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}