X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fmodals%2Fembed_modal.js.map;h=afc149bf705806dd1199ad1e7f2db9c96731b294;hb=1b4c4d29a3bff0d316162b6a71b1e7ca0ff12647;hp=f231ea441650f1e1e8709bd9a1b798ae8faccbac;hpb=83e3afac2c9002e224718e8270c4e5550316e762;p=akkoma diff --git a/priv/static/packs/modals/embed_modal.js.map b/priv/static/packs/modals/embed_modal.js.map index f231ea441..afc149bf7 100644 --- a/priv/static/packs/modals/embed_modal.js.map +++ b/priv/static/packs/modals/embed_modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/ui/components/embed_modal.js"],"names":["EmbedModal","Object","react_intl__WEBPACK_IMPORTED_MODULE_7__","state","loading","oembed","setIframeRef","c","_this","iframe","handleTextareaClick","e","target","select","componentDidMount","_this2","this","url","props","setState","_api__WEBPACK_IMPORTED_MODULE_8__","post","then","res","data","iframeDocument","contentWindow","document","open","write","html","close","body","style","margin","width","scrollWidth","height","scrollHeight","catch","error","onError","render","babel_runtime_helpers_jsx__WEBPACK_IMPORTED_MODULE_0___default","className","id","defaultMessage","type","readOnly","value","onClick","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","frameBorder","ref","title","react_immutable_pure_component__WEBPACK_IMPORTED_MODULE_6__","propTypes","prop_types__WEBPACK_IMPORTED_MODULE_5___default","string","isRequired","onClose","func","intl","object"],"mappings":"uQAOqBA,EADpBC,OAAAC,EAAA,EAAAD,iLAUCE,OACEC,SAAS,EACTC,OAAQ,QAyBVC,aAAe,SAAAC,GACbC,EAAKC,OAASF,KAGhBG,oBAAsB,SAACC,GACrBA,EAAEC,OAAOC,mDA3BXC,6BAAqB,IAAAC,EAAAC,KACXC,EAAQD,KAAKE,MAAbD,IAERD,KAAKG,UAAWf,SAAS,IAEzBH,OAAAmB,EAAA,EAAAnB,GAAMoB,KAAK,kBAAoBJ,QAAOK,KAAK,SAAAC,GACzCR,EAAKI,UAAWf,SAAS,EAAOC,OAAQkB,EAAIC,OAE5C,IAAMC,EAAiBV,EAAKN,OAAOiB,cAAcC,SAEjDF,EAAeG,OACfH,EAAeI,MAAMN,EAAIC,KAAKM,MAC9BL,EAAeM,QAEfN,EAAeO,KAAKC,MAAMC,OAAS,EACnCnB,EAAKN,OAAO0B,MAASV,EAAeO,KAAKI,YACzCrB,EAAKN,OAAO4B,OAASZ,EAAeO,KAAKM,eACxCC,MAAM,SAAAC,GACPzB,EAAKG,MAAMuB,QAAQD,kBAYvBE,kBAAU,IACArC,EAAWW,KAAKb,MAAhBE,OAER,OAAAsC,IAAA,OAAAC,UACiB,sCADjB,EAAAD,IAAA,eAAAA,IAESzC,EAAA,GAFT2C,GAE6B,eAF7BC,eAE2D,WAF3DH,IAAA,OAAAC,UAImB,+BAJnB,EAAAD,IAAA,KAAAC,UAKmB,aALnB,EAAAD,IAMSzC,EAAA,GANT2C,GAM6B,qBAN7BC,eAMiE,kEANjEH,IAAA,SAAAI,KAUa,OAVbH,UAWkB,oBAXlBI,UAAA,EAAAC,MAae5C,GAAUA,EAAOyB,MAAQ,GAbxCoB,QAciBlC,KAAKN,sBAdtBiC,IAAA,KAAAC,UAiBmB,aAjBnB,EAAAD,IAkBSzC,EAAA,GAlBT2C,GAkB6B,gBAlB7BC,eAkB4D,qCAGtDK,EAAAC,EAAAC,cAAA,UACET,UAAU,sBACVU,YAAY,IACZC,IAAKvC,KAAKV,aACVkD,MAAM,kBAxEsBC,EAAA,KAE/BC,WACLzC,IAAK0C,EAAAP,EAAUQ,OAAOC,WACtBC,QAASH,EAAAP,EAAUW,KAAKF,WACxBpB,QAASkB,EAAAP,EAAUW,KAAKF,WACxBG,KAAML,EAAAP,EAAUa,OAAOJ","file":"modals/embed_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport api from '../../../api';\n\n@injectIntl\nexport default class EmbedModal extends ImmutablePureComponent {\n\n static propTypes = {\n url: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n }\n\n state = {\n loading: false,\n oembed: null,\n };\n\n componentDidMount () {\n const { url } = this.props;\n\n this.setState({ loading: true });\n\n api().post('/api/web/embed', { url }).then(res => {\n this.setState({ loading: false, oembed: res.data });\n\n const iframeDocument = this.iframe.contentWindow.document;\n\n iframeDocument.open();\n iframeDocument.write(res.data.html);\n iframeDocument.close();\n\n iframeDocument.body.style.margin = 0;\n this.iframe.width = iframeDocument.body.scrollWidth;\n this.iframe.height = iframeDocument.body.scrollHeight;\n }).catch(error => {\n this.props.onError(error);\n });\n }\n\n setIframeRef = c => {\n this.iframe = c;\n }\n\n handleTextareaClick = (e) => {\n e.target.select();\n }\n\n render () {\n const { oembed } = this.state;\n\n return (\n
\n
\n
\n
\n