qb_akkoma/priv/static/packs/features/mutes-60c139f123f8d11ed903.js
2017-11-12 14:23:05 +01:00

2 lines
No EOL
7.6 KiB
JavaScript

webpackJsonp([19],{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 b});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),m=t(150),g=t(91),v=t(33),b=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(g.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(g.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(v.b)(window.innerWidth)),l=r&&e.replace(/ /g,"-"),u=r&&i()(m.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 b});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),m=t(6),g=t(5),v=t.n(g),b=(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()(m.b,{id:"column_back_button.label",defaultMessage:"Back"})))},e}(h.a.PureComponent),o.contextTypes={router:v.a.object},i)},771: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),m=t(0),g=(t.n(m),t(9)),v=t(5),b=t.n(v),y=t(12),w=t.n(y),k=t(271),j=t(152),M=t(259),O=t(272),_=t(777),C=t(106),I=t(6),q=t(11),N=t.n(q),A=Object(I.f)({heading:{id:"column.mutes",defaultMessage:"Muted users"}}),S=function(n){return{accountIds:n.getIn(["user_lists","mutes","items"])}},R=(o=Object(g.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()(M.a,{icon:"volume-off",heading:e.formatMessage(A.heading)},void 0,l()(O.a,{}),l()(j.a,{scrollKey:"mutes"},void 0,l()("div",{className:"scrollable mutes",onScroll:this.handleScroll},void 0,t.map(function(n){return l()(_.a,{id:n},n)})))):l()(M.a,{},void 0,l()(k.a,{}))},e}(N.a),a.propTypes={params:b.a.object.isRequired,dispatch:b.a.func.isRequired,accountIds:w.a.list,intl:b.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)}}},m=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,m)(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),m=(t.n(h),t(12)),g=t.n(m),v=t(5),b=t.n(v),y=t(55),w=t(56),k=t(270),j=t(19),M=t(6),O=t(11),_=t.n(O),C=t(18),I=Object(M.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(M.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()(k.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()(y.a,{account:e,size:36})),r()(w.a,{account:e})),r()("div",{className:"account__relationship"},void 0,i)))},e}(_.a),i.propTypes={account:g.a.map.isRequired,onFollow:b.a.func.isRequired,onBlock:b.a.func.isRequired,onMute:b.a.func.isRequired,intl:b.a.object.isRequired,hidden:b.a.bool},o=a))||o}});
//# sourceMappingURL=mutes-60c139f123f8d11ed903.js.map