pleroma/priv/static/packs/features/compose.js

2 lines
75 KiB
JavaScript
Raw Normal View History

webpackJsonp([2],{283:function(e,t,n){"use strict";function o(e){return function(t){t({type:i,account:e}),t(Object(a.d)("MUTE"))}}t.a=o;var a=(n(14),n(22),n(15),n(26)),i="MUTES_INIT_MODAL"},285:function(e,t,n){"use strict";function o(e,t){return function(n){n({type:i,account:e,status:t}),n(Object(a.d)("REPORT"))}}t.a=o;var a=(n(14),n(26)),i="REPORT_INIT"},286:function(e,t,n){"use strict";var o=n(2),a=n.n(o),i=n(0),s=(n.n(i),n(9)),r=n(152),c=n(67),l=n(18),u=n(68),d=n(22),p=n(92),g=n(283),f=n(285),h=n(26),m=n(6),v=n(12),b=(n(36),Object(m.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}})),y=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},_=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(l.T)(t,n))},onModalReblog:function(t){e(Object(u.l)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(u.n)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(h.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(u.m)(t):Object(u.i)(t))},onDelete:function(t){e(v.e?Object(h.d)("CONFIRM",{message:n.formatMessage(b.deleteMessage),confirm:n.formatMessage(b.deleteConfirm),onConfirm:function(){return e(Object(p.f)(t.get("id")))}}):Object(p.f)(t.get("id")))},onDirect:function(t,n){e(Object(l.N)(t,n))},onMention:function(t,n){e(Object(l.R)(t,n))},onOpenMedia:function(t,n){e(Object(h.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(h.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(h.d)("CONFIRM",{message:a()(m.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:a()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(b.blockConfirm),onConfirm:function(){return e(Object(d.q)(t.get("id")))}}))},onReport:function(t){e(Object(f.a)(t.get("account"),t))},onMute:function(t){e(Object(g.a)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(p.k)(t.get("id")):Object(p.i)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(p.j)(t.get("id")):Object(p.h)(t.get("id")))}}};t.a=Object(m.g)(Object(s.connect)(y,_)(r.a))},303:function(e,t,n){"use strict";n.d(t,"a",function(){return A});var o,a,i,s=n(2),r=n.n(s),c=n(1),l=n.n(c),u=n(3),d=n.n(u),p=n(4),g=n.n(p),f=n(0),h=n.n(f),m=n(304),v=n(102),b=n(13),y=n.n(b),_=n(5),k=n.n(_),w=n(305),C=n(307),j=n(312),x=n(6),M=n(314),O=n(315),S=n(317),N=n(319),D=n(320),z=n(322),I=n(328),T=n(35),F=n(11),R=n.n(F),P=n(99),E=(n.n(P),n(330)),q=n(12),U=Object(x.f)({placeholder:{id:"compose_form.placeholder",defaultMessage:"What is on your mind?"},spoiler_placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here"},publish:{id:"compose_form.publish",defaultMessage:"Toot"},publishLoud:{id:"compose_form.publish_loud",defaultMessage:"{publish}!"}}),A=Object(x.g)((i=a=function(e){function t(){var n,o,a;l()(this,t);for(var i=arguments.length,s=Array(i),r=0;r<i;r++)s[r]=arguments[r];return n=o=d()(this,e.call.apply(e,[this].concat(s))),o.handleChange=function(e){o.props.onChange(e.target.value)},o.handleKeyDown=function(e){13===e.keyCode&&(e.ctrlKey||e.metaKey)&&o.handleSubmit()},o.handleSubmit=function(){o.props.text!==o.autosuggestTextarea.textarea.value&&o.props.onChange(o.autosuggestTextarea.textarea.value);var e=o.props,t=e.is_submitting,n=e.is_uploading,a=e.anyMedia,i=[o.props.spoiler_text,Object(E.a)(o.props.text)].join("");t||n||Object(P.length)(i)>q.c||0!==i.length&&0===i.trim().length&&!a||o.props.onSubmit()},o.onSuggestionsClearRequested=function(){o.props.onClearSuggestions()},o.onSuggestionsFetchRequested=function(e){o.props.onFetchSuggestions(e)},o.onSuggestionSelected=function(e,t,n){o._restoreCaret=null,o.props.onSuggestionSelected(e,t,n)},o.handleChangeSpoilerText=function(e){o.props.onChangeSpoilerText(e.target.value)},o.setAutosuggestTextarea=function(e){o.autosuggest
//# sourceMappingURL=compose.js.map