spc-pleroma/priv/static/packs/features/account_gallery-b13924812f8...

2 lines
18 KiB
JavaScript

webpackJsonp([16],{150:function(e,n,o){"use strict";o.d(n,"a",function(){return f});var t=o(2),a=o.n(t),i=o(1),r=o.n(i),s=o(3),c=o.n(s),l=o(4),u=o.n(l),d=o(0),p=o.n(d),f=function(e){function n(){var o,t,a;r()(this,n);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return o=t=c()(this,e.call.apply(e,[this].concat(s))),t.handleClick=function(){t.props.onClick()},a=o,c()(t,a)}return u()(n,e),n.prototype.render=function(){var e=this.props,n=e.type,o=e.active,t=e.columnHeaderId,i="";return this.props.icon&&(i=a()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),a()("div",{role:"heading",tabIndex:"0",className:"column-header "+(o?"active":""),onClick:this.handleClick,id:t||null},void 0,i,n)},n}(p.a.PureComponent)},259:function(e,n,o){"use strict";o.d(n,"a",function(){return b});var t=o(2),a=o.n(t),i=o(1),r=o.n(i),s=o(3),c=o.n(s),l=o(4),u=o.n(l),d=o(42),p=o.n(d),f=o(0),m=o.n(f),h=o(150),g=o(91),v=o(33),b=function(e){function n(){var o,t,a;r()(this,n);for(var i=arguments.length,s=Array(i),l=0;l<i;l++)s[l]=arguments[l];return o=t=c()(this,e.call.apply(e,[this].concat(s))),t.handleHeaderClick=function(){var e=t.node.querySelector(".scrollable");e&&(t._interruptScrollAnimation=Object(g.b)(e))},t.handleScroll=p()(function(){void 0!==t._interruptScrollAnimation&&t._interruptScrollAnimation()},200),t.setRef=function(e){t.node=e},a=o,c()(t,a)}return u()(n,e),n.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(g.b)(e))},n.prototype.render=function(){var e=this.props,n=e.heading,o=e.icon,t=e.children,i=e.active,r=e.hideHeadingOnMobile,s=n&&(!r||r&&!Object(v.b)(window.innerWidth)),c=s&&n.replace(/ /g,"-"),l=s&&a()(h.a,{icon:o,active:i,type:n,onClick:this.handleHeaderClick,columnHeaderId:c});return m.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":c,className:"column",onScroll:this.handleScroll},l,t)},n}(m.a.PureComponent)},260:function(e,n,o){"use strict";o.d(n,"a",function(){return g});var t,a,i=o(2),r=o.n(i),s=o(1),c=o.n(s),l=o(3),u=o.n(l),d=o(4),p=o.n(d),f=o(0),m=o.n(f),h=o(6),g=(a=t=function(e){function n(){return c()(this,n),u()(this,e.apply(this,arguments))}return p()(n,e),n.prototype.render=function(){var e=this.props.visible;return r()("button",{className:"load-more",disabled:!e,style:{visibility:e?"visible":"hidden"},onClick:this.props.onClick},void 0,r()(h.b,{id:"status.load_more",defaultMessage:"Load more"}))},n}(m.a.PureComponent),t.defaultProps={visible:!0},a)},762:function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),o.d(n,"default",function(){return x});var t,a,i,r,s=o(2),c=o.n(s),l=o(1),u=o.n(l),d=o(3),p=o.n(d),f=o(4),m=o.n(f),h=o(0),g=(o.n(h),o(9)),v=o(12),b=o.n(v),M=o(5),_=o.n(M),y=o(22),k=o(16),w=o(271),O=o(259),I=o(779),j=o(11),C=o.n(j),N=o(69),R=o(898),B=o(781),D=o(6),S=o(152),q=o(260),F=function(e,n){return{medias:Object(N.a)(e,n.params.accountId),isLoading:e.getIn(["timelines","account:"+n.params.accountId+":media","isLoading"]),hasMore:!!e.getIn(["timelines","account:"+n.params.accountId+":media","next"])}},x=(t=Object(g.connect)(F))((r=i=function(e){function n(){var o,t,a;u()(this,n);for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];return o=t=p()(this,e.call.apply(e,[this].concat(r))),t.handleScrollToBottom=function(){t.props.hasMore&&t.props.dispatch(Object(k.p)(t.props.params.accountId))},t.handleScroll=function(e){var n=e.target,o=n.scrollTop;150>n.scrollHeight-o-n.clientHeight&&!t.props.isLoading&&t.handleScrollToBottom()},t.handleLoadMore=function(e){e.preventDefault(),t.handleScrollToBottom()},a=o,p()(t,a)}return m()(n,e),n.prototype.componentDidMount=function(){this.props.dispatch(Object(y.v)(this.props.params.accountId)),this.props.dispatch(Object(k.v)(this.props.params.accountId))},n.prototype.componentWillReceiveProps=function(e){e.params.accountId!==this.props.params.accountId&&e.params.accountId&&(this.props.dispatch(Object(y.v)(e.params.accountId)),this.props.dispatch(Object(k.v)(this.props.params.accountId)))},n.prototype.render=function(){var e=this.props,n=e.medias,o=e.isLoading,t=e.hasMore,a=null;return!n&&o?c()(O.a,{},void 0,c()(w.a,{})):(!o&&n.size>0&&t&&(a=c()(q.a,{onClick:this.handleLoadMore})),c()(O.a,{},void 0,c()(I.a,{}),c()(S.a,{scrollKey:"account_gallery"},void 0,c()("div",{className:"scrollable",onScroll:this.handleScroll},void 0,c()(B.a,{accountId:this.props.params.accountId}),c()("div",{className:"account-section-headline"},void 0,c()(D.b,{id:"account.media",defaultMessage:"Media"})),c()("div",{className:"account-gallery__container"},void 0,n.map(function(e){return c()(R.a,{media:e},e.get("id"))}),a)))))},n}(C.a),i.propTypes={params:_.a.object.isRequired,dispatch:_.a.func.isRequired,medias:b.a.list.isRequired,isLoading:_.a.bool,hasMore:_.a.bool},a=r))||a},779:function(e,n,o){"use strict";o.d(n,"a",function(){return b});var t,a,i=o(2),r=o.n(i),s=o(1),c=o.n(s),l=o(3),u=o.n(l),d=o(4),p=o.n(d),f=o(0),m=o.n(f),h=o(6),g=o(5),v=o.n(g),b=(a=t=function(e){function n(){var o,t,a;c()(this,n);for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];return o=t=u()(this,e.call.apply(e,[this].concat(r))),t.handleClick=function(){window.history&&1===window.history.length?t.context.router.history.push("/"):t.context.router.history.goBack()},a=o,u()(t,a)}return p()(n,e),n.prototype.render=function(){return r()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,r()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),r()(h.b,{id:"column_back_button.label",defaultMessage:"Back"}))},n}(m.a.PureComponent),t.contextTypes={router:v.a.object},a)},780:function(e,n,o){"use strict";var t=o(2),a=o.n(t),i=o(0),r=(o.n(i),o(6)),s=function(){return a()("div",{className:"missing-indicator"},void 0,a()("div",{},void 0,a()(r.b,{id:"missing_indicator.label",defaultMessage:"Not found"})))};n.a=s},781:function(e,n,o){"use strict";var t=o(2),a=o.n(t),i=o(0),r=(o.n(i),o(9)),s=o(69),c=o(782),l=o(22),u=o(15),d=o(151),p=o(31),f=o(285),m=o(6),h=o(18),g=Object(m.f)({unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},muteConfirm:{id:"confirmations.mute.confirm",defaultMessage:"Mute"},blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),v=function(){var e=Object(s.c)();return function(n,o){var t=o.accountId;return{account:e(n,t)}}},b=function(e,n){var o=n.intl;return{onFollow:function(n){e(n.getIn(["relationship","following"])||n.getIn(["relationship","requested"])?h.g?Object(p.d)("CONFIRM",{message:a()(m.b,{id:"confirmations.unfollow.message",defaultMessage:"Are you sure you want to unfollow {name}?",values:{name:a()("strong",{},void 0,"@",n.get("acct"))}}),confirm:o.formatMessage(g.unfollowConfirm),onConfirm:function(){return e(Object(l.E)(n.get("id")))}}):Object(l.E)(n.get("id")):Object(l.A)(n.get("id")))},onBlock:function(n){e(n.getIn(["relationship","blocking"])?Object(l.D)(n.get("id")):Object(p.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,"@",n.get("acct"))}}),confirm:o.formatMessage(g.blockConfirm),onConfirm:function(){return e(Object(l.r)(n.get("id")))}}))},onMention:function(n,o){e(Object(u.M)(n,o))},onReport:function(n){e(Object(d.i)(n))},onMute:function(n){e(n.getIn(["relationship","muting"])?Object(l.F)(n.get("id")):Object(p.d)("CONFIRM",{message:a()(m.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:a()("strong",{},void 0,"@",n.get("acct"))}}),confirm:o.formatMessage(g.muteConfirm),onConfirm:function(){return e(Object(l.B)(n.get("id")))}}))},onBlockDomain:function(n,t){e(Object(p.d)("CONFIRM",{message:a()(m.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",values:{domain:a()("strong",{},void 0,n)}}),confirm:o.formatMessage(g.blockDomainConfirm),onConfirm:function(){return e(Object(f.c)(n,t))}}))},onUnblockDomain:function(n,o){e(Object(f.d)(n,o))}}};n.a=Object(m.g)(Object(r.connect)(v,b)(c.a))},782:function(e,n,o){"use strict";o.d(n,"a",function(){return w});var t,a,i=o(2),r=o.n(i),s=o(1),c=o.n(s),l=o(3),u=o.n(l),d=o(4),p=o.n(d),f=o(0),m=(o.n(f),o(12)),h=o.n(m),g=o(5),v=o.n(g),b=o(783),M=o(784),_=o(780),y=o(11),k=o.n(y),w=(a=t=function(e){function n(){var o,t,a;c()(this,n);for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];return o=t=u()(this,e.call.apply(e,[this].concat(r))),t.handleFollow=function(){t.props.onFollow(t.props.account)},t.handleBlock=function(){t.props.onBlock(t.props.account)},t.handleMention=function(){t.props.onMention(t.props.account,t.context.router.history)},t.handleReport=function(){t.props.onReport(t.props.account)},t.handleMute=function(){t.props.onMute(t.props.account)},t.handleBlockDomain=function(){var e=t.props.account.get("acct").split("@")[1];e&&t.props.onBlockDomain(e,t.props.account.get("id"))},t.handleUnblockDomain=function(){var e=t.props.account.get("acct").split("@")[1];e&&t.props.onUnblockDomain(e,t.props.account.get("id"))},a=o,u()(t,a)}return p()(n,e),n.prototype.render=function(){var e=this.props.account;return null===e?r()(_.a,{}):r()("div",{className:"account-timeline__header"},void 0,r()(b.a,{account:e,onFollow:this.handleFollow}),r()(M.a,{account:e,onBlock:this.handleBlock,onMention:this.handleMention,onReport:this.handleReport,onMute:this.handleMute,onBlockDomain:this.handleBlockDomain,onUnblockDomain:this.handleUnblockDomain}))},n}(k.a),t.propTypes={account:h.a.map,onFollow:v.a.func.isRequired,onBlock:v.a.func.isRequired,onMention:v.a.func.isRequired,onReport:v.a.func.isRequired,onMute:v.a.func.isRequired,onBlockDomain:v.a.func.isRequired,onUnblockDomain:v.a.func.isRequired},t.contextTypes={router:v.a.object},a)},783:function(e,n,o){"use strict";o.d(n,"a",function(){return D});var t,a,i,r,s,c=o(2),l=o.n(c),u=o(1),d=o.n(u),p=o(3),f=o.n(p),m=o(4),h=o.n(m),g=o(0),v=(o.n(g),o(12)),b=o.n(v),M=o(5),_=o.n(M),y=o(6),k=o(19),w=o(26),O=o(27),I=o.n(O),j=o(11),C=o.n(j),N=o(18),R=Object(y.f)({unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},follow:{id:"account.follow",defaultMessage:"Follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval. Click to cancel follow request"}}),B=(a=t=function(e){function n(){var o,t,a;d()(this,n);for(var i=arguments.length,r=Array(i),s=0;s<i;s++)r[s]=arguments[s];return o=t=f()(this,e.call.apply(e,[this].concat(r))),t.state={isHovered:!1},t.handleMouseOver=function(){t.state.isHovered||t.setState({isHovered:!0})},t.handleMouseOut=function(){t.state.isHovered&&t.setState({isHovered:!1})},a=o,f()(t,a)}return h()(n,e),n.prototype.render=function(){var e=this,n=this.props.account,o=this.state.isHovered;return l()(w.a,{defaultStyle:{radius:90},style:{radius:I()(o?30:90,{stiffness:180,damping:12})}},void 0,function(t){var a=t.radius;return l()("a",{href:n.get("url"),className:"account__header__avatar",role:"presentation",target:"_blank",rel:"noopener",style:{borderRadius:a+"px",backgroundImage:"url("+(N.a||o?n.get("avatar"):n.get("avatar_static"))+")"},onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,onFocus:e.handleMouseOver,onBlur:e.handleMouseOut},void 0,l()("span",{style:{display:"none"}},void 0,n.get("acct")))})},n}(C.a),t.propTypes={account:b.a.map.isRequired},a),D=Object(y.g)((s=r=function(e){function n(){return d()(this,n),f()(this,e.apply(this,arguments))}return h()(n,e),n.prototype.render=function(){var e=this.props,n=e.account,o=e.intl;if(!n)return null;var t="",a="",i="";N.e!==n.get("id")&&n.getIn(["relationship","followed_by"])&&(t=l()("span",{className:"account--follows-info"},void 0,l()(y.b,{id:"account.follows_you",defaultMessage:"Follows you"}))),N.e!==n.get("id")&&(n.getIn(["relationship","requested"])?a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,active:!0,icon:"hourglass",title:o.formatMessage(R.requested),onClick:this.props.onFollow})):n.getIn(["relationship","blocking"])||(a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,icon:n.getIn(["relationship","following"])?"user-times":"user-plus",active:n.getIn(["relationship","following"]),title:o.formatMessage(n.getIn(["relationship","following"])?R.unfollow:R.follow),onClick:this.props.onFollow})))),n.get("locked")&&(i=l()("i",{className:"fa fa-lock"}));var r={__html:n.get("note_emojified")},s={__html:n.get("display_name_html")};return l()("div",{className:"account__header",style:{backgroundImage:"url("+n.get("header")+")"}},void 0,l()("div",{},void 0,l()(B,{account:n}),l()("span",{className:"account__header__display-name",dangerouslySetInnerHTML:s}),l()("span",{className:"account__header__username"},void 0,"@",n.get("acct")," ",i),l()("div",{className:"account__header__content",dangerouslySetInnerHTML:r}),t,a))},n}(C.a),r.propTypes={account:b.a.map,onFollow:_.a.func.isRequired,intl:_.a.object.isRequired},i=s))||i},784:function(e,n,o){"use strict";o.d(n,"a",function(){return M});var t,a=o(2),i=o.n(a),r=o(1),s=o.n(r),c=o(3),l=o.n(c),u=o(4),d=o.n(u),p=o(0),f=o.n(p),m=o(284),h=o(58),g=o(6),v=o(18),b=Object(g.f)({mention:{id:"account.mention",defaultMessage:"Mention @{name}"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},follow:{id:"account.follow",defaultMessage:"Follow"},report:{id:"account.report",defaultMessage:"Report @{name}"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),M=Object(g.g)(t=function(e){function n(){var o,t,a;s()(this,n);for(var i=arguments.length,r=Array(i),c=0;c<i;c++)r[c]=arguments[c];return o=t=l()(this,e.call.apply(e,[this].concat(r))),t.handleShare=function(){navigator.share({url:t.props.account.get("url")})},a=o,l()(t,a)}return d()(n,e),n.prototype.render=function(){var e=this.props,n=e.account,o=e.intl,t=[],a="";if(t.push({text:o.formatMessage(b.mention,{name:n.get("username")}),action:this.props.onMention}),"share"in navigator&&t.push({text:o.formatMessage(b.share,{name:n.get("username")}),action:this.handleShare}),t.push(null),t.push({text:o.formatMessage(b.media),to:"/accounts/"+n.get("id")+"/media"}),t.push(null),n.get("id")===v.e?t.push({text:o.formatMessage(b.edit_profile),href:"/settings/profile"}):(n.getIn(["relationship","muting"])?t.push({text:o.formatMessage(b.unmute,{name:n.get("username")}),action:this.props.onMute}):t.push({text:o.formatMessage(b.mute,{name:n.get("username")}),action:this.props.onMute}),n.getIn(["relationship","blocking"])?t.push({text:o.formatMessage(b.unblock,{name:n.get("username")}),action:this.props.onBlock}):t.push({text:o.formatMessage(b.block,{name:n.get("username")}),action:this.props.onBlock}),t.push({text:o.formatMessage(b.report,{name:n.get("username")}),action:this.props.onReport})),n.get("acct")!==n.get("username")){var r=n.get("acct").split("@")[1];a=i()("div",{className:"account__disclaimer"},void 0,i()(g.b,{id:"account.disclaimer_full",defaultMessage:"Information below may reflect the user's profile incompletely."})," ",i()("a",{target:"_blank",rel:"noopener",href:n.get("url")},void 0,i()(g.b,{id:"account.view_full_profile",defaultMessage:"View full profile"}))),t.push(null),n.getIn(["relationship","domain_blocking"])?t.push({text:o.formatMessage(b.unblockDomain,{domain:r}),action:this.props.onUnblockDomain}):t.push({text:o.formatMessage(b.blockDomain,{domain:r}),action:this.props.onBlockDomain})}return i()("div",{},void 0,a,i()("div",{className:"account__action-bar"},void 0,i()("div",{className:"account__action-bar-dropdown"},void 0,i()(m.a,{items:t,icon:"bars",size:24,direction:"right"})),i()("div",{className:"account__action-bar-links"},void 0,i()(h.b,{className:"account__action-bar__tab",to:"/accounts/"+n.get("id")},void 0,i()("span",{},void 0,i()(g.b,{id:"account.posts",defaultMessage:"Posts"})),i()("strong",{},void 0,i()(g.c,{value:n.get("statuses_count")}))),i()(h.b,{className:"account__action-bar__tab",to:"/accounts/"+n.get("id")+"/following"},void 0,i()("span",{},void 0,i()(g.b,{id:"account.follows",defaultMessage:"Follows"})),i()("strong",{},void 0,i()(g.c,{value:n.get("following_count")}))),i()(h.b,{className:"account__action-bar__tab",to:"/accounts/"+n.get("id")+"/followers"},void 0,i()("span",{},void 0,i()(g.b,{id:"account.followers",defaultMessage:"Followers"})),i()("strong",{},void 0,i()(g.c,{value:n.get("followers_count")}))))))},n}(f.a.PureComponent))||t},898:function(e,n,o){"use strict";o.d(n,"a",function(){return M});var t,a,i=o(2),r=o.n(i),s=o(1),c=o.n(s),l=o(3),u=o.n(l),d=o(4),p=o.n(d),f=o(0),m=(o.n(f),o(12)),h=o.n(m),g=o(11),v=o.n(g),b=o(270),M=(a=t=function(e){function n(){return c()(this,n),u()(this,e.apply(this,arguments))}return p()(n,e),n.prototype.render=function(){var e=this.props.media,n=e.get("status"),o=void 0,t=void 0;return"gifv"===e.get("type")&&(o=r()("span",{className:"media-gallery__gifv__label"},void 0,"GIF")),n.get("sensitive")||(t={backgroundImage:"url("+e.get("preview_url")+")"}),r()("div",{className:"account-gallery__item"},void 0,r()(b.a,{to:"/statuses/"+n.get("id"),href:n.get("url"),style:t},void 0,o))},n}(v.a),t.propTypes={media:h.a.map.isRequired},a)}});
//# sourceMappingURL=account_gallery-b13924812f8dd47200c2.js.map