pleroma/priv/static/packs/features/blocks-e9605338ea941de78465.js
2017-11-12 14:23:05 +01:00

2 lines
No EOL
7.6 KiB
JavaScript

webpackJsonp([20],{150:function(n,e,t){"use strict";t.d(e,"a",function(){return p});var o=t(2),i=t.n(o),a=t(1),c=t.n(a),r=t(3),l=t.n(r),u=t(4),s=t.n(u),d=t(0),f=t.n(d),p=function(n){function e(){var t,o,i;c()(this,e);for(var a=arguments.length,r=Array(a),u=0;u<a;u++)r[u]=arguments[u];return t=o=l()(this,n.call.apply(n,[this].concat(r))),o.handleClick=function(){o.props.onClick()},i=t,l()(o,i)}return s()(e,n),e.prototype.render=function(){var n=this.props,e=n.type,t=n.active,o=n.columnHeaderId,a="";return this.props.icon&&(a=i()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),i()("div",{role:"heading",tabIndex:"0",className:"column-header "+(t?"active":""),onClick:this.handleClick,id:o||null},void 0,a,e)},e}(f.a.PureComponent)},259:function(n,e,t){"use strict";t.d(e,"a",function(){return v});var o=t(2),i=t.n(o),a=t(1),c=t.n(a),r=t(3),l=t.n(r),u=t(4),s=t.n(u),d=t(42),f=t.n(d),p=t(0),h=t.n(p),g=t(150),m=t(91),b=t(33),v=function(n){function e(){var t,o,i;c()(this,e);for(var a=arguments.length,r=Array(a),u=0;u<a;u++)r[u]=arguments[u];return t=o=l()(this,n.call.apply(n,[this].concat(r))),o.handleHeaderClick=function(){var n=o.node.querySelector(".scrollable");n&&(o._interruptScrollAnimation=Object(m.b)(n))},o.handleScroll=f()(function(){void 0!==o._interruptScrollAnimation&&o._interruptScrollAnimation()},200),o.setRef=function(n){o.node=n},i=t,l()(o,i)}return s()(e,n),e.prototype.scrollTop=function(){var n=this.node.querySelector(".scrollable");n&&(this._interruptScrollAnimation=Object(m.b)(n))},e.prototype.render=function(){var n=this.props,e=n.heading,t=n.icon,o=n.children,a=n.active,c=n.hideHeadingOnMobile,r=e&&(!c||c&&!Object(b.b)(window.innerWidth)),l=r&&e.replace(/ /g,"-"),u=r&&i()(g.a,{icon:t,active:a,type:e,onClick:this.handleHeaderClick,columnHeaderId:l});return h.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":l,className:"column",onScroll:this.handleScroll},u,o)},e}(h.a.PureComponent)},272:function(n,e,t){"use strict";t.d(e,"a",function(){return v});var o,i,a=t(2),c=t.n(a),r=t(1),l=t.n(r),u=t(3),s=t.n(u),d=t(4),f=t.n(d),p=t(0),h=t.n(p),g=t(6),m=t(5),b=t.n(m),v=(i=o=function(n){function e(){var t,o,i;l()(this,e);for(var a=arguments.length,c=Array(a),r=0;r<a;r++)c[r]=arguments[r];return t=o=s()(this,n.call.apply(n,[this].concat(c))),o.handleClick=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},i=t,s()(o,i)}return f()(e,n),e.prototype.render=function(){return c()("div",{className:"column-back-button--slim"},void 0,c()("div",{role:"button",tabIndex:"0",onClick:this.handleClick,className:"column-back-button column-back-button--slim-button"},void 0,c()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),c()(g.b,{id:"column_back_button.label",defaultMessage:"Back"})))},e}(h.a.PureComponent),o.contextTypes={router:b.a.object},i)},770:function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.d(e,"default",function(){return R});var o,i,a,c,r=t(2),l=t.n(r),u=t(1),s=t.n(u),d=t(3),f=t.n(d),p=t(4),h=t.n(p),g=t(0),m=(t.n(g),t(9)),b=t(12),v=t.n(b),k=t(5),y=t.n(k),w=t(271),j=t(152),O=t(259),M=t(272),_=t(777),C=t(105),I=t(6),q=t(11),N=t.n(q),A=Object(I.f)({heading:{id:"column.blocks",defaultMessage:"Blocked users"}}),S=function(n){return{accountIds:n.getIn(["user_lists","blocks","items"])}},R=(o=Object(m.connect)(S))(i=Object(I.g)((c=a=function(n){function e(){var t,o,i;s()(this,e);for(var a=arguments.length,c=Array(a),r=0;r<a;r++)c[r]=arguments[r];return t=o=f()(this,n.call.apply(n,[this].concat(c))),o.handleScroll=function(n){var e=n.target;e.scrollTop===e.scrollHeight-e.clientHeight&&o.props.dispatch(Object(C.c)())},i=t,f()(o,i)}return h()(e,n),e.prototype.componentWillMount=function(){this.props.dispatch(Object(C.d)())},e.prototype.render=function(){var n=this.props,e=n.intl,t=n.accountIds;return t?l()(O.a,{icon:"ban",heading:e.formatMessage(A.heading)},void 0,l()(M.a,{}),l()(j.a,{scrollKey:"blocks"},void 0,l()("div",{className:"scrollable",onScroll:this.handleScroll},void 0,t.map(function(n){return l()(_.a,{id:n},n)})))):l()(O.a,{},void 0,l()(w.a,{}))},e}(N.a),a.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,accountIds:v.a.list,intl:y.a.object.isRequired},i=c))||i)||i},777:function(n,e,t){"use strict";var o=t(2),i=t.n(o),a=t(0),c=(t.n(a),t(9)),r=t(6),l=t(69),u=t(778),s=t(22),d=t(31),f=t(18),p=Object(r.f)({unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"}}),h=function(){var n=Object(l.c)();return function(e,t){return{account:n(e,t.id)}}},g=function(n,e){var t=e.intl;return{onFollow:function(e){n(e.getIn(["relationship","following"])||e.getIn(["relationship","requested"])?f.g?Object(d.d)("CONFIRM",{message:i()(r.b,{id:"confirmations.unfollow.message",defaultMessage:"Are you sure you want to unfollow {name}?",values:{name:i()("strong",{},void 0,"@",e.get("acct"))}}),confirm:t.formatMessage(p.unfollowConfirm),onConfirm:function(){return n(Object(s.E)(e.get("id")))}}):Object(s.E)(e.get("id")):Object(s.A)(e.get("id")))},onBlock:function(e){n(e.getIn(["relationship","blocking"])?Object(s.D)(e.get("id")):Object(s.r)(e.get("id")))},onMute:function(e){n(e.getIn(["relationship","muting"])?Object(s.F)(e.get("id")):Object(s.B)(e.get("id")))}}};e.a=Object(r.g)(Object(c.connect)(h,g)(u.a))},778:function(n,e,t){"use strict";t.d(e,"a",function(){return q});var o,i,a,c=t(2),r=t.n(c),l=t(1),u=t.n(l),s=t(3),d=t.n(s),f=t(4),p=t.n(f),h=t(0),g=(t.n(h),t(12)),m=t.n(g),b=t(5),v=t.n(b),k=t(55),y=t(56),w=t(270),j=t(19),O=t(6),M=t(11),_=t.n(M),C=t(18),I=Object(O.f)({follow:{id:"account.follow",defaultMessage:"Follow"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"}}),q=Object(O.g)((a=i=function(n){function e(){var t,o,i;u()(this,e);for(var a=arguments.length,c=Array(a),r=0;r<a;r++)c[r]=arguments[r];return t=o=d()(this,n.call.apply(n,[this].concat(c))),o.handleFollow=function(){o.props.onFollow(o.props.account)},o.handleBlock=function(){o.props.onBlock(o.props.account)},o.handleMute=function(){o.props.onMute(o.props.account)},i=t,d()(o,i)}return p()(e,n),e.prototype.render=function(){var n=this.props,e=n.account,t=n.intl,o=n.hidden;if(!e)return r()("div",{});if(o)return r()("div",{},void 0,e.get("display_name"),e.get("username"));var i=void 0;if(e.get("id")!==C.e&&null!==e.get("relationship",null)){var a=e.getIn(["relationship","following"]),c=e.getIn(["relationship","requested"]),l=e.getIn(["relationship","blocking"]),u=e.getIn(["relationship","muting"]);i=c?r()(j.a,{disabled:!0,icon:"hourglass",title:t.formatMessage(I.requested)}):l?r()(j.a,{active:!0,icon:"unlock-alt",title:t.formatMessage(I.unblock,{name:e.get("username")}),onClick:this.handleBlock}):u?r()(j.a,{active:!0,icon:"volume-up",title:t.formatMessage(I.unmute,{name:e.get("username")}),onClick:this.handleMute}):r()(j.a,{icon:a?"user-times":"user-plus",title:t.formatMessage(a?I.unfollow:I.follow),onClick:this.handleFollow,active:a})}return r()("div",{className:"account"},void 0,r()("div",{className:"account__wrapper"},void 0,r()(w.a,{className:"account__display-name",href:e.get("url"),to:"/accounts/"+e.get("id")},e.get("id"),r()("div",{className:"account__avatar-wrapper"},void 0,r()(k.a,{account:e,size:36})),r()(y.a,{account:e})),r()("div",{className:"account__relationship"},void 0,i)))},e}(_.a),i.propTypes={account:m.a.map.isRequired,onFollow:v.a.func.isRequired,onBlock:v.a.func.isRequired,onMute:v.a.func.isRequired,intl:v.a.object.isRequired,hidden:v.a.bool},o=a))||o}});
//# sourceMappingURL=blocks-e9605338ea941de78465.js.map