[MastodonFE] Update Frontend (glitch)

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-09-16 23:17:34 +02:00
commit de0c1c641a
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
551 changed files with 1072 additions and 512 deletions

View file

@ -1,2 +1,2 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{715:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return _});var i,o,n,r=a(0),s=a.n(r),d=a(6),l=a.n(d),c=a(3),m=a.n(c),u=a(7),f=a.n(u),h=a(1),p=a.n(h),b=a(2),v=a.n(b),w=a(18),g=a(4),y=a(9),_=Object(g.g)((n=o=function(e){function t(){var a,i,o;l()(this,t);for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];return a=i=m()(this,e.call.apply(e,[this].concat(r))),i.state={loading:!1,oembed:null},i.setIframeRef=function(e){i.iframe=e},i.handleTextareaClick=function(e){e.target.select()},o=a,m()(i,o)}return f()(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.url;this.setState({loading:!0}),Object(y.a)().post("/api/web/embed",{url:t}).then(function(t){e.setState({loading:!1,oembed:t.data});var a=e.iframe.contentWindow.document;a.open(),a.write(t.data.html),a.close(),a.body.style.margin=0,e.iframe.width=a.body.scrollWidth,e.iframe.height=a.body.scrollHeight}).catch(function(t){e.props.onError(t)})},t.prototype.render=function(){var e=this.state.oembed;return s()("div",{className:"modal-root__modal embed-modal"},void 0,s()("h4",{},void 0,s()(g.b,{id:"status.embed",defaultMessage:"Embed"})),s()("div",{className:"embed-modal__container"},void 0,s()("p",{className:"hint"},void 0,s()(g.b,{id:"embed.instructions",defaultMessage:"Embed this status on your website by copying the code below."})),s()("input",{type:"text",className:"embed-modal__html",readOnly:!0,value:e&&e.html||"",onClick:this.handleTextareaClick}),s()("p",{className:"hint"},void 0,s()(g.b,{id:"embed.preview",defaultMessage:"Here is what it will look like:"})),p.a.createElement("iframe",{className:"embed-modal__iframe",frameBorder:"0",ref:this.setIframeRef,title:"preview"})))},t}(w.a),o.propTypes={url:v.a.string.isRequired,onClose:v.a.func.isRequired,onError:v.a.func.isRequired,intl:v.a.object.isRequired},i=n))||i}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[173],{697:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return j});var i,o,n,r=a(1),c=a(6),s=a(0),d=a(2),l=a(3),b=a.n(l),m=a(5),u=a.n(m),f=a(24),h=a(7),p=a(9),j=Object(h.g)((n=o=function(o){function e(){for(var t,e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return t=o.call.apply(o,[this].concat(a))||this,Object(d.a)(Object(s.a)(Object(s.a)(t)),"state",{loading:!1,oembed:null}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"setIframeRef",function(e){t.iframe=e}),Object(d.a)(Object(s.a)(Object(s.a)(t)),"handleTextareaClick",function(e){e.target.select()}),t}Object(c.a)(e,o);var t=e.prototype;return t.componentDidMount=function(){var a=this,e=this.props.url;this.setState({loading:!0}),Object(p.a)().post("/api/web/embed",{url:e}).then(function(e){a.setState({loading:!1,oembed:e.data});var t=a.iframe.contentWindow.document;t.open(),t.write(e.data.html),t.close(),t.body.style.margin=0,a.iframe.width=t.body.scrollWidth,a.iframe.height=t.body.scrollHeight}).catch(function(e){a.props.onError(e)})},t.render=function(){var e=this.state.oembed;return Object(r.a)("div",{className:"modal-root__modal embed-modal"},void 0,Object(r.a)("h4",{},void 0,Object(r.a)(h.b,{id:"status.embed",defaultMessage:"Embed"})),Object(r.a)("div",{className:"embed-modal__container"},void 0,Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.instructions",defaultMessage:"Embed this status on your website by copying the code below."})),Object(r.a)("input",{type:"text",className:"embed-modal__html",readOnly:!0,value:e&&e.html||"",onClick:this.handleTextareaClick}),Object(r.a)("p",{className:"hint"},void 0,Object(r.a)(h.b,{id:"embed.preview",defaultMessage:"Here is what it will look like:"})),b.a.createElement("iframe",{className:"embed-modal__iframe",frameBorder:"0",ref:this.setIframeRef,sandbox:"allow-same-origin",title:"preview"})))},e}(f.a),Object(d.a)(o,"propTypes",{url:u.a.string.isRequired,onClose:u.a.func.isRequired,onError:u.a.func.isRequired,intl:u.a.object.isRequired}),i=n))||i}}]);
//# sourceMappingURL=embed_modal.js.map

View file

@ -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 <div className='modal-root__modal embed-modal'>\n <h4><FormattedMessage id='status.embed' defaultMessage='Embed' /></h4>\n\n <div className='embed-modal__container'>\n <p className='hint'>\n <FormattedMessage id='embed.instructions' defaultMessage='Embed this status on your website by copying the code below.' />\n </p>\n\n <input\n type='text'\n className='embed-modal__html'\n readOnly\n value={oembed && oembed.html || ''}\n onClick={this.handleTextareaClick}\n />\n\n <p className='hint'>\n <FormattedMessage id='embed.preview' defaultMessage='Here is what it will look like:' />\n </p>\n\n <iframe\n className='embed-modal__iframe'\n frameBorder='0'\n ref={this.setIframeRef}\n title='preview'\n />\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}
{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/ui/components/embed_modal.js"],"names":["EmbedModal","injectIntl","loading","oembed","c","_this","iframe","e","target","select","componentDidMount","_this2","this","url","props","setState","api","post","then","res","data","iframeDocument","contentWindow","document","open","write","html","close","body","style","margin","width","scrollWidth","height","scrollHeight","catch","error","onError","render","state","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_7__","id","defaultMessage","type","readOnly","value","onClick","handleTextareaClick","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","frameBorder","ref","setIframe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C,EAAA,EAAAD,CAAA,KAAGE,UAAU,aAAb,EACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,CAAkBC,GAAG,gBAAgBC,eAAe,qCAGtDM,EAAAC,EAAAC,cAAA,UACEX,UAAU,sBACVY,YAAY,IACZC,IAAK3C,KAAK4C,aACVC,QAAQ,oBACRC,MAAM,kBAzEOC,+BAEJ,CACjB9C,IAAK+C,IAAUC,OAAOC,WACtBC,QAASH,IAAUI,KAAKF,WACxBzB,QAASuB,IAAUI,KAAKF,WACxBG,KAAML,IAAUM,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\nexport default @injectIntl\nclass 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 <div className='modal-root__modal embed-modal'>\n <h4><FormattedMessage id='status.embed' defaultMessage='Embed' /></h4>\n\n <div className='embed-modal__container'>\n <p className='hint'>\n <FormattedMessage id='embed.instructions' defaultMessage='Embed this status on your website by copying the code below.' />\n </p>\n\n <input\n type='text'\n className='embed-modal__html'\n readOnly\n value={oembed && oembed.html || ''}\n onClick={this.handleTextareaClick}\n />\n\n <p className='hint'>\n <FormattedMessage id='embed.preview' defaultMessage='Here is what it will look like:' />\n </p>\n\n <iframe\n className='embed-modal__iframe'\n frameBorder='0'\n ref={this.setIframeRef}\n sandbox='allow-same-origin'\n title='preview'\n />\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}

View file

@ -1,2 +1,2 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{716:function(n,o,t){"use strict";t.r(o),t.d(o,"default",function(){return k});var i,e=t(0),a=t.n(e),c=t(6),s=t.n(c),u=t(3),r=t.n(u),l=t(7),d=t.n(l),f=t(1),m=t.n(f),p=t(12),h=t(4),g=t(199),b=t.n(g),v=t(79),C=t(21),_=t(13),w=t(45),k=Object(p.connect)(function(n){return{isSubmitting:n.getIn(["reports","new","isSubmitting"]),account:n.getIn(["mutes","new","account"]),notifications:n.getIn(["mutes","new","notifications"])}},function(n){return{onConfirm:function(o,t){n(Object(_.C)(o.get("id"),t))},onClose:function(){n(Object(C.c)())},onToggleNotifications:function(){n(Object(w.h)())}}})(i=Object(h.g)(i=function(n){function o(){var t,i,e;s()(this,o);for(var a=arguments.length,c=Array(a),u=0;u<a;u++)c[u]=arguments[u];return t=i=r()(this,n.call.apply(n,[this].concat(c))),i.handleClick=function(){i.props.onClose(),i.props.onConfirm(i.props.account,i.props.notifications)},i.handleCancel=function(){i.props.onClose()},i.setRef=function(n){i.button=n},i.toggleNotifications=function(){i.props.onToggleNotifications()},e=t,r()(i,e)}return d()(o,n),o.prototype.componentDidMount=function(){this.button.focus()},o.prototype.render=function(){var n=this.props,o=n.account,t=n.notifications;return a()("div",{className:"modal-root__modal mute-modal"},void 0,a()("div",{className:"mute-modal__container"},void 0,a()("p",{},void 0,a()(h.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:a()("strong",{},void 0,"@",o.get("acct"))}})),a()("div",{},void 0,a()("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,a()(h.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",a()(b.a,{id:"mute-modal__hide-notifications-checkbox",checked:t,onChange:this.toggleNotifications})))),a()("div",{className:"mute-modal__action-bar"},void 0,a()(v.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,a()(h.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),m.a.createElement(v.a,{onClick:this.handleClick,ref:this.setRef},a()(h.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},o}(m.a.PureComponent))||i)||i}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[174],{696:function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return g});var o,c=n(1),i=n(6),s=n(0),u=n(2),a=n(3),r=n.n(a),l=n(20),d=n(7),b=n(390),f=n.n(b),m=n(178),j=n(49),O=n(27),p=n(142),g=Object(l.connect)(function(t){return{isSubmitting:t.getIn(["reports","new","isSubmitting"]),account:t.getIn(["mutes","new","account"]),notifications:t.getIn(["mutes","new","notifications"])}},function(n){return{onConfirm:function(t,e){n(Object(O.G)(t.get("id"),e))},onClose:function(){n(Object(j.c)())},onToggleNotifications:function(){n(Object(p.h)())}}})(o=Object(d.g)(o=function(a){function t(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=a.call.apply(a,[this].concat(n))||this,Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleClick",function(){e.props.onClose(),e.props.onConfirm(e.props.account,e.props.notifications)}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"handleCancel",function(){e.props.onClose()}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"setRef",function(t){e.button=t}),Object(u.a)(Object(s.a)(Object(s.a)(e)),"toggleNotifications",function(){e.props.onToggleNotifications()}),e}Object(i.a)(t,a);var e=t.prototype;return e.componentDidMount=function(){this.button.focus()},e.render=function(){var t=this.props,e=t.account,n=t.notifications;return Object(c.a)("div",{className:"modal-root__modal mute-modal"},void 0,Object(c.a)("div",{className:"mute-modal__container"},void 0,Object(c.a)("p",{},void 0,Object(c.a)(d.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:Object(c.a)("strong",{},void 0,"@",e.get("acct"))}})),Object(c.a)("div",{},void 0,Object(c.a)("label",{htmlFor:"mute-modal__hide-notifications-checkbox"},void 0,Object(c.a)(d.b,{id:"mute_modal.hide_notifications",defaultMessage:"Hide notifications from this user?"})," ",Object(c.a)(f.a,{id:"mute-modal__hide-notifications-checkbox",checked:n,onChange:this.toggleNotifications})))),Object(c.a)("div",{className:"mute-modal__action-bar"},void 0,Object(c.a)(m.a,{onClick:this.handleCancel,className:"mute-modal__cancel-button"},void 0,Object(c.a)(d.b,{id:"confirmation_modal.cancel",defaultMessage:"Cancel"})),r.a.createElement(m.a,{onClick:this.handleClick,ref:this.setRef},Object(c.a)(d.b,{id:"confirmations.mute.confirm",defaultMessage:"Mute"}))))},t}(r.a.PureComponent))||o)||o}}]);
//# sourceMappingURL=mute_modal.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long