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

2 lines
75 KiB
JavaScript
Raw Normal View History

2018-06-02 14:11:38 +00:00
webpackJsonp([2],{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(156),c=n(68),l=n(17),u=n(69),d=n(22),p=n(91),g=n(89),f=n(155),m=n(26),h=n(7),v=n(13),b=n(33),y=Object(h.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"}}),_=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},k=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(l.T)(t,n))},onModalReblog:function(t){e(Object(u.o)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(u.r)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(m.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(u.p)(t):Object(u.k)(t))},onPin:function(t){e(t.get("pinned")?Object(u.q)(t):Object(u.n)(t))},onEmbed:function(t){e(Object(m.d)("EMBED",{url:t.get("url"),onError:function(t){return e(Object(b.e)(t))}}))},onDelete:function(t){e(v.e?Object(m.d)("CONFIRM",{message:n.formatMessage(y.deleteMessage),confirm:n.formatMessage(y.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(m.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(m.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(m.d)("CONFIRM",{message:a()(h.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(y.blockConfirm),onConfirm:function(){return e(Object(d.q)(t.get("id")))}}))},onReport:function(t){e(Object(f.k)(t.get("account"),t))},onMute:function(t){e(Object(g.g)(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(h.g)(Object(s.connect)(_,k)(r.a))},302:function(e,t,n){"use strict";n.d(t,"a",function(){return L});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),m=n.n(f),h=n(303),v=n(100),b=n(14),y=n.n(b),_=n(5),k=n.n(_),w=n(304),C=n(306),j=n(311),x=n(7),M=n(313),O=n(314),S=n(316),N=n(318),D=n(319),z=n(321),I=n(327),P=n(43),F=n(12),R=n.n(F),T=n(99),E=(n.n(T),n(329)),q=n(13),A="><…    \u2028\u2029\t\n\v\f\r",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}!"}}),L=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(T.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.props.onSuggestionSelected(e,t,n)},o.handleChangeSpoilerText=function(e){o.props.onChangeSpoilerText(e.target.value)},o.setAutosuggestTextarea=function(e){o.autosuggestTextarea=e},o.handleEmojiPick=function(e){var t=o.props.text,n=o.autosuggestTextarea.textarea.selectionSt
//# sourceMappingURL=compose.js.map