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

2 lines
94 KiB
JavaScript
Raw Normal View History

2018-08-12 07:29:30 -06:00
webpackJsonp([2],{277:function(e,t,n){"use strict";var o=n(2),i=n.n(o),r=n(0),a=(n.n(r),n(9)),s=n(158),u=n(67),c=n(17),l=n(68),d=n(22),f=n(69),p=n(90),h=n(157),g=n(26),m=n(7),v=n(13),y=n(33),b=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?"},redraftConfirm:{id:"confirmations.redraft.confirm",defaultMessage:"Delete & redraft"},redraftMessage:{id:"confirmations.redraft.message",defaultMessage:"Are you sure you want to delete this status and re-draft it? You will lose all replies, boosts and favourites to it."},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}}),_=function(){var e=Object(u.e)();return function(t,n){return{status:e(t,n.id)}}},w=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(c.T)(t,n))},onModalReblog:function(t){e(Object(l.o)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(l.r)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(g.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(l.p)(t):Object(l.k)(t))},onPin:function(t){e(t.get("pinned")?Object(l.q)(t):Object(l.n)(t))},onEmbed:function(t){e(Object(g.d)("EMBED",{url:t.get("url"),onError:function(t){return e(Object(y.e)(t))}}))},onDelete:function(t){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e(v.d?Object(g.d)("CONFIRM",{message:n.formatMessage(o?b.redraftMessage:b.deleteMessage),confirm:n.formatMessage(o?b.redraftConfirm:b.deleteConfirm),onConfirm:function(){return e(Object(f.g)(t.get("id"),o))}}):Object(f.g)(t.get("id"),o))},onDirect:function(t,n){e(Object(c.N)(t,n))},onMention:function(t,n){e(Object(c.R)(t,n))},onOpenMedia:function(t,n){e(Object(g.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(g.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(g.d)("CONFIRM",{message:i()(m.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("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(h.k)(t.get("account"),t))},onMute:function(t){e(Object(p.g)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(f.l)(t.get("id")):Object(f.j)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(f.k)(t.get("id")):Object(f.i)(t.get("id")))}}};t.a=Object(m.g)(Object(a.connect)(_,w)(s.a))},293:function(e,t,n){"use strict";n.d(t,"a",function(){return z});var o,i,r,a=n(2),s=n.n(a),u=n(1),c=n.n(u),l=n(3),d=n.n(l),f=n(4),p=n.n(f),h=n(0),g=n.n(h),m=n(294),v=n(100),y=n(14),b=n.n(y),_=n(5),w=n.n(_),j=n(295),k=n(297),O=n(302),M=n(7),C=n(304),x=n(306),S=n(308),N=n(309),T=n(311),P=n(317),E=n(43),R=n(12),D=n.n(R),I=n(99),F=(n.n(I),n(13)),q="><…    \u2028\u2029\t\n\v\f\r",A=Object(M.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}!"}}),z=Object(M.g)((r=i=function(e){function t(){var n,o,i;c()(this,t);for(var r=arguments.length,a=Array(r),s=0;s<r;s++)a[s]=arguments[s];return n=o=d()(this,e.call.apply(e,[this].concat(a))),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,i=e.anyMedia,r=[o.props.spoiler_text,o.props.text].join("");t||n||Object(I.length)(r)>F.h||0!==r.length&&0===r.trim().length&&!i||o.props.onSubmit()},o.onSuggestionsClearRequested=function(){o.props.onClearSuggestions()},o.onSuggestionsFetchRequested=function(e){
//# sourceMappingURL=compose.js.map